diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 1d42d53ed4a2..b431a5212134 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -586,6 +586,13 @@ pom import + + com.google.cloud + google-cloud-gdchardwaremanagement-bom + 0.0.1-SNAPSHOT + pom + import + com.google.cloud google-cloud-gke-backup-bom diff --git a/generation_config.yaml b/generation_config.yaml index 1acd5542d06d..6e71f84549aa 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -958,6 +958,25 @@ libraries: - proto_path: google/cloud/functions/v2alpha - proto_path: google/cloud/functions/v2beta +- api_shortname: gdchardwaremanagement + name_pretty: GDC Hardware Management API + product_documentation: https://cloud.google.com/distributed-cloud/edge/latest/docs + api_description: Google Distributed Cloud connected allows you to run Kubernetes + clusters on dedicated hardware provided and maintained by Google that is separate + from the Google Cloud data center. + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-gdchardwaremanagement/latest/overview + release_level: preview + distribution_name: com.google.cloud:google-cloud-gdchardwaremanagement + api_id: gdchardwaremanagement.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.cloud + cloud_api: true + GAPICs: + - proto_path: google/cloud/gdchardwaremanagement/v1alpha + requires_billing: true + rpc_documentation: + https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/hardware/rpc - api_shortname: gke-backup name_pretty: Backup for GKE product_documentation: 'https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/concepts/backup-for-gke ' @@ -1112,69 +1131,6 @@ libraries: issue_tracker: https://issuetracker.google.com/issues?q=status:open%20componentid:310170 GAPICs: - proto_path: google/cloud/iot/v1 -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/overview - release_level: preview - distribution_name: com.google.shopping:google-shopping-merchant-products - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/products/v1beta - library_name: shopping-merchant-products -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-datasources/latest/overview - release_level: preview - distribution_name: com.google.shopping:google-shopping-merchant-datasources - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/datasources/v1beta - library_name: shopping-merchant-datasources - requires_billing: true -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/overview - release_level: preview - distribution_name: com.google.shopping:google-shopping-merchant-accounts - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/accounts/v1beta - library_name: shopping-merchant-accounts - requires_billing: true -- api_shortname: merchantapi - name_pretty: Merchant API - product_documentation: https://developers.google.com/merchant/api - api_description: Programmatically manage your Merchant Center accounts. - client_documentation: - https://cloud.google.com/java/docs/reference/google-shopping-merchant-promotions/latest/overview - release_level: preview - distribution_name: com.google.shopping:google-shopping-merchant-promotions - api_id: merchantapi.googleapis.com - library_type: GAPIC_AUTO - group_id: com.google.shopping - cloud_api: false - GAPICs: - - proto_path: google/shopping/merchant/promotions/v1beta - library_name: shopping-merchant-promotions - requires_billing: true - api_shortname: cloudkms name_pretty: Cloud Key Management Service product_documentation: https://cloud.google.com/kms @@ -1939,6 +1895,22 @@ libraries: - proto_path: google/shopping/css/v1 # duplicated api_shortname +- api_shortname: merchantapi + name_pretty: Merchant API + product_documentation: https://developers.google.com/merchant/api + api_description: Programmatically manage your Merchant Center accounts. + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-accounts/latest/overview + release_level: preview + distribution_name: com.google.shopping:google-shopping-merchant-accounts + api_id: merchantapi.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.shopping + cloud_api: false + GAPICs: + - proto_path: google/shopping/merchant/accounts/v1beta + library_name: shopping-merchant-accounts + requires_billing: true - api_shortname: shopping-merchant-conversions name_pretty: Merchant Conversions API product_documentation: https://developers.google.com/merchant/api @@ -1955,6 +1927,22 @@ libraries: - proto_path: google/shopping/merchant/conversions/v1beta requires_billing: true +- api_shortname: merchantapi + name_pretty: Merchant API + product_documentation: https://developers.google.com/merchant/api + api_description: Programmatically manage your Merchant Center accounts. + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-datasources/latest/overview + release_level: preview + distribution_name: com.google.shopping:google-shopping-merchant-datasources + api_id: merchantapi.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.shopping + cloud_api: false + GAPICs: + - proto_path: google/shopping/merchant/datasources/v1beta + library_name: shopping-merchant-datasources + requires_billing: true - api_shortname: merchantapi name_pretty: Merchant API product_documentation: https://developers.google.com/merchant/api @@ -1981,6 +1969,37 @@ libraries: - proto_path: google/shopping/merchant/lfp/v1beta requires_billing: true +- api_shortname: merchantapi + name_pretty: Merchant API + product_documentation: https://developers.google.com/merchant/api + api_description: Programmatically manage your Merchant Center accounts. + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/overview + release_level: preview + distribution_name: com.google.shopping:google-shopping-merchant-products + api_id: merchantapi.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.shopping + cloud_api: false + GAPICs: + - proto_path: google/shopping/merchant/products/v1beta + library_name: shopping-merchant-products +- api_shortname: merchantapi + name_pretty: Merchant API + product_documentation: https://developers.google.com/merchant/api + api_description: Programmatically manage your Merchant Center accounts. + client_documentation: + https://cloud.google.com/java/docs/reference/google-shopping-merchant-promotions/latest/overview + release_level: preview + distribution_name: com.google.shopping:google-shopping-merchant-promotions + api_id: merchantapi.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.shopping + cloud_api: false + GAPICs: + - proto_path: google/shopping/merchant/promotions/v1beta + library_name: shopping-merchant-promotions + requires_billing: true - api_shortname: shopping-merchant-quota name_pretty: Merchant Quota API product_documentation: https://developers.google.com/merchant/api diff --git a/java-gdchardwaremanagement/.OwlBot-hermetic.yaml b/java-gdchardwaremanagement/.OwlBot-hermetic.yaml new file mode 100644 index 000000000000..792ebbba21b4 --- /dev/null +++ b/java-gdchardwaremanagement/.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-gdchardwaremanagement/grpc-google-.*/src" +- "/java-gdchardwaremanagement/proto-google-.*/src" +- "/java-gdchardwaremanagement/google-.*/src" +- "/java-gdchardwaremanagement/samples/snippets/generated" + +deep-preserve-regex: +- "/java-gdchardwaremanagement/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/gdchardwaremanagement/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-gdchardwaremanagement/$1/proto-google-cloud-gdchardwaremanagement-$1/src" +- source: "/google/cloud/gdchardwaremanagement/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-gdchardwaremanagement/$1/grpc-google-cloud-gdchardwaremanagement-$1/src" +- source: "/google/cloud/gdchardwaremanagement/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-gdchardwaremanagement/$1/google-cloud-gdchardwaremanagement/src" +- source: "/google/cloud/gdchardwaremanagement/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-gdchardwaremanagement/$1/samples/snippets/generated" + +api-name: gdchardwaremanagement \ No newline at end of file diff --git a/java-gdchardwaremanagement/.repo-metadata.json b/java-gdchardwaremanagement/.repo-metadata.json new file mode 100644 index 000000000000..8aab0b1e4844 --- /dev/null +++ b/java-gdchardwaremanagement/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_shortname": "gdchardwaremanagement", + "name_pretty": "GDC Hardware Management API", + "product_documentation": "https://cloud.google.com/distributed-cloud/edge/latest/docs", + "api_description": "Google Distributed Cloud connected allows you to run Kubernetes clusters on dedicated hardware provided and maintained by Google that is separate from the Google Cloud data center.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-gdchardwaremanagement/latest/overview", + "release_level": "preview", + "transport": "both", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-gdchardwaremanagement", + "distribution_name": "com.google.cloud:google-cloud-gdchardwaremanagement", + "api_id": "gdchardwaremanagement.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true, + "rpc_documentation": "https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/hardware/rpc" +} \ No newline at end of file diff --git a/java-gdchardwaremanagement/README.md b/java-gdchardwaremanagement/README.md new file mode 100644 index 000000000000..beaee56f7b25 --- /dev/null +++ b/java-gdchardwaremanagement/README.md @@ -0,0 +1,225 @@ +# Google GDC Hardware Management API Client for Java + +Java idiomatic client for [GDC Hardware Management 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.42.0 + pom + import + + + + + + + com.google.cloud + google-cloud-gdchardwaremanagement + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + + +```xml + + com.google.cloud + google-cloud-gdchardwaremanagement + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-gdchardwaremanagement:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-gdchardwaremanagement" % "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 GDC Hardware Management API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the GDC Hardware Management API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the GDC Hardware Management API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google GDC Hardware Management 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-gdchardwaremanagement` library. See the [Quickstart](#quickstart) section +to add `google-cloud-gdchardwaremanagement` as a dependency in your code. + +## About GDC Hardware Management API + + +[GDC Hardware Management API][product-docs] Google Distributed Cloud connected allows you to run Kubernetes clusters on dedicated hardware provided and maintained by Google that is separate from the Google Cloud data center. + +See the [GDC Hardware Management API client library docs][javadocs] to learn how to +use this GDC Hardware Management API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +GDC Hardware Management 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/distributed-cloud/edge/latest/docs +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-gdchardwaremanagement/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-gdchardwaremanagement.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gdchardwaremanagement/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=gdchardwaremanagement.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-gdchardwaremanagement/google-cloud-gdchardwaremanagement-bom/pom.xml b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement-bom/pom.xml new file mode 100644 index 000000000000..40b6b5412c4b --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement-bom/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + com.google.cloud + google-cloud-gdchardwaremanagement-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.40.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google GDC Hardware Management API BOM + + BOM for GDC Hardware Management API + + + + true + + + + + + com.google.cloud + google-cloud-gdchardwaremanagement + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-gdchardwaremanagement-v1alpha + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-gdchardwaremanagement-v1alpha + 0.0.1-SNAPSHOT + + + + diff --git a/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/pom.xml b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/pom.xml new file mode 100644 index 000000000000..2fe6b0c86c6c --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.cloud + google-cloud-gdchardwaremanagement + 0.0.1-SNAPSHOT + jar + Google GDC Hardware Management API + GDC Hardware Management API Google Distributed Cloud connected allows you to run Kubernetes clusters on dedicated hardware provided and maintained by Google that is separate from the Google Cloud data center. + + com.google.cloud + google-cloud-gdchardwaremanagement-parent + 0.0.1-SNAPSHOT + + + google-cloud-gdchardwaremanagement + + + + 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-gdchardwaremanagement-v1alpha + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + grpc-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + org.threeten + threetenbp + + + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-gdchardwaremanagement-v1alpha + 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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementClient.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementClient.java new file mode 100644 index 000000000000..b3c69ed25205 --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementClient.java @@ -0,0 +1,6728 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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.gdchardwaremanagement.v1alpha.stub.GDCHardwareManagementStub; +import com.google.cloud.gdchardwaremanagement.v1alpha.stub.GDCHardwareManagementStubSettings; +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 java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The GDC Hardware Management service. + * + *

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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+ *     GDCHardwareManagementClient.create()) {
+ *   OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+ *   Order response = gDCHardwareManagementClient.getOrder(name);
+ * }
+ * }
+ * + *

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

ListOrders

Lists orders in a given project and location.

+ *

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

+ *
    + *
  • listOrders(ListOrdersRequest request) + *

+ *

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

+ *
    + *
  • listOrders(LocationName parent) + *

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

+ *
    + *
  • listOrdersPagedCallable() + *

  • listOrdersCallable() + *

+ *

GetOrder

Gets details of an order.

+ *

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

+ *
    + *
  • getOrder(GetOrderRequest request) + *

+ *

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

+ *
    + *
  • getOrder(OrderName name) + *

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

+ *
    + *
  • getOrderCallable() + *

+ *

CreateOrder

Creates a new order in a given project and location.

+ *

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

+ *
    + *
  • createOrderAsync(CreateOrderRequest request) + *

+ *

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

+ *
    + *
  • createOrderAsync(LocationName parent, Order order, String orderId) + *

  • createOrderAsync(String parent, Order order, String orderId) + *

+ *

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

+ *
    + *
  • createOrderOperationCallable() + *

  • createOrderCallable() + *

+ *

UpdateOrder

Updates the parameters of an order.

+ *

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

+ *
    + *
  • updateOrderAsync(UpdateOrderRequest request) + *

+ *

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

+ *
    + *
  • updateOrderAsync(Order order, 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.

+ *
    + *
  • updateOrderOperationCallable() + *

  • updateOrderCallable() + *

+ *

DeleteOrder

Deletes an order.

+ *

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

+ *
    + *
  • deleteOrderAsync(DeleteOrderRequest request) + *

+ *

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

+ *
    + *
  • deleteOrderAsync(OrderName name) + *

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

+ *
    + *
  • deleteOrderOperationCallable() + *

  • deleteOrderCallable() + *

+ *

SubmitOrder

Submits an order.

+ *

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

+ *
    + *
  • submitOrderAsync(SubmitOrderRequest request) + *

+ *

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

+ *
    + *
  • submitOrderAsync(OrderName name) + *

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

+ *
    + *
  • submitOrderOperationCallable() + *

  • submitOrderCallable() + *

+ *

ListSites

Lists sites in a given project and location.

+ *

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

+ *
    + *
  • listSites(ListSitesRequest request) + *

+ *

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

+ *
    + *
  • listSites(LocationName parent) + *

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

+ *
    + *
  • listSitesPagedCallable() + *

  • listSitesCallable() + *

+ *

GetSite

Gets details of a site.

+ *

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

+ *
    + *
  • getSite(GetSiteRequest request) + *

+ *

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

+ *
    + *
  • getSite(SiteName name) + *

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

+ *
    + *
  • getSiteCallable() + *

+ *

CreateSite

Creates a new site in a given project and location.

+ *

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

+ *
    + *
  • createSiteAsync(CreateSiteRequest request) + *

+ *

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

+ *
    + *
  • createSiteAsync(LocationName parent, Site site, String siteId) + *

  • createSiteAsync(String parent, Site site, String siteId) + *

+ *

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

+ *
    + *
  • createSiteOperationCallable() + *

  • createSiteCallable() + *

+ *

UpdateSite

Updates the parameters of a site.

+ *

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

+ *
    + *
  • updateSiteAsync(UpdateSiteRequest request) + *

+ *

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

+ *
    + *
  • updateSiteAsync(Site site, 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.

+ *
    + *
  • updateSiteOperationCallable() + *

  • updateSiteCallable() + *

+ *

ListHardwareGroups

Lists hardware groups in a given order.

+ *

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

+ *
    + *
  • listHardwareGroups(ListHardwareGroupsRequest request) + *

+ *

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

+ *
    + *
  • listHardwareGroups(OrderName parent) + *

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

+ *
    + *
  • listHardwareGroupsPagedCallable() + *

  • listHardwareGroupsCallable() + *

+ *

GetHardwareGroup

Gets details of a hardware group.

+ *

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

+ *
    + *
  • getHardwareGroup(GetHardwareGroupRequest request) + *

+ *

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

+ *
    + *
  • getHardwareGroup(HardwareGroupName name) + *

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

+ *
    + *
  • getHardwareGroupCallable() + *

+ *

CreateHardwareGroup

Creates a new hardware group in a given order.

+ *

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

+ *
    + *
  • createHardwareGroupAsync(CreateHardwareGroupRequest request) + *

+ *

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

+ *
    + *
  • createHardwareGroupAsync(OrderName parent, HardwareGroup hardwareGroup, String hardwareGroupId) + *

  • createHardwareGroupAsync(String parent, HardwareGroup hardwareGroup, String hardwareGroupId) + *

+ *

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

+ *
    + *
  • createHardwareGroupOperationCallable() + *

  • createHardwareGroupCallable() + *

+ *

UpdateHardwareGroup

Updates the parameters of a hardware group.

+ *

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

+ *
    + *
  • updateHardwareGroupAsync(UpdateHardwareGroupRequest request) + *

+ *

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

+ *
    + *
  • updateHardwareGroupAsync(HardwareGroup hardwareGroup, 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.

+ *
    + *
  • updateHardwareGroupOperationCallable() + *

  • updateHardwareGroupCallable() + *

+ *

DeleteHardwareGroup

Deletes a hardware group.

+ *

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

+ *
    + *
  • deleteHardwareGroupAsync(DeleteHardwareGroupRequest request) + *

+ *

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

+ *
    + *
  • deleteHardwareGroupAsync(HardwareGroupName name) + *

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

+ *
    + *
  • deleteHardwareGroupOperationCallable() + *

  • deleteHardwareGroupCallable() + *

+ *

ListHardware

Lists hardware in a given project and location.

+ *

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

+ *
    + *
  • listHardware(ListHardwareRequest request) + *

+ *

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

+ *
    + *
  • listHardware(LocationName parent) + *

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

+ *
    + *
  • listHardwarePagedCallable() + *

  • listHardwareCallable() + *

+ *

GetHardware

Gets hardware details.

+ *

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

+ *
    + *
  • getHardware(GetHardwareRequest request) + *

+ *

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

+ *
    + *
  • getHardware(HardwareName name) + *

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

+ *
    + *
  • getHardwareCallable() + *

+ *

CreateHardware

Creates new hardware in a given project and location.

+ *

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

+ *
    + *
  • createHardwareAsync(CreateHardwareRequest request) + *

+ *

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

+ *
    + *
  • createHardwareAsync(LocationName parent, Hardware hardware, String hardwareId) + *

  • createHardwareAsync(String parent, Hardware hardware, String hardwareId) + *

+ *

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

+ *
    + *
  • createHardwareOperationCallable() + *

  • createHardwareCallable() + *

+ *

UpdateHardware

Updates hardware parameters.

+ *

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

+ *
    + *
  • updateHardwareAsync(UpdateHardwareRequest request) + *

+ *

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

+ *
    + *
  • updateHardwareAsync(Hardware hardware, 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.

+ *
    + *
  • updateHardwareOperationCallable() + *

  • updateHardwareCallable() + *

+ *

DeleteHardware

Deletes hardware.

+ *

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

+ *
    + *
  • deleteHardwareAsync(DeleteHardwareRequest request) + *

+ *

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

+ *
    + *
  • deleteHardwareAsync(HardwareName name) + *

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

+ *
    + *
  • deleteHardwareOperationCallable() + *

  • deleteHardwareCallable() + *

+ *

ListComments

Lists the comments on an order.

+ *

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

+ *
    + *
  • listComments(ListCommentsRequest request) + *

+ *

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

+ *
    + *
  • listComments(OrderName parent) + *

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

+ *
    + *
  • listCommentsPagedCallable() + *

  • listCommentsCallable() + *

+ *

GetComment

Gets the content of a comment.

+ *

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

+ *
    + *
  • getComment(GetCommentRequest request) + *

+ *

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

+ *
    + *
  • getComment(CommentName name) + *

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

+ *
    + *
  • getCommentCallable() + *

+ *

CreateComment

Creates a new comment on an order.

+ *

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

+ *
    + *
  • createCommentAsync(CreateCommentRequest request) + *

+ *

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

+ *
    + *
  • createCommentAsync(OrderName parent, Comment comment, String commentId) + *

  • createCommentAsync(String parent, Comment comment, String commentId) + *

+ *

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

+ *
    + *
  • createCommentOperationCallable() + *

  • createCommentCallable() + *

+ *

ListChangeLogEntries

Lists the changes made to an order.

+ *

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

+ *
    + *
  • listChangeLogEntries(ListChangeLogEntriesRequest request) + *

+ *

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

+ *
    + *
  • listChangeLogEntries(OrderName parent) + *

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

+ *
    + *
  • listChangeLogEntriesPagedCallable() + *

  • listChangeLogEntriesCallable() + *

+ *

GetChangeLogEntry

Gets details of a change to an order.

+ *

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

+ *
    + *
  • getChangeLogEntry(GetChangeLogEntryRequest request) + *

+ *

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

+ *
    + *
  • getChangeLogEntry(ChangeLogEntryName name) + *

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

+ *
    + *
  • getChangeLogEntryCallable() + *

+ *

ListSkus

Lists SKUs for a given project and location.

+ *

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

+ *
    + *
  • listSkus(ListSkusRequest request) + *

+ *

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

+ *
    + *
  • listSkus(LocationName parent) + *

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

+ *
    + *
  • listSkusPagedCallable() + *

  • listSkusCallable() + *

+ *

GetSku

Gets details of an SKU.

+ *

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

+ *
    + *
  • getSku(GetSkuRequest request) + *

+ *

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

+ *
    + *
  • getSku(SkuName name) + *

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

+ *
    + *
  • getSkuCallable() + *

+ *

ListZones

Lists zones in a given project and location.

+ *

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

+ *
    + *
  • listZones(ListZonesRequest request) + *

+ *

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

+ *
    + *
  • listZones(LocationName parent) + *

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

+ *
    + *
  • listZonesPagedCallable() + *

  • listZonesCallable() + *

+ *

GetZone

Gets details of a zone.

+ *

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

+ *
    + *
  • getZone(GetZoneRequest request) + *

+ *

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

+ *
    + *
  • getZone(ZoneName name) + *

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

+ *
    + *
  • getZoneCallable() + *

+ *

CreateZone

Creates a new zone in a given project and location.

+ *

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

+ *
    + *
  • createZoneAsync(CreateZoneRequest request) + *

+ *

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

+ *
    + *
  • createZoneAsync(LocationName parent, Zone zone, String zoneId) + *

  • createZoneAsync(String parent, Zone zone, String zoneId) + *

+ *

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

+ *
    + *
  • createZoneOperationCallable() + *

  • createZoneCallable() + *

+ *

UpdateZone

Updates the parameters of a zone.

+ *

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

+ *
    + *
  • updateZoneAsync(UpdateZoneRequest request) + *

+ *

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

+ *
    + *
  • updateZoneAsync(Zone zone, 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.

+ *
    + *
  • updateZoneOperationCallable() + *

  • updateZoneCallable() + *

+ *

DeleteZone

Deletes a zone.

+ *

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

+ *
    + *
  • deleteZoneAsync(DeleteZoneRequest request) + *

+ *

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

+ *
    + *
  • deleteZoneAsync(ZoneName name) + *

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

+ *
    + *
  • deleteZoneOperationCallable() + *

  • deleteZoneCallable() + *

+ *

SignalZoneState

Signals the state of a zone.

+ *

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

+ *
    + *
  • signalZoneStateAsync(SignalZoneStateRequest request) + *

+ *

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

+ *
    + *
  • signalZoneStateAsync(ZoneName name, SignalZoneStateRequest.StateSignal stateSignal) + *

  • signalZoneStateAsync(String name, SignalZoneStateRequest.StateSignal stateSignal) + *

+ *

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

+ *
    + *
  • signalZoneStateOperationCallable() + *

  • signalZoneStateCallable() + *

+ *

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 GDCHardwareManagementSettings + * 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
+ * GDCHardwareManagementSettings gDCHardwareManagementSettings =
+ *     GDCHardwareManagementSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * GDCHardwareManagementClient gDCHardwareManagementClient =
+ *     GDCHardwareManagementClient.create(gDCHardwareManagementSettings);
+ * }
+ * + *

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
+ * GDCHardwareManagementSettings gDCHardwareManagementSettings =
+ *     GDCHardwareManagementSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * GDCHardwareManagementClient gDCHardwareManagementClient =
+ *     GDCHardwareManagementClient.create(gDCHardwareManagementSettings);
+ * }
+ * + *

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
+ * GDCHardwareManagementSettings gDCHardwareManagementSettings =
+ *     GDCHardwareManagementSettings.newHttpJsonBuilder().build();
+ * GDCHardwareManagementClient gDCHardwareManagementClient =
+ *     GDCHardwareManagementClient.create(gDCHardwareManagementSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GDCHardwareManagementClient implements BackgroundResource { + private final GDCHardwareManagementSettings settings; + private final GDCHardwareManagementStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of GDCHardwareManagementClient with default settings. */ + public static final GDCHardwareManagementClient create() throws IOException { + return create(GDCHardwareManagementSettings.newBuilder().build()); + } + + /** + * Constructs an instance of GDCHardwareManagementClient, 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 GDCHardwareManagementClient create(GDCHardwareManagementSettings settings) + throws IOException { + return new GDCHardwareManagementClient(settings); + } + + /** + * Constructs an instance of GDCHardwareManagementClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(GDCHardwareManagementSettings). + */ + public static final GDCHardwareManagementClient create(GDCHardwareManagementStub stub) { + return new GDCHardwareManagementClient(stub); + } + + /** + * Constructs an instance of GDCHardwareManagementClient, 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 GDCHardwareManagementClient(GDCHardwareManagementSettings settings) throws IOException { + this.settings = settings; + this.stub = ((GDCHardwareManagementStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected GDCHardwareManagementClient(GDCHardwareManagementStub 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 GDCHardwareManagementSettings getSettings() { + return settings; + } + + public GDCHardwareManagementStub 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 orders 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Order element : gDCHardwareManagementClient.listOrders(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list orders in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOrdersPagedResponse listOrders(LocationName parent) { + ListOrdersRequest request = + ListOrdersRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listOrders(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists orders 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Order element : gDCHardwareManagementClient.listOrders(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list orders in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOrdersPagedResponse listOrders(String parent) { + ListOrdersRequest request = ListOrdersRequest.newBuilder().setParent(parent).build(); + return listOrders(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists orders 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListOrdersRequest request =
+   *       ListOrdersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Order element : gDCHardwareManagementClient.listOrders(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 ListOrdersPagedResponse listOrders(ListOrdersRequest request) { + return listOrdersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists orders 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListOrdersRequest request =
+   *       ListOrdersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.listOrdersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Order element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listOrdersPagedCallable() { + return stub.listOrdersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists orders 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListOrdersRequest request =
+   *       ListOrdersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListOrdersResponse response =
+   *         gDCHardwareManagementClient.listOrdersCallable().call(request);
+   *     for (Order element : response.getOrdersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listOrdersCallable() { + return stub.listOrdersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of an order. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   GetOrderRequest request =
+   *       GetOrderRequest.newBuilder()
+   *           .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .build();
+   *   ApiFuture future = gDCHardwareManagementClient.getOrderCallable().futureCall(request);
+   *   // Do something.
+   *   Order response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getOrderCallable() { + return stub.getOrderCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new order 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Order order = Order.newBuilder().build();
+   *   String orderId = "orderId-1207110391";
+   *   Order response = gDCHardwareManagementClient.createOrderAsync(parent, order, orderId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create the order in. Format: + * `projects/{project}/locations/{location}` + * @param order Required. The order to create. + * @param orderId Optional. ID used to uniquely identify the Order within its parent scope. This + * field should contain at most 63 characters and must start with lowercase characters. Only + * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first + * or the last one. A system generated ID will be used if the field is not set. + *

The order.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createOrderAsync( + LocationName parent, Order order, String orderId) { + CreateOrderRequest request = + CreateOrderRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setOrder(order) + .setOrderId(orderId) + .build(); + return createOrderAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new order 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Order order = Order.newBuilder().build();
+   *   String orderId = "orderId-1207110391";
+   *   Order response = gDCHardwareManagementClient.createOrderAsync(parent, order, orderId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create the order in. Format: + * `projects/{project}/locations/{location}` + * @param order Required. The order to create. + * @param orderId Optional. ID used to uniquely identify the Order within its parent scope. This + * field should contain at most 63 characters and must start with lowercase characters. Only + * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first + * or the last one. A system generated ID will be used if the field is not set. + *

The order.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createOrderAsync( + String parent, Order order, String orderId) { + CreateOrderRequest request = + CreateOrderRequest.newBuilder() + .setParent(parent) + .setOrder(order) + .setOrderId(orderId) + .build(); + return createOrderAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new order 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateOrderRequest request =
+   *       CreateOrderRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setOrderId("orderId-1207110391")
+   *           .setOrder(Order.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Order response = gDCHardwareManagementClient.createOrderAsync(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 createOrderAsync( + CreateOrderRequest request) { + return createOrderOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new order 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateOrderRequest request =
+   *       CreateOrderRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setOrderId("orderId-1207110391")
+   *           .setOrder(Order.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       gDCHardwareManagementClient.createOrderOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Order response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createOrderOperationCallable() { + return stub.createOrderOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new order 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateOrderRequest request =
+   *       CreateOrderRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setOrderId("orderId-1207110391")
+   *           .setOrder(Order.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.createOrderCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createOrderCallable() { + return stub.createOrderCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   Order order = Order.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Order response = gDCHardwareManagementClient.updateOrderAsync(order, updateMask).get();
+   * }
+   * }
+ * + * @param order Required. The order to update. + * @param updateMask Required. A mask to specify the fields in the Order to overwrite with this + * update. The fields specified in the update_mask are relative to the order, not the full + * request. A field will be overwritten if it is in the mask. If you don't provide a mask then + * all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateOrderAsync( + Order order, FieldMask updateMask) { + UpdateOrderRequest request = + UpdateOrderRequest.newBuilder().setOrder(order).setUpdateMask(updateMask).build(); + return updateOrderAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   UpdateOrderRequest request =
+   *       UpdateOrderRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setOrder(Order.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Order response = gDCHardwareManagementClient.updateOrderAsync(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 updateOrderAsync( + UpdateOrderRequest request) { + return updateOrderOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of an order. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+   *   gDCHardwareManagementClient.deleteOrderAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the order. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteOrderAsync(OrderName name) { + DeleteOrderRequest request = + DeleteOrderRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteOrderAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+   *   gDCHardwareManagementClient.deleteOrderAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the order. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteOrderAsync(String name) { + DeleteOrderRequest request = DeleteOrderRequest.newBuilder().setName(name).build(); + return deleteOrderAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   DeleteOrderRequest request =
+   *       DeleteOrderRequest.newBuilder()
+   *           .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   gDCHardwareManagementClient.deleteOrderAsync(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 deleteOrderAsync( + DeleteOrderRequest request) { + return deleteOrderOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an order. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+   *   Order response = gDCHardwareManagementClient.submitOrderAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the order. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture submitOrderAsync(OrderName name) { + SubmitOrderRequest request = + SubmitOrderRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return submitOrderAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Submits an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+   *   Order response = gDCHardwareManagementClient.submitOrderAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the order. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture submitOrderAsync(String name) { + SubmitOrderRequest request = SubmitOrderRequest.newBuilder().setName(name).build(); + return submitOrderAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Submits an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   SubmitOrderRequest request =
+   *       SubmitOrderRequest.newBuilder()
+   *           .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Order response = gDCHardwareManagementClient.submitOrderAsync(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 submitOrderAsync( + SubmitOrderRequest request) { + return submitOrderOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Submits an order. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   SubmitOrderRequest request =
+   *       SubmitOrderRequest.newBuilder()
+   *           .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.submitOrderCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable submitOrderCallable() { + return stub.submitOrderCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists sites 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Site element : gDCHardwareManagementClient.listSites(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list sites in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSitesPagedResponse listSites(LocationName parent) { + ListSitesRequest request = + ListSitesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listSites(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists sites 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Site element : gDCHardwareManagementClient.listSites(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list sites in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSitesPagedResponse listSites(String parent) { + ListSitesRequest request = ListSitesRequest.newBuilder().setParent(parent).build(); + return listSites(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists sites 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListSitesRequest request =
+   *       ListSitesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Site element : gDCHardwareManagementClient.listSites(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 ListSitesPagedResponse listSites(ListSitesRequest request) { + return listSitesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists sites 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListSitesRequest request =
+   *       ListSitesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.listSitesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Site element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSitesPagedCallable() { + return stub.listSitesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists sites 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListSitesRequest request =
+   *       ListSitesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListSitesResponse response = gDCHardwareManagementClient.listSitesCallable().call(request);
+   *     for (Site element : response.getSitesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSitesCallable() { + return stub.listSitesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a site. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   SiteName name = SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]");
+   *   Site response = gDCHardwareManagementClient.getSite(name);
+   * }
+   * }
+ * + * @param name Required. The name of the site. Format: + * `projects/{project}/locations/{location}/sites/{site}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Site getSite(SiteName name) { + GetSiteRequest request = + GetSiteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSite(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a site. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name = SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString();
+   *   Site response = gDCHardwareManagementClient.getSite(name);
+   * }
+   * }
+ * + * @param name Required. The name of the site. Format: + * `projects/{project}/locations/{location}/sites/{site}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Site getSite(String name) { + GetSiteRequest request = GetSiteRequest.newBuilder().setName(name).build(); + return getSite(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a site. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   GetSiteRequest request =
+   *       GetSiteRequest.newBuilder()
+   *           .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString())
+   *           .build();
+   *   ApiFuture future = gDCHardwareManagementClient.getSiteCallable().futureCall(request);
+   *   // Do something.
+   *   Site response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSiteCallable() { + return stub.getSiteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new site 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Site site = Site.newBuilder().build();
+   *   String siteId = "siteId-902090046";
+   *   Site response = gDCHardwareManagementClient.createSiteAsync(parent, site, siteId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create the site in. Format: + * `projects/{project}/locations/{location}` + * @param site Required. The site to create. + * @param siteId Optional. ID used to uniquely identify the Site within its parent scope. This + * field should contain at most 63 characters and must start with lowercase characters. Only + * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first + * or the last one. A system generated ID will be used if the field is not set. + *

The site.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSiteAsync( + LocationName parent, Site site, String siteId) { + CreateSiteRequest request = + CreateSiteRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSite(site) + .setSiteId(siteId) + .build(); + return createSiteAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new site 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Site site = Site.newBuilder().build();
+   *   String siteId = "siteId-902090046";
+   *   Site response = gDCHardwareManagementClient.createSiteAsync(parent, site, siteId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create the site in. Format: + * `projects/{project}/locations/{location}` + * @param site Required. The site to create. + * @param siteId Optional. ID used to uniquely identify the Site within its parent scope. This + * field should contain at most 63 characters and must start with lowercase characters. Only + * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first + * or the last one. A system generated ID will be used if the field is not set. + *

The site.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSiteAsync( + String parent, Site site, String siteId) { + CreateSiteRequest request = + CreateSiteRequest.newBuilder().setParent(parent).setSite(site).setSiteId(siteId).build(); + return createSiteAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new site 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateSiteRequest request =
+   *       CreateSiteRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSiteId("siteId-902090046")
+   *           .setSite(Site.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Site response = gDCHardwareManagementClient.createSiteAsync(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 createSiteAsync(CreateSiteRequest request) { + return createSiteOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new site 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateSiteRequest request =
+   *       CreateSiteRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSiteId("siteId-902090046")
+   *           .setSite(Site.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       gDCHardwareManagementClient.createSiteOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Site response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createSiteOperationCallable() { + return stub.createSiteOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new site 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateSiteRequest request =
+   *       CreateSiteRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSiteId("siteId-902090046")
+   *           .setSite(Site.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.createSiteCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createSiteCallable() { + return stub.createSiteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a site. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   Site site = Site.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Site response = gDCHardwareManagementClient.updateSiteAsync(site, updateMask).get();
+   * }
+   * }
+ * + * @param site Required. The site to update. + * @param updateMask Required. A mask to specify the fields in the Site to overwrite with this + * update. The fields specified in the update_mask are relative to the site, not the full + * request. A field will be overwritten if it is in the mask. If you don't provide a mask then + * all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSiteAsync( + Site site, FieldMask updateMask) { + UpdateSiteRequest request = + UpdateSiteRequest.newBuilder().setSite(site).setUpdateMask(updateMask).build(); + return updateSiteAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a site. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   UpdateSiteRequest request =
+   *       UpdateSiteRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSite(Site.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Site response = gDCHardwareManagementClient.updateSiteAsync(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 updateSiteAsync(UpdateSiteRequest request) { + return updateSiteOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a site. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+   *   for (HardwareGroup element :
+   *       gDCHardwareManagementClient.listHardwareGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The order to list hardware groups in. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHardwareGroupsPagedResponse listHardwareGroups(OrderName parent) { + ListHardwareGroupsRequest request = + ListHardwareGroupsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listHardwareGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists hardware groups in a given order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+   *   for (HardwareGroup element :
+   *       gDCHardwareManagementClient.listHardwareGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The order to list hardware groups in. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHardwareGroupsPagedResponse listHardwareGroups(String parent) { + ListHardwareGroupsRequest request = + ListHardwareGroupsRequest.newBuilder().setParent(parent).build(); + return listHardwareGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists hardware groups in a given order. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   HardwareGroupName name =
+   *       HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]");
+   *   HardwareGroup response = gDCHardwareManagementClient.getHardwareGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the hardware group. Format: + * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HardwareGroup getHardwareGroup(HardwareGroupName name) { + GetHardwareGroupRequest request = + GetHardwareGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getHardwareGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a hardware group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name =
+   *       HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]").toString();
+   *   HardwareGroup response = gDCHardwareManagementClient.getHardwareGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the hardware group. Format: + * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HardwareGroup getHardwareGroup(String name) { + GetHardwareGroupRequest request = GetHardwareGroupRequest.newBuilder().setName(name).build(); + return getHardwareGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a hardware group. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+   *   HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build();
+   *   String hardwareGroupId = "hardwareGroupId-1961682702";
+   *   HardwareGroup response =
+   *       gDCHardwareManagementClient
+   *           .createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The order to create the hardware group in. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @param hardwareGroup Required. The hardware group to create. + * @param hardwareGroupId Optional. ID used to uniquely identify the HardwareGroup within its + * parent scope. This field should contain at most 63 characters and must start with lowercase + * characters. Only lowercase characters, numbers and `-` are accepted. The `-` character + * cannot be the first or the last one. A system generated ID will be used if the field is not + * set. + *

The hardware_group.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createHardwareGroupAsync( + OrderName parent, HardwareGroup hardwareGroup, String hardwareGroupId) { + CreateHardwareGroupRequest request = + CreateHardwareGroupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setHardwareGroup(hardwareGroup) + .setHardwareGroupId(hardwareGroupId) + .build(); + return createHardwareGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new hardware group in a given order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+   *   HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build();
+   *   String hardwareGroupId = "hardwareGroupId-1961682702";
+   *   HardwareGroup response =
+   *       gDCHardwareManagementClient
+   *           .createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The order to create the hardware group in. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @param hardwareGroup Required. The hardware group to create. + * @param hardwareGroupId Optional. ID used to uniquely identify the HardwareGroup within its + * parent scope. This field should contain at most 63 characters and must start with lowercase + * characters. Only lowercase characters, numbers and `-` are accepted. The `-` character + * cannot be the first or the last one. A system generated ID will be used if the field is not + * set. + *

The hardware_group.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createHardwareGroupAsync( + String parent, HardwareGroup hardwareGroup, String hardwareGroupId) { + CreateHardwareGroupRequest request = + CreateHardwareGroupRequest.newBuilder() + .setParent(parent) + .setHardwareGroup(hardwareGroup) + .setHardwareGroupId(hardwareGroupId) + .build(); + return createHardwareGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new hardware group in a given order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateHardwareGroupRequest request =
+   *       CreateHardwareGroupRequest.newBuilder()
+   *           .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .setHardwareGroupId("hardwareGroupId-1961682702")
+   *           .setHardwareGroup(HardwareGroup.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   HardwareGroup response = gDCHardwareManagementClient.createHardwareGroupAsync(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 createHardwareGroupAsync( + CreateHardwareGroupRequest request) { + return createHardwareGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new hardware group in a given order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateHardwareGroupRequest request =
+   *       CreateHardwareGroupRequest.newBuilder()
+   *           .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .setHardwareGroupId("hardwareGroupId-1961682702")
+   *           .setHardwareGroup(HardwareGroup.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       gDCHardwareManagementClient.createHardwareGroupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   HardwareGroup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createHardwareGroupOperationCallable() { + return stub.createHardwareGroupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new hardware group in a given order. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   HardwareGroup response =
+   *       gDCHardwareManagementClient.updateHardwareGroupAsync(hardwareGroup, updateMask).get();
+   * }
+   * }
+ * + * @param hardwareGroup Required. The hardware group to update. + * @param updateMask Required. A mask to specify the fields in the HardwareGroup to overwrite with + * this update. The fields specified in the update_mask are relative to the hardware group, + * not the full request. A field will be overwritten if it is in the mask. If you don't + * provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateHardwareGroupAsync( + HardwareGroup hardwareGroup, FieldMask updateMask) { + UpdateHardwareGroupRequest request = + UpdateHardwareGroupRequest.newBuilder() + .setHardwareGroup(hardwareGroup) + .setUpdateMask(updateMask) + .build(); + return updateHardwareGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a hardware group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   UpdateHardwareGroupRequest request =
+   *       UpdateHardwareGroupRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setHardwareGroup(HardwareGroup.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   HardwareGroup response = gDCHardwareManagementClient.updateHardwareGroupAsync(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 updateHardwareGroupAsync( + UpdateHardwareGroupRequest request) { + return updateHardwareGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a hardware group. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   HardwareGroupName name =
+   *       HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]");
+   *   gDCHardwareManagementClient.deleteHardwareGroupAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hardware group. Format: + * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteHardwareGroupAsync( + HardwareGroupName name) { + DeleteHardwareGroupRequest request = + DeleteHardwareGroupRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteHardwareGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a hardware group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name =
+   *       HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]").toString();
+   *   gDCHardwareManagementClient.deleteHardwareGroupAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hardware group. Format: + * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteHardwareGroupAsync(String name) { + DeleteHardwareGroupRequest request = + DeleteHardwareGroupRequest.newBuilder().setName(name).build(); + return deleteHardwareGroupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a hardware group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   DeleteHardwareGroupRequest request =
+   *       DeleteHardwareGroupRequest.newBuilder()
+   *           .setName(
+   *               HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   gDCHardwareManagementClient.deleteHardwareGroupAsync(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 deleteHardwareGroupAsync( + DeleteHardwareGroupRequest request) { + return deleteHardwareGroupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a hardware group. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   DeleteHardwareGroupRequest request =
+   *       DeleteHardwareGroupRequest.newBuilder()
+   *           .setName(
+   *               HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.deleteHardwareGroupCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteHardwareGroupCallable() { + return stub.deleteHardwareGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists hardware 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Hardware element : gDCHardwareManagementClient.listHardware(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list hardware in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHardwarePagedResponse listHardware(LocationName parent) { + ListHardwareRequest request = + ListHardwareRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listHardware(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists hardware 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Hardware element : gDCHardwareManagementClient.listHardware(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list hardware in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHardwarePagedResponse listHardware(String parent) { + ListHardwareRequest request = ListHardwareRequest.newBuilder().setParent(parent).build(); + return listHardware(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists hardware 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListHardwareRequest request =
+   *       ListHardwareRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Hardware element : gDCHardwareManagementClient.listHardware(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 ListHardwarePagedResponse listHardware(ListHardwareRequest request) { + return listHardwarePagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists hardware 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListHardwareRequest request =
+   *       ListHardwareRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.listHardwarePagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Hardware element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listHardwarePagedCallable() { + return stub.listHardwarePagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists hardware 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListHardwareRequest request =
+   *       ListHardwareRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListHardwareResponse response =
+   *         gDCHardwareManagementClient.listHardwareCallable().call(request);
+   *     for (Hardware element : response.getHardwareList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listHardwareCallable() { + return stub.listHardwareCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets hardware details. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   GetHardwareRequest request =
+   *       GetHardwareRequest.newBuilder()
+   *           .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.getHardwareCallable().futureCall(request);
+   *   // Do something.
+   *   Hardware response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getHardwareCallable() { + return stub.getHardwareCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new hardware 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Hardware hardware = Hardware.newBuilder().build();
+   *   String hardwareId = "hardwareId680924451";
+   *   Hardware response =
+   *       gDCHardwareManagementClient.createHardwareAsync(parent, hardware, hardwareId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create hardware in. Format: + * `projects/{project}/locations/{location}` + * @param hardware Required. The resource to create. + * @param hardwareId Optional. ID used to uniquely identify the Hardware within its parent scope. + * This field should contain at most 63 characters and must start with lowercase characters. + * Only lowercase characters, numbers and `-` are accepted. The `-` character cannot be the + * first or the last one. A system generated ID will be used if the field is not set. + *

The hardware.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createHardwareAsync( + LocationName parent, Hardware hardware, String hardwareId) { + CreateHardwareRequest request = + CreateHardwareRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setHardware(hardware) + .setHardwareId(hardwareId) + .build(); + return createHardwareAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new hardware 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Hardware hardware = Hardware.newBuilder().build();
+   *   String hardwareId = "hardwareId680924451";
+   *   Hardware response =
+   *       gDCHardwareManagementClient.createHardwareAsync(parent, hardware, hardwareId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create hardware in. Format: + * `projects/{project}/locations/{location}` + * @param hardware Required. The resource to create. + * @param hardwareId Optional. ID used to uniquely identify the Hardware within its parent scope. + * This field should contain at most 63 characters and must start with lowercase characters. + * Only lowercase characters, numbers and `-` are accepted. The `-` character cannot be the + * first or the last one. A system generated ID will be used if the field is not set. + *

The hardware.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createHardwareAsync( + String parent, Hardware hardware, String hardwareId) { + CreateHardwareRequest request = + CreateHardwareRequest.newBuilder() + .setParent(parent) + .setHardware(hardware) + .setHardwareId(hardwareId) + .build(); + return createHardwareAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new hardware 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateHardwareRequest request =
+   *       CreateHardwareRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setHardwareId("hardwareId680924451")
+   *           .setHardware(Hardware.newBuilder().build())
+   *           .build();
+   *   Hardware response = gDCHardwareManagementClient.createHardwareAsync(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 createHardwareAsync( + CreateHardwareRequest request) { + return createHardwareOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new hardware 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateHardwareRequest request =
+   *       CreateHardwareRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setHardwareId("hardwareId680924451")
+   *           .setHardware(Hardware.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       gDCHardwareManagementClient.createHardwareOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Hardware response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createHardwareOperationCallable() { + return stub.createHardwareOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new hardware 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateHardwareRequest request =
+   *       CreateHardwareRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setHardwareId("hardwareId680924451")
+   *           .setHardware(Hardware.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.createHardwareCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createHardwareCallable() { + return stub.createHardwareCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates hardware parameters. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   Hardware hardware = Hardware.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Hardware response =
+   *       gDCHardwareManagementClient.updateHardwareAsync(hardware, updateMask).get();
+   * }
+   * }
+ * + * @param hardware Required. The hardware to update. + * @param updateMask Required. A mask to specify the fields in the Hardware to overwrite with this + * update. The fields specified in the update_mask are relative to the hardware, not the full + * request. A field will be overwritten if it is in the mask. If you don't provide a mask then + * all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateHardwareAsync( + Hardware hardware, FieldMask updateMask) { + UpdateHardwareRequest request = + UpdateHardwareRequest.newBuilder().setHardware(hardware).setUpdateMask(updateMask).build(); + return updateHardwareAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates hardware parameters. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   UpdateHardwareRequest request =
+   *       UpdateHardwareRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setHardware(Hardware.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Hardware response = gDCHardwareManagementClient.updateHardwareAsync(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 updateHardwareAsync( + UpdateHardwareRequest request) { + return updateHardwareOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates hardware parameters. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   DeleteHardwareRequest request =
+   *       DeleteHardwareRequest.newBuilder()
+   *           .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   gDCHardwareManagementClient.deleteHardwareAsync(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 deleteHardwareAsync( + DeleteHardwareRequest request) { + return deleteHardwareOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes hardware. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+   *   for (Comment element : gDCHardwareManagementClient.listComments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The order to list comments on. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCommentsPagedResponse listComments(OrderName parent) { + ListCommentsRequest request = + ListCommentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listComments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the comments on an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+   *   for (Comment element : gDCHardwareManagementClient.listComments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The order to list comments on. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCommentsPagedResponse listComments(String parent) { + ListCommentsRequest request = ListCommentsRequest.newBuilder().setParent(parent).build(); + return listComments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the comments on an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListCommentsRequest request =
+   *       ListCommentsRequest.newBuilder()
+   *           .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Comment element : gDCHardwareManagementClient.listComments(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 ListCommentsPagedResponse listComments(ListCommentsRequest request) { + return listCommentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the comments on an order. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CommentName name = CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]");
+   *   Comment response = gDCHardwareManagementClient.getComment(name);
+   * }
+   * }
+ * + * @param name Required. The name of the comment. Format: + * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Comment getComment(CommentName name) { + GetCommentRequest request = + GetCommentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getComment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the content of a comment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name = CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString();
+   *   Comment response = gDCHardwareManagementClient.getComment(name);
+   * }
+   * }
+ * + * @param name Required. The name of the comment. Format: + * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Comment getComment(String name) { + GetCommentRequest request = GetCommentRequest.newBuilder().setName(name).build(); + return getComment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the content of a comment. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+   *   Comment comment = Comment.newBuilder().build();
+   *   String commentId = "commentId-1495016486";
+   *   Comment response =
+   *       gDCHardwareManagementClient.createCommentAsync(parent, comment, commentId).get();
+   * }
+   * }
+ * + * @param parent Required. The order to create the comment on. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @param comment Required. The comment to create. + * @param commentId Optional. ID used to uniquely identify the Comment within its parent scope. + * This field should contain at most 63 characters and must start with lowercase characters. + * Only lowercase characters, numbers and `-` are accepted. The `-` character cannot be the + * first or the last one. A system generated ID will be used if the field is not set. + *

The comment.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCommentAsync( + OrderName parent, Comment comment, String commentId) { + CreateCommentRequest request = + CreateCommentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setComment(comment) + .setCommentId(commentId) + .build(); + return createCommentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new comment on an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+   *   Comment comment = Comment.newBuilder().build();
+   *   String commentId = "commentId-1495016486";
+   *   Comment response =
+   *       gDCHardwareManagementClient.createCommentAsync(parent, comment, commentId).get();
+   * }
+   * }
+ * + * @param parent Required. The order to create the comment on. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @param comment Required. The comment to create. + * @param commentId Optional. ID used to uniquely identify the Comment within its parent scope. + * This field should contain at most 63 characters and must start with lowercase characters. + * Only lowercase characters, numbers and `-` are accepted. The `-` character cannot be the + * first or the last one. A system generated ID will be used if the field is not set. + *

The comment.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCommentAsync( + String parent, Comment comment, String commentId) { + CreateCommentRequest request = + CreateCommentRequest.newBuilder() + .setParent(parent) + .setComment(comment) + .setCommentId(commentId) + .build(); + return createCommentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new comment on an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateCommentRequest request =
+   *       CreateCommentRequest.newBuilder()
+   *           .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .setCommentId("commentId-1495016486")
+   *           .setComment(Comment.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Comment response = gDCHardwareManagementClient.createCommentAsync(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 createCommentAsync( + CreateCommentRequest request) { + return createCommentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new comment on an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateCommentRequest request =
+   *       CreateCommentRequest.newBuilder()
+   *           .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .setCommentId("commentId-1495016486")
+   *           .setComment(Comment.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       gDCHardwareManagementClient.createCommentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Comment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createCommentOperationCallable() { + return stub.createCommentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new comment on an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateCommentRequest request =
+   *       CreateCommentRequest.newBuilder()
+   *           .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .setCommentId("commentId-1495016486")
+   *           .setComment(Comment.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.createCommentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createCommentCallable() { + return stub.createCommentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the changes made to an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+   *   for (ChangeLogEntry element :
+   *       gDCHardwareManagementClient.listChangeLogEntries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The order to list change log entries for. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListChangeLogEntriesPagedResponse listChangeLogEntries(OrderName parent) { + ListChangeLogEntriesRequest request = + ListChangeLogEntriesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listChangeLogEntries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the changes made to an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+   *   for (ChangeLogEntry element :
+   *       gDCHardwareManagementClient.listChangeLogEntries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The order to list change log entries for. Format: + * `projects/{project}/locations/{location}/orders/{order}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListChangeLogEntriesPagedResponse listChangeLogEntries(String parent) { + ListChangeLogEntriesRequest request = + ListChangeLogEntriesRequest.newBuilder().setParent(parent).build(); + return listChangeLogEntries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the changes made to an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListChangeLogEntriesRequest request =
+   *       ListChangeLogEntriesRequest.newBuilder()
+   *           .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (ChangeLogEntry element :
+   *       gDCHardwareManagementClient.listChangeLogEntries(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 ListChangeLogEntriesPagedResponse listChangeLogEntries( + ListChangeLogEntriesRequest request) { + return listChangeLogEntriesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the changes made to an order. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ChangeLogEntryName name =
+   *       ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]");
+   *   ChangeLogEntry response = gDCHardwareManagementClient.getChangeLogEntry(name);
+   * }
+   * }
+ * + * @param name Required. The name of the change log entry. Format: + * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ChangeLogEntry getChangeLogEntry(ChangeLogEntryName name) { + GetChangeLogEntryRequest request = + GetChangeLogEntryRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getChangeLogEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a change to an order. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name =
+   *       ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]")
+   *           .toString();
+   *   ChangeLogEntry response = gDCHardwareManagementClient.getChangeLogEntry(name);
+   * }
+   * }
+ * + * @param name Required. The name of the change log entry. Format: + * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ChangeLogEntry getChangeLogEntry(String name) { + GetChangeLogEntryRequest request = GetChangeLogEntryRequest.newBuilder().setName(name).build(); + return getChangeLogEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a change to an order. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   GetChangeLogEntryRequest request =
+   *       GetChangeLogEntryRequest.newBuilder()
+   *           .setName(
+   *               ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.getChangeLogEntryCallable().futureCall(request);
+   *   // Do something.
+   *   ChangeLogEntry response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getChangeLogEntryCallable() { + return stub.getChangeLogEntryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SKUs for 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Sku element : gDCHardwareManagementClient.listSkus(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list SKUs in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSkusPagedResponse listSkus(LocationName parent) { + ListSkusRequest request = + ListSkusRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listSkus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SKUs for 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Sku element : gDCHardwareManagementClient.listSkus(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list SKUs in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSkusPagedResponse listSkus(String parent) { + ListSkusRequest request = ListSkusRequest.newBuilder().setParent(parent).build(); + return listSkus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SKUs for 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListSkusRequest request =
+   *       ListSkusRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Sku element : gDCHardwareManagementClient.listSkus(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 ListSkusPagedResponse listSkus(ListSkusRequest request) { + return listSkusPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SKUs for 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListSkusRequest request =
+   *       ListSkusRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.listSkusPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Sku element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSkusPagedCallable() { + return stub.listSkusPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SKUs for 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListSkusRequest request =
+   *       ListSkusRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListSkusResponse response = gDCHardwareManagementClient.listSkusCallable().call(request);
+   *     for (Sku element : response.getSkusList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSkusCallable() { + return stub.listSkusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of an SKU. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   SkuName name = SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]");
+   *   Sku response = gDCHardwareManagementClient.getSku(name);
+   * }
+   * }
+ * + * @param name Required. The name of the SKU. Format: + * `projects/{project}/locations/{location}/skus/{sku}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Sku getSku(SkuName name) { + GetSkuRequest request = + GetSkuRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSku(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of an SKU. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name = SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString();
+   *   Sku response = gDCHardwareManagementClient.getSku(name);
+   * }
+   * }
+ * + * @param name Required. The name of the SKU. Format: + * `projects/{project}/locations/{location}/skus/{sku}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Sku getSku(String name) { + GetSkuRequest request = GetSkuRequest.newBuilder().setName(name).build(); + return getSku(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of an SKU. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   GetSkuRequest request =
+   *       GetSkuRequest.newBuilder()
+   *           .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString())
+   *           .build();
+   *   ApiFuture future = gDCHardwareManagementClient.getSkuCallable().futureCall(request);
+   *   // Do something.
+   *   Sku response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSkuCallable() { + return stub.getSkuCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists zones 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Zone element : gDCHardwareManagementClient.listZones(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list zones in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListZonesPagedResponse listZones(LocationName parent) { + ListZonesRequest request = + ListZonesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listZones(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists zones 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Zone element : gDCHardwareManagementClient.listZones(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location to list zones in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListZonesPagedResponse listZones(String parent) { + ListZonesRequest request = ListZonesRequest.newBuilder().setParent(parent).build(); + return listZones(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists zones 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListZonesRequest request =
+   *       ListZonesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Zone element : gDCHardwareManagementClient.listZones(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 ListZonesPagedResponse listZones(ListZonesRequest request) { + return listZonesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists zones 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListZonesRequest request =
+   *       ListZonesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.listZonesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Zone element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listZonesPagedCallable() { + return stub.listZonesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists zones 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListZonesRequest request =
+   *       ListZonesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListZonesResponse response = gDCHardwareManagementClient.listZonesCallable().call(request);
+   *     for (Zone element : response.getZonesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listZonesCallable() { + return stub.listZonesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a zone. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   Zone response = gDCHardwareManagementClient.getZone(name);
+   * }
+   * }
+ * + * @param name Required. The name of the zone. Format: + * `projects/{project}/locations/{location}/zones/{zone}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Zone getZone(ZoneName name) { + GetZoneRequest request = + GetZoneRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getZone(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a zone. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   Zone response = gDCHardwareManagementClient.getZone(name);
+   * }
+   * }
+ * + * @param name Required. The name of the zone. Format: + * `projects/{project}/locations/{location}/zones/{zone}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Zone getZone(String name) { + GetZoneRequest request = GetZoneRequest.newBuilder().setName(name).build(); + return getZone(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a zone. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   GetZoneRequest request =
+   *       GetZoneRequest.newBuilder()
+   *           .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .build();
+   *   ApiFuture future = gDCHardwareManagementClient.getZoneCallable().futureCall(request);
+   *   // Do something.
+   *   Zone response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getZoneCallable() { + return stub.getZoneCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new zone 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Zone zone = Zone.newBuilder().build();
+   *   String zoneId = "zoneId-696323609";
+   *   Zone response = gDCHardwareManagementClient.createZoneAsync(parent, zone, zoneId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create the zone in. Format: + * `projects/{project}/locations/{location}` + * @param zone Required. The zone to create. + * @param zoneId Optional. ID used to uniquely identify the Zone within its parent scope. This + * field should contain at most 63 characters and must start with lowercase characters. Only + * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first + * or the last one. A system generated ID will be used if the field is not set. + *

The zone.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createZoneAsync( + LocationName parent, Zone zone, String zoneId) { + CreateZoneRequest request = + CreateZoneRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setZone(zone) + .setZoneId(zoneId) + .build(); + return createZoneAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new zone 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Zone zone = Zone.newBuilder().build();
+   *   String zoneId = "zoneId-696323609";
+   *   Zone response = gDCHardwareManagementClient.createZoneAsync(parent, zone, zoneId).get();
+   * }
+   * }
+ * + * @param parent Required. The project and location to create the zone in. Format: + * `projects/{project}/locations/{location}` + * @param zone Required. The zone to create. + * @param zoneId Optional. ID used to uniquely identify the Zone within its parent scope. This + * field should contain at most 63 characters and must start with lowercase characters. Only + * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first + * or the last one. A system generated ID will be used if the field is not set. + *

The zone.name field in the request will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createZoneAsync( + String parent, Zone zone, String zoneId) { + CreateZoneRequest request = + CreateZoneRequest.newBuilder().setParent(parent).setZone(zone).setZoneId(zoneId).build(); + return createZoneAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new zone 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateZoneRequest request =
+   *       CreateZoneRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setZoneId("zoneId-696323609")
+   *           .setZone(Zone.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Zone response = gDCHardwareManagementClient.createZoneAsync(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 createZoneAsync(CreateZoneRequest request) { + return createZoneOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new zone 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateZoneRequest request =
+   *       CreateZoneRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setZoneId("zoneId-696323609")
+   *           .setZone(Zone.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       gDCHardwareManagementClient.createZoneOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Zone response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createZoneOperationCallable() { + return stub.createZoneOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new zone 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   CreateZoneRequest request =
+   *       CreateZoneRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setZoneId("zoneId-696323609")
+   *           .setZone(Zone.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.createZoneCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createZoneCallable() { + return stub.createZoneCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a zone. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   Zone zone = Zone.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Zone response = gDCHardwareManagementClient.updateZoneAsync(zone, updateMask).get();
+   * }
+   * }
+ * + * @param zone Required. The zone to update. + * @param updateMask Required. A mask to specify the fields in the Zone to overwrite with this + * update. The fields specified in the update_mask are relative to the zone, not the full + * request. A field will be overwritten if it is in the mask. If you don't provide a mask then + * all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateZoneAsync( + Zone zone, FieldMask updateMask) { + UpdateZoneRequest request = + UpdateZoneRequest.newBuilder().setZone(zone).setUpdateMask(updateMask).build(); + return updateZoneAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a zone. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   UpdateZoneRequest request =
+   *       UpdateZoneRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setZone(Zone.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Zone response = gDCHardwareManagementClient.updateZoneAsync(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 updateZoneAsync(UpdateZoneRequest request) { + return updateZoneOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a zone. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   gDCHardwareManagementClient.deleteZoneAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the zone. Format: + * `projects/{project}/locations/{location}/zones/{zone}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteZoneAsync(ZoneName name) { + DeleteZoneRequest request = + DeleteZoneRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteZoneAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a zone. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   gDCHardwareManagementClient.deleteZoneAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the zone. Format: + * `projects/{project}/locations/{location}/zones/{zone}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteZoneAsync(String name) { + DeleteZoneRequest request = DeleteZoneRequest.newBuilder().setName(name).build(); + return deleteZoneAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a zone. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   DeleteZoneRequest request =
+   *       DeleteZoneRequest.newBuilder()
+   *           .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   gDCHardwareManagementClient.deleteZoneAsync(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 deleteZoneAsync( + DeleteZoneRequest request) { + return deleteZoneOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a zone. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+   *   SignalZoneStateRequest.StateSignal stateSignal =
+   *       SignalZoneStateRequest.StateSignal.forNumber(0);
+   *   Zone response = gDCHardwareManagementClient.signalZoneStateAsync(name, stateSignal).get();
+   * }
+   * }
+ * + * @param name Required. The name of the zone. Format: + * `projects/{project}/locations/{location}/zones/{zone}` + * @param stateSignal Required. The state signal to send for this zone. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture signalZoneStateAsync( + ZoneName name, SignalZoneStateRequest.StateSignal stateSignal) { + SignalZoneStateRequest request = + SignalZoneStateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setStateSignal(stateSignal) + .build(); + return signalZoneStateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Signals the state of a zone. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+   *   SignalZoneStateRequest.StateSignal stateSignal =
+   *       SignalZoneStateRequest.StateSignal.forNumber(0);
+   *   Zone response = gDCHardwareManagementClient.signalZoneStateAsync(name, stateSignal).get();
+   * }
+   * }
+ * + * @param name Required. The name of the zone. Format: + * `projects/{project}/locations/{location}/zones/{zone}` + * @param stateSignal Required. The state signal to send for this zone. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture signalZoneStateAsync( + String name, SignalZoneStateRequest.StateSignal stateSignal) { + SignalZoneStateRequest request = + SignalZoneStateRequest.newBuilder().setName(name).setStateSignal(stateSignal).build(); + return signalZoneStateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Signals the state of a zone. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   SignalZoneStateRequest request =
+   *       SignalZoneStateRequest.newBuilder()
+   *           .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Zone response = gDCHardwareManagementClient.signalZoneStateAsync(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 signalZoneStateAsync( + SignalZoneStateRequest request) { + return signalZoneStateOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Signals the state of a zone. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   SignalZoneStateRequest request =
+   *       SignalZoneStateRequest.newBuilder()
+   *           .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.signalZoneStateCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable signalZoneStateCallable() { + return stub.signalZoneStateCallable(); + } + + // 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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : gDCHardwareManagementClient.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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         gDCHardwareManagementClient.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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = gDCHardwareManagementClient.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 (GDCHardwareManagementClient gDCHardwareManagementClient =
+   *     GDCHardwareManagementClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       gDCHardwareManagementClient.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 ListOrdersPagedResponse + extends AbstractPagedListResponse< + ListOrdersRequest, + ListOrdersResponse, + Order, + ListOrdersPage, + ListOrdersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListOrdersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListOrdersPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListOrdersPagedResponse(ListOrdersPage page) { + super(page, ListOrdersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListOrdersPage + extends AbstractPage { + + private ListOrdersPage( + PageContext context, + ListOrdersResponse response) { + super(context, response); + } + + private static ListOrdersPage createEmptyPage() { + return new ListOrdersPage(null, null); + } + + @Override + protected ListOrdersPage createPage( + PageContext context, + ListOrdersResponse response) { + return new ListOrdersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListOrdersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListOrdersRequest, + ListOrdersResponse, + Order, + ListOrdersPage, + ListOrdersFixedSizeCollection> { + + private ListOrdersFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListOrdersFixedSizeCollection createEmptyCollection() { + return new ListOrdersFixedSizeCollection(null, 0); + } + + @Override + protected ListOrdersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListOrdersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSitesPagedResponse + extends AbstractPagedListResponse< + ListSitesRequest, ListSitesResponse, Site, ListSitesPage, ListSitesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSitesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListSitesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListSitesPagedResponse(ListSitesPage page) { + super(page, ListSitesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSitesPage + extends AbstractPage { + + private ListSitesPage( + PageContext context, + ListSitesResponse response) { + super(context, response); + } + + private static ListSitesPage createEmptyPage() { + return new ListSitesPage(null, null); + } + + @Override + protected ListSitesPage createPage( + PageContext context, + ListSitesResponse response) { + return new ListSitesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSitesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSitesRequest, ListSitesResponse, Site, ListSitesPage, ListSitesFixedSizeCollection> { + + private ListSitesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSitesFixedSizeCollection createEmptyCollection() { + return new ListSitesFixedSizeCollection(null, 0); + } + + @Override + protected ListSitesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSitesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListHardwareGroupsPagedResponse + extends AbstractPagedListResponse< + ListHardwareGroupsRequest, + ListHardwareGroupsResponse, + HardwareGroup, + ListHardwareGroupsPage, + ListHardwareGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListHardwareGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListHardwareGroupsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListHardwareGroupsPagedResponse(ListHardwareGroupsPage page) { + super(page, ListHardwareGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListHardwareGroupsPage + extends AbstractPage< + ListHardwareGroupsRequest, + ListHardwareGroupsResponse, + HardwareGroup, + ListHardwareGroupsPage> { + + private ListHardwareGroupsPage( + PageContext context, + ListHardwareGroupsResponse response) { + super(context, response); + } + + private static ListHardwareGroupsPage createEmptyPage() { + return new ListHardwareGroupsPage(null, null); + } + + @Override + protected ListHardwareGroupsPage createPage( + PageContext context, + ListHardwareGroupsResponse response) { + return new ListHardwareGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListHardwareGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListHardwareGroupsRequest, + ListHardwareGroupsResponse, + HardwareGroup, + ListHardwareGroupsPage, + ListHardwareGroupsFixedSizeCollection> { + + private ListHardwareGroupsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListHardwareGroupsFixedSizeCollection createEmptyCollection() { + return new ListHardwareGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListHardwareGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListHardwareGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListHardwarePagedResponse + extends AbstractPagedListResponse< + ListHardwareRequest, + ListHardwareResponse, + Hardware, + ListHardwarePage, + ListHardwareFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListHardwarePage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListHardwarePagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListHardwarePagedResponse(ListHardwarePage page) { + super(page, ListHardwareFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListHardwarePage + extends AbstractPage { + + private ListHardwarePage( + PageContext context, + ListHardwareResponse response) { + super(context, response); + } + + private static ListHardwarePage createEmptyPage() { + return new ListHardwarePage(null, null); + } + + @Override + protected ListHardwarePage createPage( + PageContext context, + ListHardwareResponse response) { + return new ListHardwarePage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListHardwareFixedSizeCollection + extends AbstractFixedSizeCollection< + ListHardwareRequest, + ListHardwareResponse, + Hardware, + ListHardwarePage, + ListHardwareFixedSizeCollection> { + + private ListHardwareFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListHardwareFixedSizeCollection createEmptyCollection() { + return new ListHardwareFixedSizeCollection(null, 0); + } + + @Override + protected ListHardwareFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListHardwareFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListCommentsPagedResponse + extends AbstractPagedListResponse< + ListCommentsRequest, + ListCommentsResponse, + Comment, + ListCommentsPage, + ListCommentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCommentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListCommentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListCommentsPagedResponse(ListCommentsPage page) { + super(page, ListCommentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCommentsPage + extends AbstractPage { + + private ListCommentsPage( + PageContext context, + ListCommentsResponse response) { + super(context, response); + } + + private static ListCommentsPage createEmptyPage() { + return new ListCommentsPage(null, null); + } + + @Override + protected ListCommentsPage createPage( + PageContext context, + ListCommentsResponse response) { + return new ListCommentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCommentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCommentsRequest, + ListCommentsResponse, + Comment, + ListCommentsPage, + ListCommentsFixedSizeCollection> { + + private ListCommentsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCommentsFixedSizeCollection createEmptyCollection() { + return new ListCommentsFixedSizeCollection(null, 0); + } + + @Override + protected ListCommentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCommentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListChangeLogEntriesPagedResponse + extends AbstractPagedListResponse< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ChangeLogEntry, + ListChangeLogEntriesPage, + ListChangeLogEntriesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListChangeLogEntriesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListChangeLogEntriesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListChangeLogEntriesPagedResponse(ListChangeLogEntriesPage page) { + super(page, ListChangeLogEntriesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListChangeLogEntriesPage + extends AbstractPage< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ChangeLogEntry, + ListChangeLogEntriesPage> { + + private ListChangeLogEntriesPage( + PageContext + context, + ListChangeLogEntriesResponse response) { + super(context, response); + } + + private static ListChangeLogEntriesPage createEmptyPage() { + return new ListChangeLogEntriesPage(null, null); + } + + @Override + protected ListChangeLogEntriesPage createPage( + PageContext + context, + ListChangeLogEntriesResponse response) { + return new ListChangeLogEntriesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListChangeLogEntriesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ChangeLogEntry, + ListChangeLogEntriesPage, + ListChangeLogEntriesFixedSizeCollection> { + + private ListChangeLogEntriesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListChangeLogEntriesFixedSizeCollection createEmptyCollection() { + return new ListChangeLogEntriesFixedSizeCollection(null, 0); + } + + @Override + protected ListChangeLogEntriesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListChangeLogEntriesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSkusPagedResponse + extends AbstractPagedListResponse< + ListSkusRequest, ListSkusResponse, Sku, ListSkusPage, ListSkusFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSkusPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListSkusPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListSkusPagedResponse(ListSkusPage page) { + super(page, ListSkusFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSkusPage + extends AbstractPage { + + private ListSkusPage( + PageContext context, ListSkusResponse response) { + super(context, response); + } + + private static ListSkusPage createEmptyPage() { + return new ListSkusPage(null, null); + } + + @Override + protected ListSkusPage createPage( + PageContext context, ListSkusResponse response) { + return new ListSkusPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSkusFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSkusRequest, ListSkusResponse, Sku, ListSkusPage, ListSkusFixedSizeCollection> { + + private ListSkusFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSkusFixedSizeCollection createEmptyCollection() { + return new ListSkusFixedSizeCollection(null, 0); + } + + @Override + protected ListSkusFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSkusFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListZonesPagedResponse + extends AbstractPagedListResponse< + ListZonesRequest, ListZonesResponse, Zone, ListZonesPage, ListZonesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListZonesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListZonesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListZonesPagedResponse(ListZonesPage page) { + super(page, ListZonesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListZonesPage + extends AbstractPage { + + private ListZonesPage( + PageContext context, + ListZonesResponse response) { + super(context, response); + } + + private static ListZonesPage createEmptyPage() { + return new ListZonesPage(null, null); + } + + @Override + protected ListZonesPage createPage( + PageContext context, + ListZonesResponse response) { + return new ListZonesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListZonesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListZonesRequest, ListZonesResponse, Zone, ListZonesPage, ListZonesFixedSizeCollection> { + + private ListZonesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListZonesFixedSizeCollection createEmptyCollection() { + return new ListZonesFixedSizeCollection(null, 0); + } + + @Override + protected ListZonesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListZonesFixedSizeCollection(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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementSettings.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementSettings.java new file mode 100644 index 000000000000..8ea02ce899cd --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementSettings.java @@ -0,0 +1,811 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListCommentsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwareGroupsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwarePagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListLocationsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListOrdersPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSitesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSkusPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListZonesPagedResponse; + +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.gdchardwaremanagement.v1alpha.stub.GDCHardwareManagementStubSettings; +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 GDCHardwareManagementClient}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GDCHardwareManagementSettings.Builder gDCHardwareManagementSettingsBuilder =
+ *     GDCHardwareManagementSettings.newBuilder();
+ * gDCHardwareManagementSettingsBuilder
+ *     .getOrderSettings()
+ *     .setRetrySettings(
+ *         gDCHardwareManagementSettingsBuilder
+ *             .getOrderSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GDCHardwareManagementSettings gDCHardwareManagementSettings =
+ *     gDCHardwareManagementSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class GDCHardwareManagementSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listOrders. */ + public PagedCallSettings + listOrdersSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).listOrdersSettings(); + } + + /** Returns the object with the settings used for calls to getOrder. */ + public UnaryCallSettings getOrderSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).getOrderSettings(); + } + + /** Returns the object with the settings used for calls to createOrder. */ + public UnaryCallSettings createOrderSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).createOrderSettings(); + } + + /** Returns the object with the settings used for calls to createOrder. */ + public OperationCallSettings + createOrderOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).createOrderOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateOrder. */ + public UnaryCallSettings updateOrderSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).updateOrderSettings(); + } + + /** Returns the object with the settings used for calls to updateOrder. */ + public OperationCallSettings + updateOrderOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).updateOrderOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteOrder. */ + public UnaryCallSettings deleteOrderSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).deleteOrderSettings(); + } + + /** Returns the object with the settings used for calls to deleteOrder. */ + public OperationCallSettings + deleteOrderOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).deleteOrderOperationSettings(); + } + + /** Returns the object with the settings used for calls to submitOrder. */ + public UnaryCallSettings submitOrderSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).submitOrderSettings(); + } + + /** Returns the object with the settings used for calls to submitOrder. */ + public OperationCallSettings + submitOrderOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).submitOrderOperationSettings(); + } + + /** Returns the object with the settings used for calls to listSites. */ + public PagedCallSettings + listSitesSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).listSitesSettings(); + } + + /** Returns the object with the settings used for calls to getSite. */ + public UnaryCallSettings getSiteSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).getSiteSettings(); + } + + /** Returns the object with the settings used for calls to createSite. */ + public UnaryCallSettings createSiteSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).createSiteSettings(); + } + + /** Returns the object with the settings used for calls to createSite. */ + public OperationCallSettings + createSiteOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).createSiteOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateSite. */ + public UnaryCallSettings updateSiteSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).updateSiteSettings(); + } + + /** Returns the object with the settings used for calls to updateSite. */ + public OperationCallSettings + updateSiteOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).updateSiteOperationSettings(); + } + + /** Returns the object with the settings used for calls to listHardwareGroups. */ + public PagedCallSettings< + ListHardwareGroupsRequest, ListHardwareGroupsResponse, ListHardwareGroupsPagedResponse> + listHardwareGroupsSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).listHardwareGroupsSettings(); + } + + /** Returns the object with the settings used for calls to getHardwareGroup. */ + public UnaryCallSettings getHardwareGroupSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).getHardwareGroupSettings(); + } + + /** Returns the object with the settings used for calls to createHardwareGroup. */ + public UnaryCallSettings createHardwareGroupSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).createHardwareGroupSettings(); + } + + /** Returns the object with the settings used for calls to createHardwareGroup. */ + public OperationCallSettings + createHardwareGroupOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()) + .createHardwareGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateHardwareGroup. */ + public UnaryCallSettings updateHardwareGroupSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).updateHardwareGroupSettings(); + } + + /** Returns the object with the settings used for calls to updateHardwareGroup. */ + public OperationCallSettings + updateHardwareGroupOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()) + .updateHardwareGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteHardwareGroup. */ + public UnaryCallSettings deleteHardwareGroupSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).deleteHardwareGroupSettings(); + } + + /** Returns the object with the settings used for calls to deleteHardwareGroup. */ + public OperationCallSettings + deleteHardwareGroupOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()) + .deleteHardwareGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to listHardware. */ + public PagedCallSettings + listHardwareSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).listHardwareSettings(); + } + + /** Returns the object with the settings used for calls to getHardware. */ + public UnaryCallSettings getHardwareSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).getHardwareSettings(); + } + + /** Returns the object with the settings used for calls to createHardware. */ + public UnaryCallSettings createHardwareSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).createHardwareSettings(); + } + + /** Returns the object with the settings used for calls to createHardware. */ + public OperationCallSettings + createHardwareOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()) + .createHardwareOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateHardware. */ + public UnaryCallSettings updateHardwareSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).updateHardwareSettings(); + } + + /** Returns the object with the settings used for calls to updateHardware. */ + public OperationCallSettings + updateHardwareOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()) + .updateHardwareOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteHardware. */ + public UnaryCallSettings deleteHardwareSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).deleteHardwareSettings(); + } + + /** Returns the object with the settings used for calls to deleteHardware. */ + public OperationCallSettings + deleteHardwareOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()) + .deleteHardwareOperationSettings(); + } + + /** Returns the object with the settings used for calls to listComments. */ + public PagedCallSettings + listCommentsSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).listCommentsSettings(); + } + + /** Returns the object with the settings used for calls to getComment. */ + public UnaryCallSettings getCommentSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).getCommentSettings(); + } + + /** Returns the object with the settings used for calls to createComment. */ + public UnaryCallSettings createCommentSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).createCommentSettings(); + } + + /** Returns the object with the settings used for calls to createComment. */ + public OperationCallSettings + createCommentOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).createCommentOperationSettings(); + } + + /** Returns the object with the settings used for calls to listChangeLogEntries. */ + public PagedCallSettings< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ListChangeLogEntriesPagedResponse> + listChangeLogEntriesSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).listChangeLogEntriesSettings(); + } + + /** Returns the object with the settings used for calls to getChangeLogEntry. */ + public UnaryCallSettings getChangeLogEntrySettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).getChangeLogEntrySettings(); + } + + /** Returns the object with the settings used for calls to listSkus. */ + public PagedCallSettings + listSkusSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).listSkusSettings(); + } + + /** Returns the object with the settings used for calls to getSku. */ + public UnaryCallSettings getSkuSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).getSkuSettings(); + } + + /** Returns the object with the settings used for calls to listZones. */ + public PagedCallSettings + listZonesSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).listZonesSettings(); + } + + /** Returns the object with the settings used for calls to getZone. */ + public UnaryCallSettings getZoneSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).getZoneSettings(); + } + + /** Returns the object with the settings used for calls to createZone. */ + public UnaryCallSettings createZoneSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).createZoneSettings(); + } + + /** Returns the object with the settings used for calls to createZone. */ + public OperationCallSettings + createZoneOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).createZoneOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateZone. */ + public UnaryCallSettings updateZoneSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).updateZoneSettings(); + } + + /** Returns the object with the settings used for calls to updateZone. */ + public OperationCallSettings + updateZoneOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).updateZoneOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteZone. */ + public UnaryCallSettings deleteZoneSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).deleteZoneSettings(); + } + + /** Returns the object with the settings used for calls to deleteZone. */ + public OperationCallSettings + deleteZoneOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).deleteZoneOperationSettings(); + } + + /** Returns the object with the settings used for calls to signalZoneState. */ + public UnaryCallSettings signalZoneStateSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).signalZoneStateSettings(); + } + + /** Returns the object with the settings used for calls to signalZoneState. */ + public OperationCallSettings + signalZoneStateOperationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()) + .signalZoneStateOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((GDCHardwareManagementStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final GDCHardwareManagementSettings create(GDCHardwareManagementStubSettings stub) + throws IOException { + return new GDCHardwareManagementSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return GDCHardwareManagementStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return GDCHardwareManagementStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return GDCHardwareManagementStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GDCHardwareManagementStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return GDCHardwareManagementStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return GDCHardwareManagementStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return GDCHardwareManagementStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return GDCHardwareManagementStubSettings.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 GDCHardwareManagementSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for GDCHardwareManagementSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(GDCHardwareManagementStubSettings.newBuilder(clientContext)); + } + + protected Builder(GDCHardwareManagementSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(GDCHardwareManagementStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(GDCHardwareManagementStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(GDCHardwareManagementStubSettings.newHttpJsonBuilder()); + } + + public GDCHardwareManagementStubSettings.Builder getStubSettingsBuilder() { + return ((GDCHardwareManagementStubSettings.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 listOrders. */ + public PagedCallSettings.Builder + listOrdersSettings() { + return getStubSettingsBuilder().listOrdersSettings(); + } + + /** Returns the builder for the settings used for calls to getOrder. */ + public UnaryCallSettings.Builder getOrderSettings() { + return getStubSettingsBuilder().getOrderSettings(); + } + + /** Returns the builder for the settings used for calls to createOrder. */ + public UnaryCallSettings.Builder createOrderSettings() { + return getStubSettingsBuilder().createOrderSettings(); + } + + /** Returns the builder for the settings used for calls to createOrder. */ + public OperationCallSettings.Builder + createOrderOperationSettings() { + return getStubSettingsBuilder().createOrderOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateOrder. */ + public UnaryCallSettings.Builder updateOrderSettings() { + return getStubSettingsBuilder().updateOrderSettings(); + } + + /** Returns the builder for the settings used for calls to updateOrder. */ + public OperationCallSettings.Builder + updateOrderOperationSettings() { + return getStubSettingsBuilder().updateOrderOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteOrder. */ + public UnaryCallSettings.Builder deleteOrderSettings() { + return getStubSettingsBuilder().deleteOrderSettings(); + } + + /** Returns the builder for the settings used for calls to deleteOrder. */ + public OperationCallSettings.Builder + deleteOrderOperationSettings() { + return getStubSettingsBuilder().deleteOrderOperationSettings(); + } + + /** Returns the builder for the settings used for calls to submitOrder. */ + public UnaryCallSettings.Builder submitOrderSettings() { + return getStubSettingsBuilder().submitOrderSettings(); + } + + /** Returns the builder for the settings used for calls to submitOrder. */ + public OperationCallSettings.Builder + submitOrderOperationSettings() { + return getStubSettingsBuilder().submitOrderOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listSites. */ + public PagedCallSettings.Builder + listSitesSettings() { + return getStubSettingsBuilder().listSitesSettings(); + } + + /** Returns the builder for the settings used for calls to getSite. */ + public UnaryCallSettings.Builder getSiteSettings() { + return getStubSettingsBuilder().getSiteSettings(); + } + + /** Returns the builder for the settings used for calls to createSite. */ + public UnaryCallSettings.Builder createSiteSettings() { + return getStubSettingsBuilder().createSiteSettings(); + } + + /** Returns the builder for the settings used for calls to createSite. */ + public OperationCallSettings.Builder + createSiteOperationSettings() { + return getStubSettingsBuilder().createSiteOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateSite. */ + public UnaryCallSettings.Builder updateSiteSettings() { + return getStubSettingsBuilder().updateSiteSettings(); + } + + /** Returns the builder for the settings used for calls to updateSite. */ + public OperationCallSettings.Builder + updateSiteOperationSettings() { + return getStubSettingsBuilder().updateSiteOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listHardwareGroups. */ + public PagedCallSettings.Builder< + ListHardwareGroupsRequest, ListHardwareGroupsResponse, ListHardwareGroupsPagedResponse> + listHardwareGroupsSettings() { + return getStubSettingsBuilder().listHardwareGroupsSettings(); + } + + /** Returns the builder for the settings used for calls to getHardwareGroup. */ + public UnaryCallSettings.Builder + getHardwareGroupSettings() { + return getStubSettingsBuilder().getHardwareGroupSettings(); + } + + /** Returns the builder for the settings used for calls to createHardwareGroup. */ + public UnaryCallSettings.Builder + createHardwareGroupSettings() { + return getStubSettingsBuilder().createHardwareGroupSettings(); + } + + /** Returns the builder for the settings used for calls to createHardwareGroup. */ + public OperationCallSettings.Builder< + CreateHardwareGroupRequest, HardwareGroup, OperationMetadata> + createHardwareGroupOperationSettings() { + return getStubSettingsBuilder().createHardwareGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateHardwareGroup. */ + public UnaryCallSettings.Builder + updateHardwareGroupSettings() { + return getStubSettingsBuilder().updateHardwareGroupSettings(); + } + + /** Returns the builder for the settings used for calls to updateHardwareGroup. */ + public OperationCallSettings.Builder< + UpdateHardwareGroupRequest, HardwareGroup, OperationMetadata> + updateHardwareGroupOperationSettings() { + return getStubSettingsBuilder().updateHardwareGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteHardwareGroup. */ + public UnaryCallSettings.Builder + deleteHardwareGroupSettings() { + return getStubSettingsBuilder().deleteHardwareGroupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteHardwareGroup. */ + public OperationCallSettings.Builder + deleteHardwareGroupOperationSettings() { + return getStubSettingsBuilder().deleteHardwareGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listHardware. */ + public PagedCallSettings.Builder< + ListHardwareRequest, ListHardwareResponse, ListHardwarePagedResponse> + listHardwareSettings() { + return getStubSettingsBuilder().listHardwareSettings(); + } + + /** Returns the builder for the settings used for calls to getHardware. */ + public UnaryCallSettings.Builder getHardwareSettings() { + return getStubSettingsBuilder().getHardwareSettings(); + } + + /** Returns the builder for the settings used for calls to createHardware. */ + public UnaryCallSettings.Builder createHardwareSettings() { + return getStubSettingsBuilder().createHardwareSettings(); + } + + /** Returns the builder for the settings used for calls to createHardware. */ + public OperationCallSettings.Builder + createHardwareOperationSettings() { + return getStubSettingsBuilder().createHardwareOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateHardware. */ + public UnaryCallSettings.Builder updateHardwareSettings() { + return getStubSettingsBuilder().updateHardwareSettings(); + } + + /** Returns the builder for the settings used for calls to updateHardware. */ + public OperationCallSettings.Builder + updateHardwareOperationSettings() { + return getStubSettingsBuilder().updateHardwareOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteHardware. */ + public UnaryCallSettings.Builder deleteHardwareSettings() { + return getStubSettingsBuilder().deleteHardwareSettings(); + } + + /** Returns the builder for the settings used for calls to deleteHardware. */ + public OperationCallSettings.Builder + deleteHardwareOperationSettings() { + return getStubSettingsBuilder().deleteHardwareOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listComments. */ + public PagedCallSettings.Builder< + ListCommentsRequest, ListCommentsResponse, ListCommentsPagedResponse> + listCommentsSettings() { + return getStubSettingsBuilder().listCommentsSettings(); + } + + /** Returns the builder for the settings used for calls to getComment. */ + public UnaryCallSettings.Builder getCommentSettings() { + return getStubSettingsBuilder().getCommentSettings(); + } + + /** Returns the builder for the settings used for calls to createComment. */ + public UnaryCallSettings.Builder createCommentSettings() { + return getStubSettingsBuilder().createCommentSettings(); + } + + /** Returns the builder for the settings used for calls to createComment. */ + public OperationCallSettings.Builder + createCommentOperationSettings() { + return getStubSettingsBuilder().createCommentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listChangeLogEntries. */ + public PagedCallSettings.Builder< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ListChangeLogEntriesPagedResponse> + listChangeLogEntriesSettings() { + return getStubSettingsBuilder().listChangeLogEntriesSettings(); + } + + /** Returns the builder for the settings used for calls to getChangeLogEntry. */ + public UnaryCallSettings.Builder + getChangeLogEntrySettings() { + return getStubSettingsBuilder().getChangeLogEntrySettings(); + } + + /** Returns the builder for the settings used for calls to listSkus. */ + public PagedCallSettings.Builder + listSkusSettings() { + return getStubSettingsBuilder().listSkusSettings(); + } + + /** Returns the builder for the settings used for calls to getSku. */ + public UnaryCallSettings.Builder getSkuSettings() { + return getStubSettingsBuilder().getSkuSettings(); + } + + /** Returns the builder for the settings used for calls to listZones. */ + public PagedCallSettings.Builder + listZonesSettings() { + return getStubSettingsBuilder().listZonesSettings(); + } + + /** Returns the builder for the settings used for calls to getZone. */ + public UnaryCallSettings.Builder getZoneSettings() { + return getStubSettingsBuilder().getZoneSettings(); + } + + /** Returns the builder for the settings used for calls to createZone. */ + public UnaryCallSettings.Builder createZoneSettings() { + return getStubSettingsBuilder().createZoneSettings(); + } + + /** Returns the builder for the settings used for calls to createZone. */ + public OperationCallSettings.Builder + createZoneOperationSettings() { + return getStubSettingsBuilder().createZoneOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateZone. */ + public UnaryCallSettings.Builder updateZoneSettings() { + return getStubSettingsBuilder().updateZoneSettings(); + } + + /** Returns the builder for the settings used for calls to updateZone. */ + public OperationCallSettings.Builder + updateZoneOperationSettings() { + return getStubSettingsBuilder().updateZoneOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteZone. */ + public UnaryCallSettings.Builder deleteZoneSettings() { + return getStubSettingsBuilder().deleteZoneSettings(); + } + + /** Returns the builder for the settings used for calls to deleteZone. */ + public OperationCallSettings.Builder + deleteZoneOperationSettings() { + return getStubSettingsBuilder().deleteZoneOperationSettings(); + } + + /** Returns the builder for the settings used for calls to signalZoneState. */ + public UnaryCallSettings.Builder signalZoneStateSettings() { + return getStubSettingsBuilder().signalZoneStateSettings(); + } + + /** Returns the builder for the settings used for calls to signalZoneState. */ + public OperationCallSettings.Builder + signalZoneStateOperationSettings() { + return getStubSettingsBuilder().signalZoneStateOperationSettings(); + } + + /** 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 GDCHardwareManagementSettings build() throws IOException { + return new GDCHardwareManagementSettings(this); + } + } +} diff --git a/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/gapic_metadata.json b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/gapic_metadata.json new file mode 100644 index 000000000000..cee147eabcd3 --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/gapic_metadata.json @@ -0,0 +1,123 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.gdchardwaremanagement.v1alpha", + "libraryPackage": "com.google.cloud.gdchardwaremanagement.v1alpha", + "services": { + "GDCHardwareManagement": { + "clients": { + "grpc": { + "libraryClient": "GDCHardwareManagementClient", + "rpcs": { + "CreateComment": { + "methods": ["createCommentAsync", "createCommentAsync", "createCommentAsync", "createCommentOperationCallable", "createCommentCallable"] + }, + "CreateHardware": { + "methods": ["createHardwareAsync", "createHardwareAsync", "createHardwareAsync", "createHardwareOperationCallable", "createHardwareCallable"] + }, + "CreateHardwareGroup": { + "methods": ["createHardwareGroupAsync", "createHardwareGroupAsync", "createHardwareGroupAsync", "createHardwareGroupOperationCallable", "createHardwareGroupCallable"] + }, + "CreateOrder": { + "methods": ["createOrderAsync", "createOrderAsync", "createOrderAsync", "createOrderOperationCallable", "createOrderCallable"] + }, + "CreateSite": { + "methods": ["createSiteAsync", "createSiteAsync", "createSiteAsync", "createSiteOperationCallable", "createSiteCallable"] + }, + "CreateZone": { + "methods": ["createZoneAsync", "createZoneAsync", "createZoneAsync", "createZoneOperationCallable", "createZoneCallable"] + }, + "DeleteHardware": { + "methods": ["deleteHardwareAsync", "deleteHardwareAsync", "deleteHardwareAsync", "deleteHardwareOperationCallable", "deleteHardwareCallable"] + }, + "DeleteHardwareGroup": { + "methods": ["deleteHardwareGroupAsync", "deleteHardwareGroupAsync", "deleteHardwareGroupAsync", "deleteHardwareGroupOperationCallable", "deleteHardwareGroupCallable"] + }, + "DeleteOrder": { + "methods": ["deleteOrderAsync", "deleteOrderAsync", "deleteOrderAsync", "deleteOrderOperationCallable", "deleteOrderCallable"] + }, + "DeleteZone": { + "methods": ["deleteZoneAsync", "deleteZoneAsync", "deleteZoneAsync", "deleteZoneOperationCallable", "deleteZoneCallable"] + }, + "GetChangeLogEntry": { + "methods": ["getChangeLogEntry", "getChangeLogEntry", "getChangeLogEntry", "getChangeLogEntryCallable"] + }, + "GetComment": { + "methods": ["getComment", "getComment", "getComment", "getCommentCallable"] + }, + "GetHardware": { + "methods": ["getHardware", "getHardware", "getHardware", "getHardwareCallable"] + }, + "GetHardwareGroup": { + "methods": ["getHardwareGroup", "getHardwareGroup", "getHardwareGroup", "getHardwareGroupCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetOrder": { + "methods": ["getOrder", "getOrder", "getOrder", "getOrderCallable"] + }, + "GetSite": { + "methods": ["getSite", "getSite", "getSite", "getSiteCallable"] + }, + "GetSku": { + "methods": ["getSku", "getSku", "getSku", "getSkuCallable"] + }, + "GetZone": { + "methods": ["getZone", "getZone", "getZone", "getZoneCallable"] + }, + "ListChangeLogEntries": { + "methods": ["listChangeLogEntries", "listChangeLogEntries", "listChangeLogEntries", "listChangeLogEntriesPagedCallable", "listChangeLogEntriesCallable"] + }, + "ListComments": { + "methods": ["listComments", "listComments", "listComments", "listCommentsPagedCallable", "listCommentsCallable"] + }, + "ListHardware": { + "methods": ["listHardware", "listHardware", "listHardware", "listHardwarePagedCallable", "listHardwareCallable"] + }, + "ListHardwareGroups": { + "methods": ["listHardwareGroups", "listHardwareGroups", "listHardwareGroups", "listHardwareGroupsPagedCallable", "listHardwareGroupsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListOrders": { + "methods": ["listOrders", "listOrders", "listOrders", "listOrdersPagedCallable", "listOrdersCallable"] + }, + "ListSites": { + "methods": ["listSites", "listSites", "listSites", "listSitesPagedCallable", "listSitesCallable"] + }, + "ListSkus": { + "methods": ["listSkus", "listSkus", "listSkus", "listSkusPagedCallable", "listSkusCallable"] + }, + "ListZones": { + "methods": ["listZones", "listZones", "listZones", "listZonesPagedCallable", "listZonesCallable"] + }, + "SignalZoneState": { + "methods": ["signalZoneStateAsync", "signalZoneStateAsync", "signalZoneStateAsync", "signalZoneStateOperationCallable", "signalZoneStateCallable"] + }, + "SubmitOrder": { + "methods": ["submitOrderAsync", "submitOrderAsync", "submitOrderAsync", "submitOrderOperationCallable", "submitOrderCallable"] + }, + "UpdateHardware": { + "methods": ["updateHardwareAsync", "updateHardwareAsync", "updateHardwareOperationCallable", "updateHardwareCallable"] + }, + "UpdateHardwareGroup": { + "methods": ["updateHardwareGroupAsync", "updateHardwareGroupAsync", "updateHardwareGroupOperationCallable", "updateHardwareGroupCallable"] + }, + "UpdateOrder": { + "methods": ["updateOrderAsync", "updateOrderAsync", "updateOrderOperationCallable", "updateOrderCallable"] + }, + "UpdateSite": { + "methods": ["updateSiteAsync", "updateSiteAsync", "updateSiteOperationCallable", "updateSiteCallable"] + }, + "UpdateZone": { + "methods": ["updateZoneAsync", "updateZoneAsync", "updateZoneOperationCallable", "updateZoneCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/package-info.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/package-info.java new file mode 100644 index 000000000000..6406236643ef --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/package-info.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to GDC Hardware Management API + * + *

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

======================= GDCHardwareManagementClient ======================= + * + *

Service Description: The GDC Hardware Management service. + * + *

Sample for GDCHardwareManagementClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ *     GDCHardwareManagementClient.create()) {
+ *   OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+ *   Order response = gDCHardwareManagementClient.getOrder(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.gdchardwaremanagement.v1alpha; + +import javax.annotation.Generated; diff --git a/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GDCHardwareManagementStub.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GDCHardwareManagementStub.java new file mode 100644 index 000000000000..96cb865bfe3e --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GDCHardwareManagementStub.java @@ -0,0 +1,381 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.stub; + +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListCommentsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwareGroupsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwarePagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListLocationsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListOrdersPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSitesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSkusPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListZonesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; +import com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +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 GDCHardwareManagement service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class GDCHardwareManagementStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listOrdersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listOrdersPagedCallable()"); + } + + public UnaryCallable listOrdersCallable() { + throw new UnsupportedOperationException("Not implemented: listOrdersCallable()"); + } + + public UnaryCallable getOrderCallable() { + throw new UnsupportedOperationException("Not implemented: getOrderCallable()"); + } + + public OperationCallable + createOrderOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createOrderOperationCallable()"); + } + + public UnaryCallable createOrderCallable() { + throw new UnsupportedOperationException("Not implemented: createOrderCallable()"); + } + + public OperationCallable + updateOrderOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateOrderOperationCallable()"); + } + + public UnaryCallable updateOrderCallable() { + throw new UnsupportedOperationException("Not implemented: updateOrderCallable()"); + } + + public OperationCallable + deleteOrderOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteOrderOperationCallable()"); + } + + public UnaryCallable deleteOrderCallable() { + throw new UnsupportedOperationException("Not implemented: deleteOrderCallable()"); + } + + public OperationCallable + submitOrderOperationCallable() { + throw new UnsupportedOperationException("Not implemented: submitOrderOperationCallable()"); + } + + public UnaryCallable submitOrderCallable() { + throw new UnsupportedOperationException("Not implemented: submitOrderCallable()"); + } + + public UnaryCallable listSitesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSitesPagedCallable()"); + } + + public UnaryCallable listSitesCallable() { + throw new UnsupportedOperationException("Not implemented: listSitesCallable()"); + } + + public UnaryCallable getSiteCallable() { + throw new UnsupportedOperationException("Not implemented: getSiteCallable()"); + } + + public OperationCallable + createSiteOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createSiteOperationCallable()"); + } + + public UnaryCallable createSiteCallable() { + throw new UnsupportedOperationException("Not implemented: createSiteCallable()"); + } + + public OperationCallable + updateSiteOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateSiteOperationCallable()"); + } + + public UnaryCallable updateSiteCallable() { + throw new UnsupportedOperationException("Not implemented: updateSiteCallable()"); + } + + public UnaryCallable + listHardwareGroupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listHardwareGroupsPagedCallable()"); + } + + public UnaryCallable + listHardwareGroupsCallable() { + throw new UnsupportedOperationException("Not implemented: listHardwareGroupsCallable()"); + } + + public UnaryCallable getHardwareGroupCallable() { + throw new UnsupportedOperationException("Not implemented: getHardwareGroupCallable()"); + } + + public OperationCallable + createHardwareGroupOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createHardwareGroupOperationCallable()"); + } + + public UnaryCallable createHardwareGroupCallable() { + throw new UnsupportedOperationException("Not implemented: createHardwareGroupCallable()"); + } + + public OperationCallable + updateHardwareGroupOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateHardwareGroupOperationCallable()"); + } + + public UnaryCallable updateHardwareGroupCallable() { + throw new UnsupportedOperationException("Not implemented: updateHardwareGroupCallable()"); + } + + public OperationCallable + deleteHardwareGroupOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteHardwareGroupOperationCallable()"); + } + + public UnaryCallable deleteHardwareGroupCallable() { + throw new UnsupportedOperationException("Not implemented: deleteHardwareGroupCallable()"); + } + + public UnaryCallable listHardwarePagedCallable() { + throw new UnsupportedOperationException("Not implemented: listHardwarePagedCallable()"); + } + + public UnaryCallable listHardwareCallable() { + throw new UnsupportedOperationException("Not implemented: listHardwareCallable()"); + } + + public UnaryCallable getHardwareCallable() { + throw new UnsupportedOperationException("Not implemented: getHardwareCallable()"); + } + + public OperationCallable + createHardwareOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createHardwareOperationCallable()"); + } + + public UnaryCallable createHardwareCallable() { + throw new UnsupportedOperationException("Not implemented: createHardwareCallable()"); + } + + public OperationCallable + updateHardwareOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateHardwareOperationCallable()"); + } + + public UnaryCallable updateHardwareCallable() { + throw new UnsupportedOperationException("Not implemented: updateHardwareCallable()"); + } + + public OperationCallable + deleteHardwareOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteHardwareOperationCallable()"); + } + + public UnaryCallable deleteHardwareCallable() { + throw new UnsupportedOperationException("Not implemented: deleteHardwareCallable()"); + } + + public UnaryCallable listCommentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCommentsPagedCallable()"); + } + + public UnaryCallable listCommentsCallable() { + throw new UnsupportedOperationException("Not implemented: listCommentsCallable()"); + } + + public UnaryCallable getCommentCallable() { + throw new UnsupportedOperationException("Not implemented: getCommentCallable()"); + } + + public OperationCallable + createCommentOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createCommentOperationCallable()"); + } + + public UnaryCallable createCommentCallable() { + throw new UnsupportedOperationException("Not implemented: createCommentCallable()"); + } + + public UnaryCallable + listChangeLogEntriesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listChangeLogEntriesPagedCallable()"); + } + + public UnaryCallable + listChangeLogEntriesCallable() { + throw new UnsupportedOperationException("Not implemented: listChangeLogEntriesCallable()"); + } + + public UnaryCallable getChangeLogEntryCallable() { + throw new UnsupportedOperationException("Not implemented: getChangeLogEntryCallable()"); + } + + public UnaryCallable listSkusPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSkusPagedCallable()"); + } + + public UnaryCallable listSkusCallable() { + throw new UnsupportedOperationException("Not implemented: listSkusCallable()"); + } + + public UnaryCallable getSkuCallable() { + throw new UnsupportedOperationException("Not implemented: getSkuCallable()"); + } + + public UnaryCallable listZonesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listZonesPagedCallable()"); + } + + public UnaryCallable listZonesCallable() { + throw new UnsupportedOperationException("Not implemented: listZonesCallable()"); + } + + public UnaryCallable getZoneCallable() { + throw new UnsupportedOperationException("Not implemented: getZoneCallable()"); + } + + public OperationCallable + createZoneOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createZoneOperationCallable()"); + } + + public UnaryCallable createZoneCallable() { + throw new UnsupportedOperationException("Not implemented: createZoneCallable()"); + } + + public OperationCallable + updateZoneOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateZoneOperationCallable()"); + } + + public UnaryCallable updateZoneCallable() { + throw new UnsupportedOperationException("Not implemented: updateZoneCallable()"); + } + + public OperationCallable + deleteZoneOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteZoneOperationCallable()"); + } + + public UnaryCallable deleteZoneCallable() { + throw new UnsupportedOperationException("Not implemented: deleteZoneCallable()"); + } + + public OperationCallable + signalZoneStateOperationCallable() { + throw new UnsupportedOperationException("Not implemented: signalZoneStateOperationCallable()"); + } + + public UnaryCallable signalZoneStateCallable() { + throw new UnsupportedOperationException("Not implemented: signalZoneStateCallable()"); + } + + 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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GDCHardwareManagementStubSettings.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GDCHardwareManagementStubSettings.java new file mode 100644 index 000000000000..45957a3ad14e --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GDCHardwareManagementStubSettings.java @@ -0,0 +1,2476 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.stub; + +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListCommentsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwareGroupsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwarePagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListLocationsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListOrdersPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSitesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSkusPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListZonesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.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.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; +import com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +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.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link GDCHardwareManagementStub}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GDCHardwareManagementStubSettings.Builder gDCHardwareManagementSettingsBuilder =
+ *     GDCHardwareManagementStubSettings.newBuilder();
+ * gDCHardwareManagementSettingsBuilder
+ *     .getOrderSettings()
+ *     .setRetrySettings(
+ *         gDCHardwareManagementSettingsBuilder
+ *             .getOrderSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GDCHardwareManagementStubSettings gDCHardwareManagementSettings =
+ *     gDCHardwareManagementSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class GDCHardwareManagementStubSettings + 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 + listOrdersSettings; + private final UnaryCallSettings getOrderSettings; + private final UnaryCallSettings createOrderSettings; + private final OperationCallSettings + createOrderOperationSettings; + private final UnaryCallSettings updateOrderSettings; + private final OperationCallSettings + updateOrderOperationSettings; + private final UnaryCallSettings deleteOrderSettings; + private final OperationCallSettings + deleteOrderOperationSettings; + private final UnaryCallSettings submitOrderSettings; + private final OperationCallSettings + submitOrderOperationSettings; + private final PagedCallSettings + listSitesSettings; + private final UnaryCallSettings getSiteSettings; + private final UnaryCallSettings createSiteSettings; + private final OperationCallSettings + createSiteOperationSettings; + private final UnaryCallSettings updateSiteSettings; + private final OperationCallSettings + updateSiteOperationSettings; + private final PagedCallSettings< + ListHardwareGroupsRequest, ListHardwareGroupsResponse, ListHardwareGroupsPagedResponse> + listHardwareGroupsSettings; + private final UnaryCallSettings getHardwareGroupSettings; + private final UnaryCallSettings + createHardwareGroupSettings; + private final OperationCallSettings + createHardwareGroupOperationSettings; + private final UnaryCallSettings + updateHardwareGroupSettings; + private final OperationCallSettings + updateHardwareGroupOperationSettings; + private final UnaryCallSettings + deleteHardwareGroupSettings; + private final OperationCallSettings + deleteHardwareGroupOperationSettings; + private final PagedCallSettings< + ListHardwareRequest, ListHardwareResponse, ListHardwarePagedResponse> + listHardwareSettings; + private final UnaryCallSettings getHardwareSettings; + private final UnaryCallSettings createHardwareSettings; + private final OperationCallSettings + createHardwareOperationSettings; + private final UnaryCallSettings updateHardwareSettings; + private final OperationCallSettings + updateHardwareOperationSettings; + private final UnaryCallSettings deleteHardwareSettings; + private final OperationCallSettings + deleteHardwareOperationSettings; + private final PagedCallSettings< + ListCommentsRequest, ListCommentsResponse, ListCommentsPagedResponse> + listCommentsSettings; + private final UnaryCallSettings getCommentSettings; + private final UnaryCallSettings createCommentSettings; + private final OperationCallSettings + createCommentOperationSettings; + private final PagedCallSettings< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ListChangeLogEntriesPagedResponse> + listChangeLogEntriesSettings; + private final UnaryCallSettings + getChangeLogEntrySettings; + private final PagedCallSettings + listSkusSettings; + private final UnaryCallSettings getSkuSettings; + private final PagedCallSettings + listZonesSettings; + private final UnaryCallSettings getZoneSettings; + private final UnaryCallSettings createZoneSettings; + private final OperationCallSettings + createZoneOperationSettings; + private final UnaryCallSettings updateZoneSettings; + private final OperationCallSettings + updateZoneOperationSettings; + private final UnaryCallSettings deleteZoneSettings; + private final OperationCallSettings + deleteZoneOperationSettings; + private final UnaryCallSettings signalZoneStateSettings; + private final OperationCallSettings + signalZoneStateOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_ORDERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListOrdersRequest injectToken(ListOrdersRequest payload, String token) { + return ListOrdersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListOrdersRequest injectPageSize(ListOrdersRequest payload, int pageSize) { + return ListOrdersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListOrdersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListOrdersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListOrdersResponse payload) { + return payload.getOrdersList() == null + ? ImmutableList.of() + : payload.getOrdersList(); + } + }; + + private static final PagedListDescriptor + LIST_SITES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSitesRequest injectToken(ListSitesRequest payload, String token) { + return ListSitesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSitesRequest injectPageSize(ListSitesRequest payload, int pageSize) { + return ListSitesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSitesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSitesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSitesResponse payload) { + return payload.getSitesList() == null + ? ImmutableList.of() + : payload.getSitesList(); + } + }; + + private static final PagedListDescriptor< + ListHardwareGroupsRequest, ListHardwareGroupsResponse, HardwareGroup> + LIST_HARDWARE_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor< + ListHardwareGroupsRequest, ListHardwareGroupsResponse, HardwareGroup>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListHardwareGroupsRequest injectToken( + ListHardwareGroupsRequest payload, String token) { + return ListHardwareGroupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListHardwareGroupsRequest injectPageSize( + ListHardwareGroupsRequest payload, int pageSize) { + return ListHardwareGroupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListHardwareGroupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListHardwareGroupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListHardwareGroupsResponse payload) { + return payload.getHardwareGroupsList() == null + ? ImmutableList.of() + : payload.getHardwareGroupsList(); + } + }; + + private static final PagedListDescriptor + LIST_HARDWARE_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListHardwareRequest injectToken(ListHardwareRequest payload, String token) { + return ListHardwareRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListHardwareRequest injectPageSize(ListHardwareRequest payload, int pageSize) { + return ListHardwareRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListHardwareRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListHardwareResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListHardwareResponse payload) { + return payload.getHardwareList() == null + ? ImmutableList.of() + : payload.getHardwareList(); + } + }; + + private static final PagedListDescriptor + LIST_COMMENTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCommentsRequest injectToken(ListCommentsRequest payload, String token) { + return ListCommentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCommentsRequest injectPageSize(ListCommentsRequest payload, int pageSize) { + return ListCommentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCommentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCommentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCommentsResponse payload) { + return payload.getCommentsList() == null + ? ImmutableList.of() + : payload.getCommentsList(); + } + }; + + private static final PagedListDescriptor< + ListChangeLogEntriesRequest, ListChangeLogEntriesResponse, ChangeLogEntry> + LIST_CHANGE_LOG_ENTRIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListChangeLogEntriesRequest, ListChangeLogEntriesResponse, ChangeLogEntry>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListChangeLogEntriesRequest injectToken( + ListChangeLogEntriesRequest payload, String token) { + return ListChangeLogEntriesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListChangeLogEntriesRequest injectPageSize( + ListChangeLogEntriesRequest payload, int pageSize) { + return ListChangeLogEntriesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListChangeLogEntriesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListChangeLogEntriesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListChangeLogEntriesResponse payload) { + return payload.getChangeLogEntriesList() == null + ? ImmutableList.of() + : payload.getChangeLogEntriesList(); + } + }; + + private static final PagedListDescriptor + LIST_SKUS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSkusRequest injectToken(ListSkusRequest payload, String token) { + return ListSkusRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSkusRequest injectPageSize(ListSkusRequest payload, int pageSize) { + return ListSkusRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSkusRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSkusResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSkusResponse payload) { + return payload.getSkusList() == null + ? ImmutableList.of() + : payload.getSkusList(); + } + }; + + private static final PagedListDescriptor + LIST_ZONES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListZonesRequest injectToken(ListZonesRequest payload, String token) { + return ListZonesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListZonesRequest injectPageSize(ListZonesRequest payload, int pageSize) { + return ListZonesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListZonesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListZonesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListZonesResponse payload) { + return payload.getZonesList() == null + ? ImmutableList.of() + : payload.getZonesList(); + } + }; + + 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() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListOrdersRequest, ListOrdersResponse, ListOrdersPagedResponse> + LIST_ORDERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListOrdersRequest, ListOrdersResponse, ListOrdersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListOrdersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ORDERS_PAGE_STR_DESC, request, context); + return ListOrdersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSitesRequest, ListSitesResponse, ListSitesPagedResponse> + LIST_SITES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSitesRequest, ListSitesResponse, ListSitesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSitesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SITES_PAGE_STR_DESC, request, context); + return ListSitesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListHardwareGroupsRequest, ListHardwareGroupsResponse, ListHardwareGroupsPagedResponse> + LIST_HARDWARE_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListHardwareGroupsRequest, + ListHardwareGroupsResponse, + ListHardwareGroupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListHardwareGroupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_HARDWARE_GROUPS_PAGE_STR_DESC, request, context); + return ListHardwareGroupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListHardwareRequest, ListHardwareResponse, ListHardwarePagedResponse> + LIST_HARDWARE_PAGE_STR_FACT = + new PagedListResponseFactory< + ListHardwareRequest, ListHardwareResponse, ListHardwarePagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListHardwareRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_HARDWARE_PAGE_STR_DESC, request, context); + return ListHardwarePagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListCommentsRequest, ListCommentsResponse, ListCommentsPagedResponse> + LIST_COMMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCommentsRequest, ListCommentsResponse, ListCommentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCommentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_COMMENTS_PAGE_STR_DESC, request, context); + return ListCommentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ListChangeLogEntriesPagedResponse> + LIST_CHANGE_LOG_ENTRIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ListChangeLogEntriesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListChangeLogEntriesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_CHANGE_LOG_ENTRIES_PAGE_STR_DESC, request, context); + return ListChangeLogEntriesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSkusRequest, ListSkusResponse, ListSkusPagedResponse> + LIST_SKUS_PAGE_STR_FACT = + new PagedListResponseFactory() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSkusRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SKUS_PAGE_STR_DESC, request, context); + return ListSkusPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListZonesRequest, ListZonesResponse, ListZonesPagedResponse> + LIST_ZONES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListZonesRequest, ListZonesResponse, ListZonesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListZonesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ZONES_PAGE_STR_DESC, request, context); + return ListZonesPagedResponse.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 listOrders. */ + public PagedCallSettings + listOrdersSettings() { + return listOrdersSettings; + } + + /** Returns the object with the settings used for calls to getOrder. */ + public UnaryCallSettings getOrderSettings() { + return getOrderSettings; + } + + /** Returns the object with the settings used for calls to createOrder. */ + public UnaryCallSettings createOrderSettings() { + return createOrderSettings; + } + + /** Returns the object with the settings used for calls to createOrder. */ + public OperationCallSettings + createOrderOperationSettings() { + return createOrderOperationSettings; + } + + /** Returns the object with the settings used for calls to updateOrder. */ + public UnaryCallSettings updateOrderSettings() { + return updateOrderSettings; + } + + /** Returns the object with the settings used for calls to updateOrder. */ + public OperationCallSettings + updateOrderOperationSettings() { + return updateOrderOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteOrder. */ + public UnaryCallSettings deleteOrderSettings() { + return deleteOrderSettings; + } + + /** Returns the object with the settings used for calls to deleteOrder. */ + public OperationCallSettings + deleteOrderOperationSettings() { + return deleteOrderOperationSettings; + } + + /** Returns the object with the settings used for calls to submitOrder. */ + public UnaryCallSettings submitOrderSettings() { + return submitOrderSettings; + } + + /** Returns the object with the settings used for calls to submitOrder. */ + public OperationCallSettings + submitOrderOperationSettings() { + return submitOrderOperationSettings; + } + + /** Returns the object with the settings used for calls to listSites. */ + public PagedCallSettings + listSitesSettings() { + return listSitesSettings; + } + + /** Returns the object with the settings used for calls to getSite. */ + public UnaryCallSettings getSiteSettings() { + return getSiteSettings; + } + + /** Returns the object with the settings used for calls to createSite. */ + public UnaryCallSettings createSiteSettings() { + return createSiteSettings; + } + + /** Returns the object with the settings used for calls to createSite. */ + public OperationCallSettings + createSiteOperationSettings() { + return createSiteOperationSettings; + } + + /** Returns the object with the settings used for calls to updateSite. */ + public UnaryCallSettings updateSiteSettings() { + return updateSiteSettings; + } + + /** Returns the object with the settings used for calls to updateSite. */ + public OperationCallSettings + updateSiteOperationSettings() { + return updateSiteOperationSettings; + } + + /** Returns the object with the settings used for calls to listHardwareGroups. */ + public PagedCallSettings< + ListHardwareGroupsRequest, ListHardwareGroupsResponse, ListHardwareGroupsPagedResponse> + listHardwareGroupsSettings() { + return listHardwareGroupsSettings; + } + + /** Returns the object with the settings used for calls to getHardwareGroup. */ + public UnaryCallSettings getHardwareGroupSettings() { + return getHardwareGroupSettings; + } + + /** Returns the object with the settings used for calls to createHardwareGroup. */ + public UnaryCallSettings createHardwareGroupSettings() { + return createHardwareGroupSettings; + } + + /** Returns the object with the settings used for calls to createHardwareGroup. */ + public OperationCallSettings + createHardwareGroupOperationSettings() { + return createHardwareGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to updateHardwareGroup. */ + public UnaryCallSettings updateHardwareGroupSettings() { + return updateHardwareGroupSettings; + } + + /** Returns the object with the settings used for calls to updateHardwareGroup. */ + public OperationCallSettings + updateHardwareGroupOperationSettings() { + return updateHardwareGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteHardwareGroup. */ + public UnaryCallSettings deleteHardwareGroupSettings() { + return deleteHardwareGroupSettings; + } + + /** Returns the object with the settings used for calls to deleteHardwareGroup. */ + public OperationCallSettings + deleteHardwareGroupOperationSettings() { + return deleteHardwareGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to listHardware. */ + public PagedCallSettings + listHardwareSettings() { + return listHardwareSettings; + } + + /** Returns the object with the settings used for calls to getHardware. */ + public UnaryCallSettings getHardwareSettings() { + return getHardwareSettings; + } + + /** Returns the object with the settings used for calls to createHardware. */ + public UnaryCallSettings createHardwareSettings() { + return createHardwareSettings; + } + + /** Returns the object with the settings used for calls to createHardware. */ + public OperationCallSettings + createHardwareOperationSettings() { + return createHardwareOperationSettings; + } + + /** Returns the object with the settings used for calls to updateHardware. */ + public UnaryCallSettings updateHardwareSettings() { + return updateHardwareSettings; + } + + /** Returns the object with the settings used for calls to updateHardware. */ + public OperationCallSettings + updateHardwareOperationSettings() { + return updateHardwareOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteHardware. */ + public UnaryCallSettings deleteHardwareSettings() { + return deleteHardwareSettings; + } + + /** Returns the object with the settings used for calls to deleteHardware. */ + public OperationCallSettings + deleteHardwareOperationSettings() { + return deleteHardwareOperationSettings; + } + + /** Returns the object with the settings used for calls to listComments. */ + public PagedCallSettings + listCommentsSettings() { + return listCommentsSettings; + } + + /** Returns the object with the settings used for calls to getComment. */ + public UnaryCallSettings getCommentSettings() { + return getCommentSettings; + } + + /** Returns the object with the settings used for calls to createComment. */ + public UnaryCallSettings createCommentSettings() { + return createCommentSettings; + } + + /** Returns the object with the settings used for calls to createComment. */ + public OperationCallSettings + createCommentOperationSettings() { + return createCommentOperationSettings; + } + + /** Returns the object with the settings used for calls to listChangeLogEntries. */ + public PagedCallSettings< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ListChangeLogEntriesPagedResponse> + listChangeLogEntriesSettings() { + return listChangeLogEntriesSettings; + } + + /** Returns the object with the settings used for calls to getChangeLogEntry. */ + public UnaryCallSettings getChangeLogEntrySettings() { + return getChangeLogEntrySettings; + } + + /** Returns the object with the settings used for calls to listSkus. */ + public PagedCallSettings + listSkusSettings() { + return listSkusSettings; + } + + /** Returns the object with the settings used for calls to getSku. */ + public UnaryCallSettings getSkuSettings() { + return getSkuSettings; + } + + /** Returns the object with the settings used for calls to listZones. */ + public PagedCallSettings + listZonesSettings() { + return listZonesSettings; + } + + /** Returns the object with the settings used for calls to getZone. */ + public UnaryCallSettings getZoneSettings() { + return getZoneSettings; + } + + /** Returns the object with the settings used for calls to createZone. */ + public UnaryCallSettings createZoneSettings() { + return createZoneSettings; + } + + /** Returns the object with the settings used for calls to createZone. */ + public OperationCallSettings + createZoneOperationSettings() { + return createZoneOperationSettings; + } + + /** Returns the object with the settings used for calls to updateZone. */ + public UnaryCallSettings updateZoneSettings() { + return updateZoneSettings; + } + + /** Returns the object with the settings used for calls to updateZone. */ + public OperationCallSettings + updateZoneOperationSettings() { + return updateZoneOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteZone. */ + public UnaryCallSettings deleteZoneSettings() { + return deleteZoneSettings; + } + + /** Returns the object with the settings used for calls to deleteZone. */ + public OperationCallSettings + deleteZoneOperationSettings() { + return deleteZoneOperationSettings; + } + + /** Returns the object with the settings used for calls to signalZoneState. */ + public UnaryCallSettings signalZoneStateSettings() { + return signalZoneStateSettings; + } + + /** Returns the object with the settings used for calls to signalZoneState. */ + public OperationCallSettings + signalZoneStateOperationSettings() { + return signalZoneStateOperationSettings; + } + + /** 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 GDCHardwareManagementStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcGDCHardwareManagementStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonGDCHardwareManagementStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "gdchardwaremanagement"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "gdchardwaremanagement.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "gdchardwaremanagement.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(GDCHardwareManagementStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(GDCHardwareManagementStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return GDCHardwareManagementStubSettings.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 GDCHardwareManagementStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listOrdersSettings = settingsBuilder.listOrdersSettings().build(); + getOrderSettings = settingsBuilder.getOrderSettings().build(); + createOrderSettings = settingsBuilder.createOrderSettings().build(); + createOrderOperationSettings = settingsBuilder.createOrderOperationSettings().build(); + updateOrderSettings = settingsBuilder.updateOrderSettings().build(); + updateOrderOperationSettings = settingsBuilder.updateOrderOperationSettings().build(); + deleteOrderSettings = settingsBuilder.deleteOrderSettings().build(); + deleteOrderOperationSettings = settingsBuilder.deleteOrderOperationSettings().build(); + submitOrderSettings = settingsBuilder.submitOrderSettings().build(); + submitOrderOperationSettings = settingsBuilder.submitOrderOperationSettings().build(); + listSitesSettings = settingsBuilder.listSitesSettings().build(); + getSiteSettings = settingsBuilder.getSiteSettings().build(); + createSiteSettings = settingsBuilder.createSiteSettings().build(); + createSiteOperationSettings = settingsBuilder.createSiteOperationSettings().build(); + updateSiteSettings = settingsBuilder.updateSiteSettings().build(); + updateSiteOperationSettings = settingsBuilder.updateSiteOperationSettings().build(); + listHardwareGroupsSettings = settingsBuilder.listHardwareGroupsSettings().build(); + getHardwareGroupSettings = settingsBuilder.getHardwareGroupSettings().build(); + createHardwareGroupSettings = settingsBuilder.createHardwareGroupSettings().build(); + createHardwareGroupOperationSettings = + settingsBuilder.createHardwareGroupOperationSettings().build(); + updateHardwareGroupSettings = settingsBuilder.updateHardwareGroupSettings().build(); + updateHardwareGroupOperationSettings = + settingsBuilder.updateHardwareGroupOperationSettings().build(); + deleteHardwareGroupSettings = settingsBuilder.deleteHardwareGroupSettings().build(); + deleteHardwareGroupOperationSettings = + settingsBuilder.deleteHardwareGroupOperationSettings().build(); + listHardwareSettings = settingsBuilder.listHardwareSettings().build(); + getHardwareSettings = settingsBuilder.getHardwareSettings().build(); + createHardwareSettings = settingsBuilder.createHardwareSettings().build(); + createHardwareOperationSettings = settingsBuilder.createHardwareOperationSettings().build(); + updateHardwareSettings = settingsBuilder.updateHardwareSettings().build(); + updateHardwareOperationSettings = settingsBuilder.updateHardwareOperationSettings().build(); + deleteHardwareSettings = settingsBuilder.deleteHardwareSettings().build(); + deleteHardwareOperationSettings = settingsBuilder.deleteHardwareOperationSettings().build(); + listCommentsSettings = settingsBuilder.listCommentsSettings().build(); + getCommentSettings = settingsBuilder.getCommentSettings().build(); + createCommentSettings = settingsBuilder.createCommentSettings().build(); + createCommentOperationSettings = settingsBuilder.createCommentOperationSettings().build(); + listChangeLogEntriesSettings = settingsBuilder.listChangeLogEntriesSettings().build(); + getChangeLogEntrySettings = settingsBuilder.getChangeLogEntrySettings().build(); + listSkusSettings = settingsBuilder.listSkusSettings().build(); + getSkuSettings = settingsBuilder.getSkuSettings().build(); + listZonesSettings = settingsBuilder.listZonesSettings().build(); + getZoneSettings = settingsBuilder.getZoneSettings().build(); + createZoneSettings = settingsBuilder.createZoneSettings().build(); + createZoneOperationSettings = settingsBuilder.createZoneOperationSettings().build(); + updateZoneSettings = settingsBuilder.updateZoneSettings().build(); + updateZoneOperationSettings = settingsBuilder.updateZoneOperationSettings().build(); + deleteZoneSettings = settingsBuilder.deleteZoneSettings().build(); + deleteZoneOperationSettings = settingsBuilder.deleteZoneOperationSettings().build(); + signalZoneStateSettings = settingsBuilder.signalZoneStateSettings().build(); + signalZoneStateOperationSettings = settingsBuilder.signalZoneStateOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for GDCHardwareManagementStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListOrdersRequest, ListOrdersResponse, ListOrdersPagedResponse> + listOrdersSettings; + private final UnaryCallSettings.Builder getOrderSettings; + private final UnaryCallSettings.Builder createOrderSettings; + private final OperationCallSettings.Builder + createOrderOperationSettings; + private final UnaryCallSettings.Builder updateOrderSettings; + private final OperationCallSettings.Builder + updateOrderOperationSettings; + private final UnaryCallSettings.Builder deleteOrderSettings; + private final OperationCallSettings.Builder + deleteOrderOperationSettings; + private final UnaryCallSettings.Builder submitOrderSettings; + private final OperationCallSettings.Builder + submitOrderOperationSettings; + private final PagedCallSettings.Builder< + ListSitesRequest, ListSitesResponse, ListSitesPagedResponse> + listSitesSettings; + private final UnaryCallSettings.Builder getSiteSettings; + private final UnaryCallSettings.Builder createSiteSettings; + private final OperationCallSettings.Builder + createSiteOperationSettings; + private final UnaryCallSettings.Builder updateSiteSettings; + private final OperationCallSettings.Builder + updateSiteOperationSettings; + private final PagedCallSettings.Builder< + ListHardwareGroupsRequest, ListHardwareGroupsResponse, ListHardwareGroupsPagedResponse> + listHardwareGroupsSettings; + private final UnaryCallSettings.Builder + getHardwareGroupSettings; + private final UnaryCallSettings.Builder + createHardwareGroupSettings; + private final OperationCallSettings.Builder< + CreateHardwareGroupRequest, HardwareGroup, OperationMetadata> + createHardwareGroupOperationSettings; + private final UnaryCallSettings.Builder + updateHardwareGroupSettings; + private final OperationCallSettings.Builder< + UpdateHardwareGroupRequest, HardwareGroup, OperationMetadata> + updateHardwareGroupOperationSettings; + private final UnaryCallSettings.Builder + deleteHardwareGroupSettings; + private final OperationCallSettings.Builder< + DeleteHardwareGroupRequest, Empty, OperationMetadata> + deleteHardwareGroupOperationSettings; + private final PagedCallSettings.Builder< + ListHardwareRequest, ListHardwareResponse, ListHardwarePagedResponse> + listHardwareSettings; + private final UnaryCallSettings.Builder getHardwareSettings; + private final UnaryCallSettings.Builder + createHardwareSettings; + private final OperationCallSettings.Builder + createHardwareOperationSettings; + private final UnaryCallSettings.Builder + updateHardwareSettings; + private final OperationCallSettings.Builder + updateHardwareOperationSettings; + private final UnaryCallSettings.Builder + deleteHardwareSettings; + private final OperationCallSettings.Builder + deleteHardwareOperationSettings; + private final PagedCallSettings.Builder< + ListCommentsRequest, ListCommentsResponse, ListCommentsPagedResponse> + listCommentsSettings; + private final UnaryCallSettings.Builder getCommentSettings; + private final UnaryCallSettings.Builder createCommentSettings; + private final OperationCallSettings.Builder + createCommentOperationSettings; + private final PagedCallSettings.Builder< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ListChangeLogEntriesPagedResponse> + listChangeLogEntriesSettings; + private final UnaryCallSettings.Builder + getChangeLogEntrySettings; + private final PagedCallSettings.Builder< + ListSkusRequest, ListSkusResponse, ListSkusPagedResponse> + listSkusSettings; + private final UnaryCallSettings.Builder getSkuSettings; + private final PagedCallSettings.Builder< + ListZonesRequest, ListZonesResponse, ListZonesPagedResponse> + listZonesSettings; + private final UnaryCallSettings.Builder getZoneSettings; + private final UnaryCallSettings.Builder createZoneSettings; + private final OperationCallSettings.Builder + createZoneOperationSettings; + private final UnaryCallSettings.Builder updateZoneSettings; + private final OperationCallSettings.Builder + updateZoneOperationSettings; + private final UnaryCallSettings.Builder deleteZoneSettings; + private final OperationCallSettings.Builder + deleteZoneOperationSettings; + private final UnaryCallSettings.Builder + signalZoneStateSettings; + private final OperationCallSettings.Builder + signalZoneStateOperationSettings; + 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() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(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); + + listOrdersSettings = PagedCallSettings.newBuilder(LIST_ORDERS_PAGE_STR_FACT); + getOrderSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createOrderSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createOrderOperationSettings = OperationCallSettings.newBuilder(); + updateOrderSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateOrderOperationSettings = OperationCallSettings.newBuilder(); + deleteOrderSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteOrderOperationSettings = OperationCallSettings.newBuilder(); + submitOrderSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + submitOrderOperationSettings = OperationCallSettings.newBuilder(); + listSitesSettings = PagedCallSettings.newBuilder(LIST_SITES_PAGE_STR_FACT); + getSiteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSiteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSiteOperationSettings = OperationCallSettings.newBuilder(); + updateSiteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSiteOperationSettings = OperationCallSettings.newBuilder(); + listHardwareGroupsSettings = PagedCallSettings.newBuilder(LIST_HARDWARE_GROUPS_PAGE_STR_FACT); + getHardwareGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createHardwareGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createHardwareGroupOperationSettings = OperationCallSettings.newBuilder(); + updateHardwareGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateHardwareGroupOperationSettings = OperationCallSettings.newBuilder(); + deleteHardwareGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteHardwareGroupOperationSettings = OperationCallSettings.newBuilder(); + listHardwareSettings = PagedCallSettings.newBuilder(LIST_HARDWARE_PAGE_STR_FACT); + getHardwareSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createHardwareSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createHardwareOperationSettings = OperationCallSettings.newBuilder(); + updateHardwareSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateHardwareOperationSettings = OperationCallSettings.newBuilder(); + deleteHardwareSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteHardwareOperationSettings = OperationCallSettings.newBuilder(); + listCommentsSettings = PagedCallSettings.newBuilder(LIST_COMMENTS_PAGE_STR_FACT); + getCommentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCommentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCommentOperationSettings = OperationCallSettings.newBuilder(); + listChangeLogEntriesSettings = + PagedCallSettings.newBuilder(LIST_CHANGE_LOG_ENTRIES_PAGE_STR_FACT); + getChangeLogEntrySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSkusSettings = PagedCallSettings.newBuilder(LIST_SKUS_PAGE_STR_FACT); + getSkuSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listZonesSettings = PagedCallSettings.newBuilder(LIST_ZONES_PAGE_STR_FACT); + getZoneSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createZoneSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createZoneOperationSettings = OperationCallSettings.newBuilder(); + updateZoneSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateZoneOperationSettings = OperationCallSettings.newBuilder(); + deleteZoneSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteZoneOperationSettings = OperationCallSettings.newBuilder(); + signalZoneStateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + signalZoneStateOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listOrdersSettings, + getOrderSettings, + createOrderSettings, + updateOrderSettings, + deleteOrderSettings, + submitOrderSettings, + listSitesSettings, + getSiteSettings, + createSiteSettings, + updateSiteSettings, + listHardwareGroupsSettings, + getHardwareGroupSettings, + createHardwareGroupSettings, + updateHardwareGroupSettings, + deleteHardwareGroupSettings, + listHardwareSettings, + getHardwareSettings, + createHardwareSettings, + updateHardwareSettings, + deleteHardwareSettings, + listCommentsSettings, + getCommentSettings, + createCommentSettings, + listChangeLogEntriesSettings, + getChangeLogEntrySettings, + listSkusSettings, + getSkuSettings, + listZonesSettings, + getZoneSettings, + createZoneSettings, + updateZoneSettings, + deleteZoneSettings, + signalZoneStateSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(GDCHardwareManagementStubSettings settings) { + super(settings); + + listOrdersSettings = settings.listOrdersSettings.toBuilder(); + getOrderSettings = settings.getOrderSettings.toBuilder(); + createOrderSettings = settings.createOrderSettings.toBuilder(); + createOrderOperationSettings = settings.createOrderOperationSettings.toBuilder(); + updateOrderSettings = settings.updateOrderSettings.toBuilder(); + updateOrderOperationSettings = settings.updateOrderOperationSettings.toBuilder(); + deleteOrderSettings = settings.deleteOrderSettings.toBuilder(); + deleteOrderOperationSettings = settings.deleteOrderOperationSettings.toBuilder(); + submitOrderSettings = settings.submitOrderSettings.toBuilder(); + submitOrderOperationSettings = settings.submitOrderOperationSettings.toBuilder(); + listSitesSettings = settings.listSitesSettings.toBuilder(); + getSiteSettings = settings.getSiteSettings.toBuilder(); + createSiteSettings = settings.createSiteSettings.toBuilder(); + createSiteOperationSettings = settings.createSiteOperationSettings.toBuilder(); + updateSiteSettings = settings.updateSiteSettings.toBuilder(); + updateSiteOperationSettings = settings.updateSiteOperationSettings.toBuilder(); + listHardwareGroupsSettings = settings.listHardwareGroupsSettings.toBuilder(); + getHardwareGroupSettings = settings.getHardwareGroupSettings.toBuilder(); + createHardwareGroupSettings = settings.createHardwareGroupSettings.toBuilder(); + createHardwareGroupOperationSettings = + settings.createHardwareGroupOperationSettings.toBuilder(); + updateHardwareGroupSettings = settings.updateHardwareGroupSettings.toBuilder(); + updateHardwareGroupOperationSettings = + settings.updateHardwareGroupOperationSettings.toBuilder(); + deleteHardwareGroupSettings = settings.deleteHardwareGroupSettings.toBuilder(); + deleteHardwareGroupOperationSettings = + settings.deleteHardwareGroupOperationSettings.toBuilder(); + listHardwareSettings = settings.listHardwareSettings.toBuilder(); + getHardwareSettings = settings.getHardwareSettings.toBuilder(); + createHardwareSettings = settings.createHardwareSettings.toBuilder(); + createHardwareOperationSettings = settings.createHardwareOperationSettings.toBuilder(); + updateHardwareSettings = settings.updateHardwareSettings.toBuilder(); + updateHardwareOperationSettings = settings.updateHardwareOperationSettings.toBuilder(); + deleteHardwareSettings = settings.deleteHardwareSettings.toBuilder(); + deleteHardwareOperationSettings = settings.deleteHardwareOperationSettings.toBuilder(); + listCommentsSettings = settings.listCommentsSettings.toBuilder(); + getCommentSettings = settings.getCommentSettings.toBuilder(); + createCommentSettings = settings.createCommentSettings.toBuilder(); + createCommentOperationSettings = settings.createCommentOperationSettings.toBuilder(); + listChangeLogEntriesSettings = settings.listChangeLogEntriesSettings.toBuilder(); + getChangeLogEntrySettings = settings.getChangeLogEntrySettings.toBuilder(); + listSkusSettings = settings.listSkusSettings.toBuilder(); + getSkuSettings = settings.getSkuSettings.toBuilder(); + listZonesSettings = settings.listZonesSettings.toBuilder(); + getZoneSettings = settings.getZoneSettings.toBuilder(); + createZoneSettings = settings.createZoneSettings.toBuilder(); + createZoneOperationSettings = settings.createZoneOperationSettings.toBuilder(); + updateZoneSettings = settings.updateZoneSettings.toBuilder(); + updateZoneOperationSettings = settings.updateZoneOperationSettings.toBuilder(); + deleteZoneSettings = settings.deleteZoneSettings.toBuilder(); + deleteZoneOperationSettings = settings.deleteZoneOperationSettings.toBuilder(); + signalZoneStateSettings = settings.signalZoneStateSettings.toBuilder(); + signalZoneStateOperationSettings = settings.signalZoneStateOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listOrdersSettings, + getOrderSettings, + createOrderSettings, + updateOrderSettings, + deleteOrderSettings, + submitOrderSettings, + listSitesSettings, + getSiteSettings, + createSiteSettings, + updateSiteSettings, + listHardwareGroupsSettings, + getHardwareGroupSettings, + createHardwareGroupSettings, + updateHardwareGroupSettings, + deleteHardwareGroupSettings, + listHardwareSettings, + getHardwareSettings, + createHardwareSettings, + updateHardwareSettings, + deleteHardwareSettings, + listCommentsSettings, + getCommentSettings, + createCommentSettings, + listChangeLogEntriesSettings, + getChangeLogEntrySettings, + listSkusSettings, + getSkuSettings, + listZonesSettings, + getZoneSettings, + createZoneSettings, + updateZoneSettings, + deleteZoneSettings, + signalZoneStateSettings, + 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 + .listOrdersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getOrderSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createOrderSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateOrderSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteOrderSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .submitOrderSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listSitesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getSiteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createSiteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateSiteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listHardwareGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getHardwareGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createHardwareGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateHardwareGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteHardwareGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listHardwareSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getHardwareSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createHardwareSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateHardwareSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteHardwareSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listCommentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getCommentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCommentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listChangeLogEntriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getChangeLogEntrySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listSkusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getSkuSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listZonesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getZoneSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createZoneSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateZoneSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteZoneSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .signalZoneStateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .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 + .createOrderOperationSettings() + .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(Order.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateOrderOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Order.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteOrderOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .submitOrderOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Order.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createSiteOperationSettings() + .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(Site.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateSiteOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Site.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createHardwareGroupOperationSettings() + .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(HardwareGroup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateHardwareGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(HardwareGroup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteHardwareGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createHardwareOperationSettings() + .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(Hardware.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateHardwareOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Hardware.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteHardwareOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createCommentOperationSettings() + .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(Comment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createZoneOperationSettings() + .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(Zone.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateZoneOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Zone.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteZoneOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .signalZoneStateOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Zone.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listOrders. */ + public PagedCallSettings.Builder + listOrdersSettings() { + return listOrdersSettings; + } + + /** Returns the builder for the settings used for calls to getOrder. */ + public UnaryCallSettings.Builder getOrderSettings() { + return getOrderSettings; + } + + /** Returns the builder for the settings used for calls to createOrder. */ + public UnaryCallSettings.Builder createOrderSettings() { + return createOrderSettings; + } + + /** Returns the builder for the settings used for calls to createOrder. */ + public OperationCallSettings.Builder + createOrderOperationSettings() { + return createOrderOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateOrder. */ + public UnaryCallSettings.Builder updateOrderSettings() { + return updateOrderSettings; + } + + /** Returns the builder for the settings used for calls to updateOrder. */ + public OperationCallSettings.Builder + updateOrderOperationSettings() { + return updateOrderOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteOrder. */ + public UnaryCallSettings.Builder deleteOrderSettings() { + return deleteOrderSettings; + } + + /** Returns the builder for the settings used for calls to deleteOrder. */ + public OperationCallSettings.Builder + deleteOrderOperationSettings() { + return deleteOrderOperationSettings; + } + + /** Returns the builder for the settings used for calls to submitOrder. */ + public UnaryCallSettings.Builder submitOrderSettings() { + return submitOrderSettings; + } + + /** Returns the builder for the settings used for calls to submitOrder. */ + public OperationCallSettings.Builder + submitOrderOperationSettings() { + return submitOrderOperationSettings; + } + + /** Returns the builder for the settings used for calls to listSites. */ + public PagedCallSettings.Builder + listSitesSettings() { + return listSitesSettings; + } + + /** Returns the builder for the settings used for calls to getSite. */ + public UnaryCallSettings.Builder getSiteSettings() { + return getSiteSettings; + } + + /** Returns the builder for the settings used for calls to createSite. */ + public UnaryCallSettings.Builder createSiteSettings() { + return createSiteSettings; + } + + /** Returns the builder for the settings used for calls to createSite. */ + public OperationCallSettings.Builder + createSiteOperationSettings() { + return createSiteOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateSite. */ + public UnaryCallSettings.Builder updateSiteSettings() { + return updateSiteSettings; + } + + /** Returns the builder for the settings used for calls to updateSite. */ + public OperationCallSettings.Builder + updateSiteOperationSettings() { + return updateSiteOperationSettings; + } + + /** Returns the builder for the settings used for calls to listHardwareGroups. */ + public PagedCallSettings.Builder< + ListHardwareGroupsRequest, ListHardwareGroupsResponse, ListHardwareGroupsPagedResponse> + listHardwareGroupsSettings() { + return listHardwareGroupsSettings; + } + + /** Returns the builder for the settings used for calls to getHardwareGroup. */ + public UnaryCallSettings.Builder + getHardwareGroupSettings() { + return getHardwareGroupSettings; + } + + /** Returns the builder for the settings used for calls to createHardwareGroup. */ + public UnaryCallSettings.Builder + createHardwareGroupSettings() { + return createHardwareGroupSettings; + } + + /** Returns the builder for the settings used for calls to createHardwareGroup. */ + public OperationCallSettings.Builder< + CreateHardwareGroupRequest, HardwareGroup, OperationMetadata> + createHardwareGroupOperationSettings() { + return createHardwareGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateHardwareGroup. */ + public UnaryCallSettings.Builder + updateHardwareGroupSettings() { + return updateHardwareGroupSettings; + } + + /** Returns the builder for the settings used for calls to updateHardwareGroup. */ + public OperationCallSettings.Builder< + UpdateHardwareGroupRequest, HardwareGroup, OperationMetadata> + updateHardwareGroupOperationSettings() { + return updateHardwareGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteHardwareGroup. */ + public UnaryCallSettings.Builder + deleteHardwareGroupSettings() { + return deleteHardwareGroupSettings; + } + + /** Returns the builder for the settings used for calls to deleteHardwareGroup. */ + public OperationCallSettings.Builder + deleteHardwareGroupOperationSettings() { + return deleteHardwareGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to listHardware. */ + public PagedCallSettings.Builder< + ListHardwareRequest, ListHardwareResponse, ListHardwarePagedResponse> + listHardwareSettings() { + return listHardwareSettings; + } + + /** Returns the builder for the settings used for calls to getHardware. */ + public UnaryCallSettings.Builder getHardwareSettings() { + return getHardwareSettings; + } + + /** Returns the builder for the settings used for calls to createHardware. */ + public UnaryCallSettings.Builder createHardwareSettings() { + return createHardwareSettings; + } + + /** Returns the builder for the settings used for calls to createHardware. */ + public OperationCallSettings.Builder + createHardwareOperationSettings() { + return createHardwareOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateHardware. */ + public UnaryCallSettings.Builder updateHardwareSettings() { + return updateHardwareSettings; + } + + /** Returns the builder for the settings used for calls to updateHardware. */ + public OperationCallSettings.Builder + updateHardwareOperationSettings() { + return updateHardwareOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteHardware. */ + public UnaryCallSettings.Builder deleteHardwareSettings() { + return deleteHardwareSettings; + } + + /** Returns the builder for the settings used for calls to deleteHardware. */ + public OperationCallSettings.Builder + deleteHardwareOperationSettings() { + return deleteHardwareOperationSettings; + } + + /** Returns the builder for the settings used for calls to listComments. */ + public PagedCallSettings.Builder< + ListCommentsRequest, ListCommentsResponse, ListCommentsPagedResponse> + listCommentsSettings() { + return listCommentsSettings; + } + + /** Returns the builder for the settings used for calls to getComment. */ + public UnaryCallSettings.Builder getCommentSettings() { + return getCommentSettings; + } + + /** Returns the builder for the settings used for calls to createComment. */ + public UnaryCallSettings.Builder createCommentSettings() { + return createCommentSettings; + } + + /** Returns the builder for the settings used for calls to createComment. */ + public OperationCallSettings.Builder + createCommentOperationSettings() { + return createCommentOperationSettings; + } + + /** Returns the builder for the settings used for calls to listChangeLogEntries. */ + public PagedCallSettings.Builder< + ListChangeLogEntriesRequest, + ListChangeLogEntriesResponse, + ListChangeLogEntriesPagedResponse> + listChangeLogEntriesSettings() { + return listChangeLogEntriesSettings; + } + + /** Returns the builder for the settings used for calls to getChangeLogEntry. */ + public UnaryCallSettings.Builder + getChangeLogEntrySettings() { + return getChangeLogEntrySettings; + } + + /** Returns the builder for the settings used for calls to listSkus. */ + public PagedCallSettings.Builder + listSkusSettings() { + return listSkusSettings; + } + + /** Returns the builder for the settings used for calls to getSku. */ + public UnaryCallSettings.Builder getSkuSettings() { + return getSkuSettings; + } + + /** Returns the builder for the settings used for calls to listZones. */ + public PagedCallSettings.Builder + listZonesSettings() { + return listZonesSettings; + } + + /** Returns the builder for the settings used for calls to getZone. */ + public UnaryCallSettings.Builder getZoneSettings() { + return getZoneSettings; + } + + /** Returns the builder for the settings used for calls to createZone. */ + public UnaryCallSettings.Builder createZoneSettings() { + return createZoneSettings; + } + + /** Returns the builder for the settings used for calls to createZone. */ + public OperationCallSettings.Builder + createZoneOperationSettings() { + return createZoneOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateZone. */ + public UnaryCallSettings.Builder updateZoneSettings() { + return updateZoneSettings; + } + + /** Returns the builder for the settings used for calls to updateZone. */ + public OperationCallSettings.Builder + updateZoneOperationSettings() { + return updateZoneOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteZone. */ + public UnaryCallSettings.Builder deleteZoneSettings() { + return deleteZoneSettings; + } + + /** Returns the builder for the settings used for calls to deleteZone. */ + public OperationCallSettings.Builder + deleteZoneOperationSettings() { + return deleteZoneOperationSettings; + } + + /** Returns the builder for the settings used for calls to signalZoneState. */ + public UnaryCallSettings.Builder signalZoneStateSettings() { + return signalZoneStateSettings; + } + + /** Returns the builder for the settings used for calls to signalZoneState. */ + public OperationCallSettings.Builder + signalZoneStateOperationSettings() { + return signalZoneStateOperationSettings; + } + + /** 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 GDCHardwareManagementStubSettings build() throws IOException { + return new GDCHardwareManagementStubSettings(this); + } + } +} diff --git a/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GrpcGDCHardwareManagementCallableFactory.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GrpcGDCHardwareManagementCallableFactory.java new file mode 100644 index 000000000000..2974ff1e78c2 --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GrpcGDCHardwareManagementCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the GDCHardwareManagement service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcGDCHardwareManagementCallableFactory 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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GrpcGDCHardwareManagementStub.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GrpcGDCHardwareManagementStub.java new file mode 100644 index 000000000000..91132e332108 --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/GrpcGDCHardwareManagementStub.java @@ -0,0 +1,1565 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.stub; + +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListCommentsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwareGroupsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwarePagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListLocationsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListOrdersPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSitesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSkusPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListZonesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; +import com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +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 GDCHardwareManagement service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcGDCHardwareManagementStub extends GDCHardwareManagementStub { + private static final MethodDescriptor + listOrdersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListOrders") + .setRequestMarshaller(ProtoUtils.marshaller(ListOrdersRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListOrdersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getOrderMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetOrder") + .setRequestMarshaller(ProtoUtils.marshaller(GetOrderRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Order.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createOrderMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateOrder") + .setRequestMarshaller(ProtoUtils.marshaller(CreateOrderRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateOrderMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/UpdateOrder") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateOrderRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteOrderMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/DeleteOrder") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteOrderRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor submitOrderMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/SubmitOrder") + .setRequestMarshaller(ProtoUtils.marshaller(SubmitOrderRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSitesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListSites") + .setRequestMarshaller(ProtoUtils.marshaller(ListSitesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListSitesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getSiteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetSite") + .setRequestMarshaller(ProtoUtils.marshaller(GetSiteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Site.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createSiteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateSite") + .setRequestMarshaller(ProtoUtils.marshaller(CreateSiteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateSiteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/UpdateSite") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateSiteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listHardwareGroupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListHardwareGroups") + .setRequestMarshaller( + ProtoUtils.marshaller(ListHardwareGroupsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListHardwareGroupsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getHardwareGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetHardwareGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(GetHardwareGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(HardwareGroup.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createHardwareGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateHardwareGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateHardwareGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateHardwareGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/UpdateHardwareGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateHardwareGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteHardwareGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/DeleteHardwareGroup") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteHardwareGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listHardwareMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListHardware") + .setRequestMarshaller(ProtoUtils.marshaller(ListHardwareRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListHardwareResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getHardwareMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetHardware") + .setRequestMarshaller(ProtoUtils.marshaller(GetHardwareRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Hardware.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createHardwareMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateHardware") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateHardwareRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateHardwareMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/UpdateHardware") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateHardwareRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteHardwareMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/DeleteHardware") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteHardwareRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listCommentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListComments") + .setRequestMarshaller(ProtoUtils.marshaller(ListCommentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCommentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getCommentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetComment") + .setRequestMarshaller(ProtoUtils.marshaller(GetCommentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Comment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createCommentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateComment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCommentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listChangeLogEntriesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListChangeLogEntries") + .setRequestMarshaller( + ProtoUtils.marshaller(ListChangeLogEntriesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListChangeLogEntriesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getChangeLogEntryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetChangeLogEntry") + .setRequestMarshaller( + ProtoUtils.marshaller(GetChangeLogEntryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ChangeLogEntry.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSkusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListSkus") + .setRequestMarshaller(ProtoUtils.marshaller(ListSkusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListSkusResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getSkuMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetSku") + .setRequestMarshaller(ProtoUtils.marshaller(GetSkuRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Sku.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listZonesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListZones") + .setRequestMarshaller(ProtoUtils.marshaller(ListZonesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListZonesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getZoneMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetZone") + .setRequestMarshaller(ProtoUtils.marshaller(GetZoneRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Zone.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createZoneMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateZone") + .setRequestMarshaller(ProtoUtils.marshaller(CreateZoneRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateZoneMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/UpdateZone") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateZoneRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteZoneMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/DeleteZone") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteZoneRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + signalZoneStateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/SignalZoneState") + .setRequestMarshaller( + ProtoUtils.marshaller(SignalZoneStateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.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 listOrdersCallable; + private final UnaryCallable listOrdersPagedCallable; + private final UnaryCallable getOrderCallable; + private final UnaryCallable createOrderCallable; + private final OperationCallable + createOrderOperationCallable; + private final UnaryCallable updateOrderCallable; + private final OperationCallable + updateOrderOperationCallable; + private final UnaryCallable deleteOrderCallable; + private final OperationCallable + deleteOrderOperationCallable; + private final UnaryCallable submitOrderCallable; + private final OperationCallable + submitOrderOperationCallable; + private final UnaryCallable listSitesCallable; + private final UnaryCallable listSitesPagedCallable; + private final UnaryCallable getSiteCallable; + private final UnaryCallable createSiteCallable; + private final OperationCallable + createSiteOperationCallable; + private final UnaryCallable updateSiteCallable; + private final OperationCallable + updateSiteOperationCallable; + private final UnaryCallable + listHardwareGroupsCallable; + private final UnaryCallable + listHardwareGroupsPagedCallable; + private final UnaryCallable getHardwareGroupCallable; + private final UnaryCallable createHardwareGroupCallable; + private final OperationCallable + createHardwareGroupOperationCallable; + private final UnaryCallable updateHardwareGroupCallable; + private final OperationCallable + updateHardwareGroupOperationCallable; + private final UnaryCallable deleteHardwareGroupCallable; + private final OperationCallable + deleteHardwareGroupOperationCallable; + private final UnaryCallable listHardwareCallable; + private final UnaryCallable + listHardwarePagedCallable; + private final UnaryCallable getHardwareCallable; + private final UnaryCallable createHardwareCallable; + private final OperationCallable + createHardwareOperationCallable; + private final UnaryCallable updateHardwareCallable; + private final OperationCallable + updateHardwareOperationCallable; + private final UnaryCallable deleteHardwareCallable; + private final OperationCallable + deleteHardwareOperationCallable; + private final UnaryCallable listCommentsCallable; + private final UnaryCallable + listCommentsPagedCallable; + private final UnaryCallable getCommentCallable; + private final UnaryCallable createCommentCallable; + private final OperationCallable + createCommentOperationCallable; + private final UnaryCallable + listChangeLogEntriesCallable; + private final UnaryCallable + listChangeLogEntriesPagedCallable; + private final UnaryCallable getChangeLogEntryCallable; + private final UnaryCallable listSkusCallable; + private final UnaryCallable listSkusPagedCallable; + private final UnaryCallable getSkuCallable; + private final UnaryCallable listZonesCallable; + private final UnaryCallable listZonesPagedCallable; + private final UnaryCallable getZoneCallable; + private final UnaryCallable createZoneCallable; + private final OperationCallable + createZoneOperationCallable; + private final UnaryCallable updateZoneCallable; + private final OperationCallable + updateZoneOperationCallable; + private final UnaryCallable deleteZoneCallable; + private final OperationCallable + deleteZoneOperationCallable; + private final UnaryCallable signalZoneStateCallable; + private final OperationCallable + signalZoneStateOperationCallable; + 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 GrpcGDCHardwareManagementStub create( + GDCHardwareManagementStubSettings settings) throws IOException { + return new GrpcGDCHardwareManagementStub(settings, ClientContext.create(settings)); + } + + public static final GrpcGDCHardwareManagementStub create(ClientContext clientContext) + throws IOException { + return new GrpcGDCHardwareManagementStub( + GDCHardwareManagementStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcGDCHardwareManagementStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcGDCHardwareManagementStub( + GDCHardwareManagementStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcGDCHardwareManagementStub, 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 GrpcGDCHardwareManagementStub( + GDCHardwareManagementStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcGDCHardwareManagementCallableFactory()); + } + + /** + * Constructs an instance of GrpcGDCHardwareManagementStub, 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 GrpcGDCHardwareManagementStub( + GDCHardwareManagementStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listOrdersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listOrdersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getOrderTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getOrderMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createOrderTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createOrderMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateOrderTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateOrderMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("order.name", String.valueOf(request.getOrder().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteOrderTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteOrderMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings submitOrderTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(submitOrderMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listSitesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSitesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSiteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSiteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createSiteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSiteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateSiteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSiteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("site.name", String.valueOf(request.getSite().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listHardwareGroupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listHardwareGroupsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getHardwareGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getHardwareGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createHardwareGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createHardwareGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateHardwareGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateHardwareGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "hardware_group.name", String.valueOf(request.getHardwareGroup().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteHardwareGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteHardwareGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listHardwareTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listHardwareMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getHardwareTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getHardwareMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createHardwareTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createHardwareMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateHardwareTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateHardwareMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("hardware.name", String.valueOf(request.getHardware().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteHardwareTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteHardwareMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listCommentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCommentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getCommentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCommentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createCommentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCommentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listChangeLogEntriesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listChangeLogEntriesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getChangeLogEntryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getChangeLogEntryMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listSkusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSkusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSkuTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSkuMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listZonesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listZonesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getZoneTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getZoneMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createZoneTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createZoneMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateZoneTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateZoneMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("zone.name", String.valueOf(request.getZone().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteZoneTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteZoneMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings signalZoneStateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(signalZoneStateMethodDescriptor) + .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.listOrdersCallable = + callableFactory.createUnaryCallable( + listOrdersTransportSettings, settings.listOrdersSettings(), clientContext); + this.listOrdersPagedCallable = + callableFactory.createPagedCallable( + listOrdersTransportSettings, settings.listOrdersSettings(), clientContext); + this.getOrderCallable = + callableFactory.createUnaryCallable( + getOrderTransportSettings, settings.getOrderSettings(), clientContext); + this.createOrderCallable = + callableFactory.createUnaryCallable( + createOrderTransportSettings, settings.createOrderSettings(), clientContext); + this.createOrderOperationCallable = + callableFactory.createOperationCallable( + createOrderTransportSettings, + settings.createOrderOperationSettings(), + clientContext, + operationsStub); + this.updateOrderCallable = + callableFactory.createUnaryCallable( + updateOrderTransportSettings, settings.updateOrderSettings(), clientContext); + this.updateOrderOperationCallable = + callableFactory.createOperationCallable( + updateOrderTransportSettings, + settings.updateOrderOperationSettings(), + clientContext, + operationsStub); + this.deleteOrderCallable = + callableFactory.createUnaryCallable( + deleteOrderTransportSettings, settings.deleteOrderSettings(), clientContext); + this.deleteOrderOperationCallable = + callableFactory.createOperationCallable( + deleteOrderTransportSettings, + settings.deleteOrderOperationSettings(), + clientContext, + operationsStub); + this.submitOrderCallable = + callableFactory.createUnaryCallable( + submitOrderTransportSettings, settings.submitOrderSettings(), clientContext); + this.submitOrderOperationCallable = + callableFactory.createOperationCallable( + submitOrderTransportSettings, + settings.submitOrderOperationSettings(), + clientContext, + operationsStub); + this.listSitesCallable = + callableFactory.createUnaryCallable( + listSitesTransportSettings, settings.listSitesSettings(), clientContext); + this.listSitesPagedCallable = + callableFactory.createPagedCallable( + listSitesTransportSettings, settings.listSitesSettings(), clientContext); + this.getSiteCallable = + callableFactory.createUnaryCallable( + getSiteTransportSettings, settings.getSiteSettings(), clientContext); + this.createSiteCallable = + callableFactory.createUnaryCallable( + createSiteTransportSettings, settings.createSiteSettings(), clientContext); + this.createSiteOperationCallable = + callableFactory.createOperationCallable( + createSiteTransportSettings, + settings.createSiteOperationSettings(), + clientContext, + operationsStub); + this.updateSiteCallable = + callableFactory.createUnaryCallable( + updateSiteTransportSettings, settings.updateSiteSettings(), clientContext); + this.updateSiteOperationCallable = + callableFactory.createOperationCallable( + updateSiteTransportSettings, + settings.updateSiteOperationSettings(), + clientContext, + operationsStub); + this.listHardwareGroupsCallable = + callableFactory.createUnaryCallable( + listHardwareGroupsTransportSettings, + settings.listHardwareGroupsSettings(), + clientContext); + this.listHardwareGroupsPagedCallable = + callableFactory.createPagedCallable( + listHardwareGroupsTransportSettings, + settings.listHardwareGroupsSettings(), + clientContext); + this.getHardwareGroupCallable = + callableFactory.createUnaryCallable( + getHardwareGroupTransportSettings, settings.getHardwareGroupSettings(), clientContext); + this.createHardwareGroupCallable = + callableFactory.createUnaryCallable( + createHardwareGroupTransportSettings, + settings.createHardwareGroupSettings(), + clientContext); + this.createHardwareGroupOperationCallable = + callableFactory.createOperationCallable( + createHardwareGroupTransportSettings, + settings.createHardwareGroupOperationSettings(), + clientContext, + operationsStub); + this.updateHardwareGroupCallable = + callableFactory.createUnaryCallable( + updateHardwareGroupTransportSettings, + settings.updateHardwareGroupSettings(), + clientContext); + this.updateHardwareGroupOperationCallable = + callableFactory.createOperationCallable( + updateHardwareGroupTransportSettings, + settings.updateHardwareGroupOperationSettings(), + clientContext, + operationsStub); + this.deleteHardwareGroupCallable = + callableFactory.createUnaryCallable( + deleteHardwareGroupTransportSettings, + settings.deleteHardwareGroupSettings(), + clientContext); + this.deleteHardwareGroupOperationCallable = + callableFactory.createOperationCallable( + deleteHardwareGroupTransportSettings, + settings.deleteHardwareGroupOperationSettings(), + clientContext, + operationsStub); + this.listHardwareCallable = + callableFactory.createUnaryCallable( + listHardwareTransportSettings, settings.listHardwareSettings(), clientContext); + this.listHardwarePagedCallable = + callableFactory.createPagedCallable( + listHardwareTransportSettings, settings.listHardwareSettings(), clientContext); + this.getHardwareCallable = + callableFactory.createUnaryCallable( + getHardwareTransportSettings, settings.getHardwareSettings(), clientContext); + this.createHardwareCallable = + callableFactory.createUnaryCallable( + createHardwareTransportSettings, settings.createHardwareSettings(), clientContext); + this.createHardwareOperationCallable = + callableFactory.createOperationCallable( + createHardwareTransportSettings, + settings.createHardwareOperationSettings(), + clientContext, + operationsStub); + this.updateHardwareCallable = + callableFactory.createUnaryCallable( + updateHardwareTransportSettings, settings.updateHardwareSettings(), clientContext); + this.updateHardwareOperationCallable = + callableFactory.createOperationCallable( + updateHardwareTransportSettings, + settings.updateHardwareOperationSettings(), + clientContext, + operationsStub); + this.deleteHardwareCallable = + callableFactory.createUnaryCallable( + deleteHardwareTransportSettings, settings.deleteHardwareSettings(), clientContext); + this.deleteHardwareOperationCallable = + callableFactory.createOperationCallable( + deleteHardwareTransportSettings, + settings.deleteHardwareOperationSettings(), + clientContext, + operationsStub); + this.listCommentsCallable = + callableFactory.createUnaryCallable( + listCommentsTransportSettings, settings.listCommentsSettings(), clientContext); + this.listCommentsPagedCallable = + callableFactory.createPagedCallable( + listCommentsTransportSettings, settings.listCommentsSettings(), clientContext); + this.getCommentCallable = + callableFactory.createUnaryCallable( + getCommentTransportSettings, settings.getCommentSettings(), clientContext); + this.createCommentCallable = + callableFactory.createUnaryCallable( + createCommentTransportSettings, settings.createCommentSettings(), clientContext); + this.createCommentOperationCallable = + callableFactory.createOperationCallable( + createCommentTransportSettings, + settings.createCommentOperationSettings(), + clientContext, + operationsStub); + this.listChangeLogEntriesCallable = + callableFactory.createUnaryCallable( + listChangeLogEntriesTransportSettings, + settings.listChangeLogEntriesSettings(), + clientContext); + this.listChangeLogEntriesPagedCallable = + callableFactory.createPagedCallable( + listChangeLogEntriesTransportSettings, + settings.listChangeLogEntriesSettings(), + clientContext); + this.getChangeLogEntryCallable = + callableFactory.createUnaryCallable( + getChangeLogEntryTransportSettings, + settings.getChangeLogEntrySettings(), + clientContext); + this.listSkusCallable = + callableFactory.createUnaryCallable( + listSkusTransportSettings, settings.listSkusSettings(), clientContext); + this.listSkusPagedCallable = + callableFactory.createPagedCallable( + listSkusTransportSettings, settings.listSkusSettings(), clientContext); + this.getSkuCallable = + callableFactory.createUnaryCallable( + getSkuTransportSettings, settings.getSkuSettings(), clientContext); + this.listZonesCallable = + callableFactory.createUnaryCallable( + listZonesTransportSettings, settings.listZonesSettings(), clientContext); + this.listZonesPagedCallable = + callableFactory.createPagedCallable( + listZonesTransportSettings, settings.listZonesSettings(), clientContext); + this.getZoneCallable = + callableFactory.createUnaryCallable( + getZoneTransportSettings, settings.getZoneSettings(), clientContext); + this.createZoneCallable = + callableFactory.createUnaryCallable( + createZoneTransportSettings, settings.createZoneSettings(), clientContext); + this.createZoneOperationCallable = + callableFactory.createOperationCallable( + createZoneTransportSettings, + settings.createZoneOperationSettings(), + clientContext, + operationsStub); + this.updateZoneCallable = + callableFactory.createUnaryCallable( + updateZoneTransportSettings, settings.updateZoneSettings(), clientContext); + this.updateZoneOperationCallable = + callableFactory.createOperationCallable( + updateZoneTransportSettings, + settings.updateZoneOperationSettings(), + clientContext, + operationsStub); + this.deleteZoneCallable = + callableFactory.createUnaryCallable( + deleteZoneTransportSettings, settings.deleteZoneSettings(), clientContext); + this.deleteZoneOperationCallable = + callableFactory.createOperationCallable( + deleteZoneTransportSettings, + settings.deleteZoneOperationSettings(), + clientContext, + operationsStub); + this.signalZoneStateCallable = + callableFactory.createUnaryCallable( + signalZoneStateTransportSettings, settings.signalZoneStateSettings(), clientContext); + this.signalZoneStateOperationCallable = + callableFactory.createOperationCallable( + signalZoneStateTransportSettings, + settings.signalZoneStateOperationSettings(), + clientContext, + operationsStub); + 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 listOrdersCallable() { + return listOrdersCallable; + } + + @Override + public UnaryCallable listOrdersPagedCallable() { + return listOrdersPagedCallable; + } + + @Override + public UnaryCallable getOrderCallable() { + return getOrderCallable; + } + + @Override + public UnaryCallable createOrderCallable() { + return createOrderCallable; + } + + @Override + public OperationCallable + createOrderOperationCallable() { + return createOrderOperationCallable; + } + + @Override + public UnaryCallable updateOrderCallable() { + return updateOrderCallable; + } + + @Override + public OperationCallable + updateOrderOperationCallable() { + return updateOrderOperationCallable; + } + + @Override + public UnaryCallable deleteOrderCallable() { + return deleteOrderCallable; + } + + @Override + public OperationCallable + deleteOrderOperationCallable() { + return deleteOrderOperationCallable; + } + + @Override + public UnaryCallable submitOrderCallable() { + return submitOrderCallable; + } + + @Override + public OperationCallable + submitOrderOperationCallable() { + return submitOrderOperationCallable; + } + + @Override + public UnaryCallable listSitesCallable() { + return listSitesCallable; + } + + @Override + public UnaryCallable listSitesPagedCallable() { + return listSitesPagedCallable; + } + + @Override + public UnaryCallable getSiteCallable() { + return getSiteCallable; + } + + @Override + public UnaryCallable createSiteCallable() { + return createSiteCallable; + } + + @Override + public OperationCallable + createSiteOperationCallable() { + return createSiteOperationCallable; + } + + @Override + public UnaryCallable updateSiteCallable() { + return updateSiteCallable; + } + + @Override + public OperationCallable + updateSiteOperationCallable() { + return updateSiteOperationCallable; + } + + @Override + public UnaryCallable + listHardwareGroupsCallable() { + return listHardwareGroupsCallable; + } + + @Override + public UnaryCallable + listHardwareGroupsPagedCallable() { + return listHardwareGroupsPagedCallable; + } + + @Override + public UnaryCallable getHardwareGroupCallable() { + return getHardwareGroupCallable; + } + + @Override + public UnaryCallable createHardwareGroupCallable() { + return createHardwareGroupCallable; + } + + @Override + public OperationCallable + createHardwareGroupOperationCallable() { + return createHardwareGroupOperationCallable; + } + + @Override + public UnaryCallable updateHardwareGroupCallable() { + return updateHardwareGroupCallable; + } + + @Override + public OperationCallable + updateHardwareGroupOperationCallable() { + return updateHardwareGroupOperationCallable; + } + + @Override + public UnaryCallable deleteHardwareGroupCallable() { + return deleteHardwareGroupCallable; + } + + @Override + public OperationCallable + deleteHardwareGroupOperationCallable() { + return deleteHardwareGroupOperationCallable; + } + + @Override + public UnaryCallable listHardwareCallable() { + return listHardwareCallable; + } + + @Override + public UnaryCallable listHardwarePagedCallable() { + return listHardwarePagedCallable; + } + + @Override + public UnaryCallable getHardwareCallable() { + return getHardwareCallable; + } + + @Override + public UnaryCallable createHardwareCallable() { + return createHardwareCallable; + } + + @Override + public OperationCallable + createHardwareOperationCallable() { + return createHardwareOperationCallable; + } + + @Override + public UnaryCallable updateHardwareCallable() { + return updateHardwareCallable; + } + + @Override + public OperationCallable + updateHardwareOperationCallable() { + return updateHardwareOperationCallable; + } + + @Override + public UnaryCallable deleteHardwareCallable() { + return deleteHardwareCallable; + } + + @Override + public OperationCallable + deleteHardwareOperationCallable() { + return deleteHardwareOperationCallable; + } + + @Override + public UnaryCallable listCommentsCallable() { + return listCommentsCallable; + } + + @Override + public UnaryCallable listCommentsPagedCallable() { + return listCommentsPagedCallable; + } + + @Override + public UnaryCallable getCommentCallable() { + return getCommentCallable; + } + + @Override + public UnaryCallable createCommentCallable() { + return createCommentCallable; + } + + @Override + public OperationCallable + createCommentOperationCallable() { + return createCommentOperationCallable; + } + + @Override + public UnaryCallable + listChangeLogEntriesCallable() { + return listChangeLogEntriesCallable; + } + + @Override + public UnaryCallable + listChangeLogEntriesPagedCallable() { + return listChangeLogEntriesPagedCallable; + } + + @Override + public UnaryCallable getChangeLogEntryCallable() { + return getChangeLogEntryCallable; + } + + @Override + public UnaryCallable listSkusCallable() { + return listSkusCallable; + } + + @Override + public UnaryCallable listSkusPagedCallable() { + return listSkusPagedCallable; + } + + @Override + public UnaryCallable getSkuCallable() { + return getSkuCallable; + } + + @Override + public UnaryCallable listZonesCallable() { + return listZonesCallable; + } + + @Override + public UnaryCallable listZonesPagedCallable() { + return listZonesPagedCallable; + } + + @Override + public UnaryCallable getZoneCallable() { + return getZoneCallable; + } + + @Override + public UnaryCallable createZoneCallable() { + return createZoneCallable; + } + + @Override + public OperationCallable + createZoneOperationCallable() { + return createZoneOperationCallable; + } + + @Override + public UnaryCallable updateZoneCallable() { + return updateZoneCallable; + } + + @Override + public OperationCallable + updateZoneOperationCallable() { + return updateZoneOperationCallable; + } + + @Override + public UnaryCallable deleteZoneCallable() { + return deleteZoneCallable; + } + + @Override + public OperationCallable + deleteZoneOperationCallable() { + return deleteZoneOperationCallable; + } + + @Override + public UnaryCallable signalZoneStateCallable() { + return signalZoneStateCallable; + } + + @Override + public OperationCallable + signalZoneStateOperationCallable() { + return signalZoneStateOperationCallable; + } + + @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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/HttpJsonGDCHardwareManagementCallableFactory.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/HttpJsonGDCHardwareManagementCallableFactory.java new file mode 100644 index 000000000000..5979afbc39c5 --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/HttpJsonGDCHardwareManagementCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the GDCHardwareManagement service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonGDCHardwareManagementCallableFactory + 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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/HttpJsonGDCHardwareManagementStub.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/HttpJsonGDCHardwareManagementStub.java new file mode 100644 index 000000000000..347808ab8abb --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/stub/HttpJsonGDCHardwareManagementStub.java @@ -0,0 +1,2719 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.stub; + +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListCommentsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwareGroupsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwarePagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListLocationsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListOrdersPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSitesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSkusPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListZonesPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; +import com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +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 GDCHardwareManagement service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonGDCHardwareManagementStub extends GDCHardwareManagementStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(Order.getDescriptor()) + .add(HardwareGroup.getDescriptor()) + .add(Site.getDescriptor()) + .add(Hardware.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Zone.getDescriptor()) + .add(Comment.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listOrdersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListOrders") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/orders", + 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(ListOrdersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getOrderMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetOrder") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/orders/*}", + 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(Order.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createOrderMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateOrder") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/orders", + 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, "orderId", request.getOrderId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("order", request.getOrder(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateOrderRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateOrderMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/UpdateOrder") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{order.name=projects/*/locations/*/orders/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "order.name", request.getOrder().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("order", request.getOrder(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateOrderRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteOrderMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/DeleteOrder") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/orders/*}", + 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, "force", request.getForce()); + 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( + (DeleteOrderRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + submitOrderMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/SubmitOrder") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/orders/*}:submit", + 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( + (SubmitOrderRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listSitesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListSites") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/sites", + 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(ListSitesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getSiteMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetSite") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/sites/*}", + 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(Site.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createSiteMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateSite") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/sites", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "siteId", request.getSiteId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("site", request.getSite(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateSiteRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateSiteMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/UpdateSite") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{site.name=projects/*/locations/*/sites/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "site.name", request.getSite().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("site", request.getSite(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateSiteRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listHardwareGroupsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListHardwareGroups") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/orders/*}/hardwareGroups", + 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(ListHardwareGroupsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getHardwareGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetHardwareGroup") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/orders/*/hardwareGroups/*}", + 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(HardwareGroup.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createHardwareGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateHardwareGroup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/orders/*}/hardwareGroups", + 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, "hardwareGroupId", request.getHardwareGroupId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("hardwareGroup", request.getHardwareGroup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateHardwareGroupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateHardwareGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/UpdateHardwareGroup") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{hardwareGroup.name=projects/*/locations/*/orders/*/hardwareGroups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "hardwareGroup.name", request.getHardwareGroup().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("hardwareGroup", request.getHardwareGroup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateHardwareGroupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteHardwareGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/DeleteHardwareGroup") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/orders/*/hardwareGroups/*}", + 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( + (DeleteHardwareGroupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listHardwareMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListHardware") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/hardware", + 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(ListHardwareResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getHardwareMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetHardware") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/hardware/*}", + 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(Hardware.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createHardwareMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateHardware") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/hardware", + 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, "hardwareId", request.getHardwareId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("hardware", request.getHardware(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateHardwareRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateHardwareMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/UpdateHardware") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{hardware.name=projects/*/locations/*/hardware/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "hardware.name", request.getHardware().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("hardware", request.getHardware(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateHardwareRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteHardwareMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/DeleteHardware") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/hardware/*}", + 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( + (DeleteHardwareRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listCommentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListComments") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/orders/*}/comments", + 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(ListCommentsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getCommentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetComment") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/orders/*/comments/*}", + 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(Comment.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createCommentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateComment") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/orders/*}/comments", + 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, "commentId", request.getCommentId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("comment", request.getComment(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateCommentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + ListChangeLogEntriesRequest, ListChangeLogEntriesResponse> + listChangeLogEntriesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListChangeLogEntries") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*/orders/*}/changeLogEntries", + 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(ListChangeLogEntriesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getChangeLogEntryMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetChangeLogEntry") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/orders/*/changeLogEntries/*}", + 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(ChangeLogEntry.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listSkusMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListSkus") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/skus", + 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(ListSkusResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getSkuMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetSku") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/skus/*}", + 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(Sku.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listZonesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/ListZones") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/zones", + 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(ListZonesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getZoneMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/GetZone") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/zones/*}", + 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(Zone.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createZoneMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/CreateZone") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{parent=projects/*/locations/*}/zones", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "zoneId", request.getZoneId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("zone", request.getZone(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateZoneRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateZoneMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/UpdateZone") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{zone.name=projects/*/locations/*/zones/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "zone.name", request.getZone().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("zone", request.getZone(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateZoneRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteZoneMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/DeleteZone") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/zones/*}", + 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( + (DeleteZoneRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + signalZoneStateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement/SignalZoneState") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{name=projects/*/locations/*/zones/*}:signal", + 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( + (SignalZoneStateRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{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( + "/v1alpha/{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 listOrdersCallable; + private final UnaryCallable listOrdersPagedCallable; + private final UnaryCallable getOrderCallable; + private final UnaryCallable createOrderCallable; + private final OperationCallable + createOrderOperationCallable; + private final UnaryCallable updateOrderCallable; + private final OperationCallable + updateOrderOperationCallable; + private final UnaryCallable deleteOrderCallable; + private final OperationCallable + deleteOrderOperationCallable; + private final UnaryCallable submitOrderCallable; + private final OperationCallable + submitOrderOperationCallable; + private final UnaryCallable listSitesCallable; + private final UnaryCallable listSitesPagedCallable; + private final UnaryCallable getSiteCallable; + private final UnaryCallable createSiteCallable; + private final OperationCallable + createSiteOperationCallable; + private final UnaryCallable updateSiteCallable; + private final OperationCallable + updateSiteOperationCallable; + private final UnaryCallable + listHardwareGroupsCallable; + private final UnaryCallable + listHardwareGroupsPagedCallable; + private final UnaryCallable getHardwareGroupCallable; + private final UnaryCallable createHardwareGroupCallable; + private final OperationCallable + createHardwareGroupOperationCallable; + private final UnaryCallable updateHardwareGroupCallable; + private final OperationCallable + updateHardwareGroupOperationCallable; + private final UnaryCallable deleteHardwareGroupCallable; + private final OperationCallable + deleteHardwareGroupOperationCallable; + private final UnaryCallable listHardwareCallable; + private final UnaryCallable + listHardwarePagedCallable; + private final UnaryCallable getHardwareCallable; + private final UnaryCallable createHardwareCallable; + private final OperationCallable + createHardwareOperationCallable; + private final UnaryCallable updateHardwareCallable; + private final OperationCallable + updateHardwareOperationCallable; + private final UnaryCallable deleteHardwareCallable; + private final OperationCallable + deleteHardwareOperationCallable; + private final UnaryCallable listCommentsCallable; + private final UnaryCallable + listCommentsPagedCallable; + private final UnaryCallable getCommentCallable; + private final UnaryCallable createCommentCallable; + private final OperationCallable + createCommentOperationCallable; + private final UnaryCallable + listChangeLogEntriesCallable; + private final UnaryCallable + listChangeLogEntriesPagedCallable; + private final UnaryCallable getChangeLogEntryCallable; + private final UnaryCallable listSkusCallable; + private final UnaryCallable listSkusPagedCallable; + private final UnaryCallable getSkuCallable; + private final UnaryCallable listZonesCallable; + private final UnaryCallable listZonesPagedCallable; + private final UnaryCallable getZoneCallable; + private final UnaryCallable createZoneCallable; + private final OperationCallable + createZoneOperationCallable; + private final UnaryCallable updateZoneCallable; + private final OperationCallable + updateZoneOperationCallable; + private final UnaryCallable deleteZoneCallable; + private final OperationCallable + deleteZoneOperationCallable; + private final UnaryCallable signalZoneStateCallable; + private final OperationCallable + signalZoneStateOperationCallable; + 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 HttpJsonGDCHardwareManagementStub create( + GDCHardwareManagementStubSettings settings) throws IOException { + return new HttpJsonGDCHardwareManagementStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonGDCHardwareManagementStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonGDCHardwareManagementStub( + GDCHardwareManagementStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonGDCHardwareManagementStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonGDCHardwareManagementStub( + GDCHardwareManagementStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonGDCHardwareManagementStub, 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 HttpJsonGDCHardwareManagementStub( + GDCHardwareManagementStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonGDCHardwareManagementCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonGDCHardwareManagementStub, 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 HttpJsonGDCHardwareManagementStub( + GDCHardwareManagementStubSettings 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("/v1alpha/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1alpha/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings listOrdersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listOrdersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getOrderTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getOrderMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createOrderTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createOrderMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateOrderTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateOrderMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("order.name", String.valueOf(request.getOrder().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteOrderTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteOrderMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings submitOrderTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(submitOrderMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listSitesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSitesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getSiteTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSiteMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createSiteTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSiteMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateSiteTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSiteMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("site.name", String.valueOf(request.getSite().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listHardwareGroupsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listHardwareGroupsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getHardwareGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getHardwareGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createHardwareGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createHardwareGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateHardwareGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateHardwareGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "hardware_group.name", + String.valueOf(request.getHardwareGroup().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteHardwareGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteHardwareGroupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listHardwareTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listHardwareMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getHardwareTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getHardwareMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createHardwareTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createHardwareMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateHardwareTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateHardwareMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("hardware.name", String.valueOf(request.getHardware().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteHardwareTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteHardwareMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listCommentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listCommentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getCommentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getCommentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createCommentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createCommentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listChangeLogEntriesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listChangeLogEntriesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getChangeLogEntryTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getChangeLogEntryMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listSkusTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSkusMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getSkuTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSkuMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listZonesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listZonesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getZoneTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getZoneMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createZoneTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createZoneMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateZoneTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateZoneMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("zone.name", String.valueOf(request.getZone().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteZoneTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteZoneMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings signalZoneStateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(signalZoneStateMethodDescriptor) + .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.listOrdersCallable = + callableFactory.createUnaryCallable( + listOrdersTransportSettings, settings.listOrdersSettings(), clientContext); + this.listOrdersPagedCallable = + callableFactory.createPagedCallable( + listOrdersTransportSettings, settings.listOrdersSettings(), clientContext); + this.getOrderCallable = + callableFactory.createUnaryCallable( + getOrderTransportSettings, settings.getOrderSettings(), clientContext); + this.createOrderCallable = + callableFactory.createUnaryCallable( + createOrderTransportSettings, settings.createOrderSettings(), clientContext); + this.createOrderOperationCallable = + callableFactory.createOperationCallable( + createOrderTransportSettings, + settings.createOrderOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateOrderCallable = + callableFactory.createUnaryCallable( + updateOrderTransportSettings, settings.updateOrderSettings(), clientContext); + this.updateOrderOperationCallable = + callableFactory.createOperationCallable( + updateOrderTransportSettings, + settings.updateOrderOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteOrderCallable = + callableFactory.createUnaryCallable( + deleteOrderTransportSettings, settings.deleteOrderSettings(), clientContext); + this.deleteOrderOperationCallable = + callableFactory.createOperationCallable( + deleteOrderTransportSettings, + settings.deleteOrderOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.submitOrderCallable = + callableFactory.createUnaryCallable( + submitOrderTransportSettings, settings.submitOrderSettings(), clientContext); + this.submitOrderOperationCallable = + callableFactory.createOperationCallable( + submitOrderTransportSettings, + settings.submitOrderOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listSitesCallable = + callableFactory.createUnaryCallable( + listSitesTransportSettings, settings.listSitesSettings(), clientContext); + this.listSitesPagedCallable = + callableFactory.createPagedCallable( + listSitesTransportSettings, settings.listSitesSettings(), clientContext); + this.getSiteCallable = + callableFactory.createUnaryCallable( + getSiteTransportSettings, settings.getSiteSettings(), clientContext); + this.createSiteCallable = + callableFactory.createUnaryCallable( + createSiteTransportSettings, settings.createSiteSettings(), clientContext); + this.createSiteOperationCallable = + callableFactory.createOperationCallable( + createSiteTransportSettings, + settings.createSiteOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateSiteCallable = + callableFactory.createUnaryCallable( + updateSiteTransportSettings, settings.updateSiteSettings(), clientContext); + this.updateSiteOperationCallable = + callableFactory.createOperationCallable( + updateSiteTransportSettings, + settings.updateSiteOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listHardwareGroupsCallable = + callableFactory.createUnaryCallable( + listHardwareGroupsTransportSettings, + settings.listHardwareGroupsSettings(), + clientContext); + this.listHardwareGroupsPagedCallable = + callableFactory.createPagedCallable( + listHardwareGroupsTransportSettings, + settings.listHardwareGroupsSettings(), + clientContext); + this.getHardwareGroupCallable = + callableFactory.createUnaryCallable( + getHardwareGroupTransportSettings, settings.getHardwareGroupSettings(), clientContext); + this.createHardwareGroupCallable = + callableFactory.createUnaryCallable( + createHardwareGroupTransportSettings, + settings.createHardwareGroupSettings(), + clientContext); + this.createHardwareGroupOperationCallable = + callableFactory.createOperationCallable( + createHardwareGroupTransportSettings, + settings.createHardwareGroupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateHardwareGroupCallable = + callableFactory.createUnaryCallable( + updateHardwareGroupTransportSettings, + settings.updateHardwareGroupSettings(), + clientContext); + this.updateHardwareGroupOperationCallable = + callableFactory.createOperationCallable( + updateHardwareGroupTransportSettings, + settings.updateHardwareGroupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteHardwareGroupCallable = + callableFactory.createUnaryCallable( + deleteHardwareGroupTransportSettings, + settings.deleteHardwareGroupSettings(), + clientContext); + this.deleteHardwareGroupOperationCallable = + callableFactory.createOperationCallable( + deleteHardwareGroupTransportSettings, + settings.deleteHardwareGroupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listHardwareCallable = + callableFactory.createUnaryCallable( + listHardwareTransportSettings, settings.listHardwareSettings(), clientContext); + this.listHardwarePagedCallable = + callableFactory.createPagedCallable( + listHardwareTransportSettings, settings.listHardwareSettings(), clientContext); + this.getHardwareCallable = + callableFactory.createUnaryCallable( + getHardwareTransportSettings, settings.getHardwareSettings(), clientContext); + this.createHardwareCallable = + callableFactory.createUnaryCallable( + createHardwareTransportSettings, settings.createHardwareSettings(), clientContext); + this.createHardwareOperationCallable = + callableFactory.createOperationCallable( + createHardwareTransportSettings, + settings.createHardwareOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateHardwareCallable = + callableFactory.createUnaryCallable( + updateHardwareTransportSettings, settings.updateHardwareSettings(), clientContext); + this.updateHardwareOperationCallable = + callableFactory.createOperationCallable( + updateHardwareTransportSettings, + settings.updateHardwareOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteHardwareCallable = + callableFactory.createUnaryCallable( + deleteHardwareTransportSettings, settings.deleteHardwareSettings(), clientContext); + this.deleteHardwareOperationCallable = + callableFactory.createOperationCallable( + deleteHardwareTransportSettings, + settings.deleteHardwareOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listCommentsCallable = + callableFactory.createUnaryCallable( + listCommentsTransportSettings, settings.listCommentsSettings(), clientContext); + this.listCommentsPagedCallable = + callableFactory.createPagedCallable( + listCommentsTransportSettings, settings.listCommentsSettings(), clientContext); + this.getCommentCallable = + callableFactory.createUnaryCallable( + getCommentTransportSettings, settings.getCommentSettings(), clientContext); + this.createCommentCallable = + callableFactory.createUnaryCallable( + createCommentTransportSettings, settings.createCommentSettings(), clientContext); + this.createCommentOperationCallable = + callableFactory.createOperationCallable( + createCommentTransportSettings, + settings.createCommentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listChangeLogEntriesCallable = + callableFactory.createUnaryCallable( + listChangeLogEntriesTransportSettings, + settings.listChangeLogEntriesSettings(), + clientContext); + this.listChangeLogEntriesPagedCallable = + callableFactory.createPagedCallable( + listChangeLogEntriesTransportSettings, + settings.listChangeLogEntriesSettings(), + clientContext); + this.getChangeLogEntryCallable = + callableFactory.createUnaryCallable( + getChangeLogEntryTransportSettings, + settings.getChangeLogEntrySettings(), + clientContext); + this.listSkusCallable = + callableFactory.createUnaryCallable( + listSkusTransportSettings, settings.listSkusSettings(), clientContext); + this.listSkusPagedCallable = + callableFactory.createPagedCallable( + listSkusTransportSettings, settings.listSkusSettings(), clientContext); + this.getSkuCallable = + callableFactory.createUnaryCallable( + getSkuTransportSettings, settings.getSkuSettings(), clientContext); + this.listZonesCallable = + callableFactory.createUnaryCallable( + listZonesTransportSettings, settings.listZonesSettings(), clientContext); + this.listZonesPagedCallable = + callableFactory.createPagedCallable( + listZonesTransportSettings, settings.listZonesSettings(), clientContext); + this.getZoneCallable = + callableFactory.createUnaryCallable( + getZoneTransportSettings, settings.getZoneSettings(), clientContext); + this.createZoneCallable = + callableFactory.createUnaryCallable( + createZoneTransportSettings, settings.createZoneSettings(), clientContext); + this.createZoneOperationCallable = + callableFactory.createOperationCallable( + createZoneTransportSettings, + settings.createZoneOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateZoneCallable = + callableFactory.createUnaryCallable( + updateZoneTransportSettings, settings.updateZoneSettings(), clientContext); + this.updateZoneOperationCallable = + callableFactory.createOperationCallable( + updateZoneTransportSettings, + settings.updateZoneOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteZoneCallable = + callableFactory.createUnaryCallable( + deleteZoneTransportSettings, settings.deleteZoneSettings(), clientContext); + this.deleteZoneOperationCallable = + callableFactory.createOperationCallable( + deleteZoneTransportSettings, + settings.deleteZoneOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.signalZoneStateCallable = + callableFactory.createUnaryCallable( + signalZoneStateTransportSettings, settings.signalZoneStateSettings(), clientContext); + this.signalZoneStateOperationCallable = + callableFactory.createOperationCallable( + signalZoneStateTransportSettings, + settings.signalZoneStateOperationSettings(), + clientContext, + httpJsonOperationsStub); + 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(listOrdersMethodDescriptor); + methodDescriptors.add(getOrderMethodDescriptor); + methodDescriptors.add(createOrderMethodDescriptor); + methodDescriptors.add(updateOrderMethodDescriptor); + methodDescriptors.add(deleteOrderMethodDescriptor); + methodDescriptors.add(submitOrderMethodDescriptor); + methodDescriptors.add(listSitesMethodDescriptor); + methodDescriptors.add(getSiteMethodDescriptor); + methodDescriptors.add(createSiteMethodDescriptor); + methodDescriptors.add(updateSiteMethodDescriptor); + methodDescriptors.add(listHardwareGroupsMethodDescriptor); + methodDescriptors.add(getHardwareGroupMethodDescriptor); + methodDescriptors.add(createHardwareGroupMethodDescriptor); + methodDescriptors.add(updateHardwareGroupMethodDescriptor); + methodDescriptors.add(deleteHardwareGroupMethodDescriptor); + methodDescriptors.add(listHardwareMethodDescriptor); + methodDescriptors.add(getHardwareMethodDescriptor); + methodDescriptors.add(createHardwareMethodDescriptor); + methodDescriptors.add(updateHardwareMethodDescriptor); + methodDescriptors.add(deleteHardwareMethodDescriptor); + methodDescriptors.add(listCommentsMethodDescriptor); + methodDescriptors.add(getCommentMethodDescriptor); + methodDescriptors.add(createCommentMethodDescriptor); + methodDescriptors.add(listChangeLogEntriesMethodDescriptor); + methodDescriptors.add(getChangeLogEntryMethodDescriptor); + methodDescriptors.add(listSkusMethodDescriptor); + methodDescriptors.add(getSkuMethodDescriptor); + methodDescriptors.add(listZonesMethodDescriptor); + methodDescriptors.add(getZoneMethodDescriptor); + methodDescriptors.add(createZoneMethodDescriptor); + methodDescriptors.add(updateZoneMethodDescriptor); + methodDescriptors.add(deleteZoneMethodDescriptor); + methodDescriptors.add(signalZoneStateMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listOrdersCallable() { + return listOrdersCallable; + } + + @Override + public UnaryCallable listOrdersPagedCallable() { + return listOrdersPagedCallable; + } + + @Override + public UnaryCallable getOrderCallable() { + return getOrderCallable; + } + + @Override + public UnaryCallable createOrderCallable() { + return createOrderCallable; + } + + @Override + public OperationCallable + createOrderOperationCallable() { + return createOrderOperationCallable; + } + + @Override + public UnaryCallable updateOrderCallable() { + return updateOrderCallable; + } + + @Override + public OperationCallable + updateOrderOperationCallable() { + return updateOrderOperationCallable; + } + + @Override + public UnaryCallable deleteOrderCallable() { + return deleteOrderCallable; + } + + @Override + public OperationCallable + deleteOrderOperationCallable() { + return deleteOrderOperationCallable; + } + + @Override + public UnaryCallable submitOrderCallable() { + return submitOrderCallable; + } + + @Override + public OperationCallable + submitOrderOperationCallable() { + return submitOrderOperationCallable; + } + + @Override + public UnaryCallable listSitesCallable() { + return listSitesCallable; + } + + @Override + public UnaryCallable listSitesPagedCallable() { + return listSitesPagedCallable; + } + + @Override + public UnaryCallable getSiteCallable() { + return getSiteCallable; + } + + @Override + public UnaryCallable createSiteCallable() { + return createSiteCallable; + } + + @Override + public OperationCallable + createSiteOperationCallable() { + return createSiteOperationCallable; + } + + @Override + public UnaryCallable updateSiteCallable() { + return updateSiteCallable; + } + + @Override + public OperationCallable + updateSiteOperationCallable() { + return updateSiteOperationCallable; + } + + @Override + public UnaryCallable + listHardwareGroupsCallable() { + return listHardwareGroupsCallable; + } + + @Override + public UnaryCallable + listHardwareGroupsPagedCallable() { + return listHardwareGroupsPagedCallable; + } + + @Override + public UnaryCallable getHardwareGroupCallable() { + return getHardwareGroupCallable; + } + + @Override + public UnaryCallable createHardwareGroupCallable() { + return createHardwareGroupCallable; + } + + @Override + public OperationCallable + createHardwareGroupOperationCallable() { + return createHardwareGroupOperationCallable; + } + + @Override + public UnaryCallable updateHardwareGroupCallable() { + return updateHardwareGroupCallable; + } + + @Override + public OperationCallable + updateHardwareGroupOperationCallable() { + return updateHardwareGroupOperationCallable; + } + + @Override + public UnaryCallable deleteHardwareGroupCallable() { + return deleteHardwareGroupCallable; + } + + @Override + public OperationCallable + deleteHardwareGroupOperationCallable() { + return deleteHardwareGroupOperationCallable; + } + + @Override + public UnaryCallable listHardwareCallable() { + return listHardwareCallable; + } + + @Override + public UnaryCallable listHardwarePagedCallable() { + return listHardwarePagedCallable; + } + + @Override + public UnaryCallable getHardwareCallable() { + return getHardwareCallable; + } + + @Override + public UnaryCallable createHardwareCallable() { + return createHardwareCallable; + } + + @Override + public OperationCallable + createHardwareOperationCallable() { + return createHardwareOperationCallable; + } + + @Override + public UnaryCallable updateHardwareCallable() { + return updateHardwareCallable; + } + + @Override + public OperationCallable + updateHardwareOperationCallable() { + return updateHardwareOperationCallable; + } + + @Override + public UnaryCallable deleteHardwareCallable() { + return deleteHardwareCallable; + } + + @Override + public OperationCallable + deleteHardwareOperationCallable() { + return deleteHardwareOperationCallable; + } + + @Override + public UnaryCallable listCommentsCallable() { + return listCommentsCallable; + } + + @Override + public UnaryCallable listCommentsPagedCallable() { + return listCommentsPagedCallable; + } + + @Override + public UnaryCallable getCommentCallable() { + return getCommentCallable; + } + + @Override + public UnaryCallable createCommentCallable() { + return createCommentCallable; + } + + @Override + public OperationCallable + createCommentOperationCallable() { + return createCommentOperationCallable; + } + + @Override + public UnaryCallable + listChangeLogEntriesCallable() { + return listChangeLogEntriesCallable; + } + + @Override + public UnaryCallable + listChangeLogEntriesPagedCallable() { + return listChangeLogEntriesPagedCallable; + } + + @Override + public UnaryCallable getChangeLogEntryCallable() { + return getChangeLogEntryCallable; + } + + @Override + public UnaryCallable listSkusCallable() { + return listSkusCallable; + } + + @Override + public UnaryCallable listSkusPagedCallable() { + return listSkusPagedCallable; + } + + @Override + public UnaryCallable getSkuCallable() { + return getSkuCallable; + } + + @Override + public UnaryCallable listZonesCallable() { + return listZonesCallable; + } + + @Override + public UnaryCallable listZonesPagedCallable() { + return listZonesPagedCallable; + } + + @Override + public UnaryCallable getZoneCallable() { + return getZoneCallable; + } + + @Override + public UnaryCallable createZoneCallable() { + return createZoneCallable; + } + + @Override + public OperationCallable + createZoneOperationCallable() { + return createZoneOperationCallable; + } + + @Override + public UnaryCallable updateZoneCallable() { + return updateZoneCallable; + } + + @Override + public OperationCallable + updateZoneOperationCallable() { + return updateZoneOperationCallable; + } + + @Override + public UnaryCallable deleteZoneCallable() { + return deleteZoneCallable; + } + + @Override + public OperationCallable + deleteZoneOperationCallable() { + return deleteZoneOperationCallable; + } + + @Override + public UnaryCallable signalZoneStateCallable() { + return signalZoneStateCallable; + } + + @Override + public OperationCallable + signalZoneStateOperationCallable() { + return signalZoneStateOperationCallable; + } + + @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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/resources/META-INF/native-image/com.google.cloud.gdchardwaremanagement.v1alpha/reflect-config.json b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/resources/META-INF/native-image/com.google.cloud.gdchardwaremanagement.v1alpha/reflect-config.json new file mode 100644 index 000000000000..fa4b51d078ba --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/main/resources/META-INF/native-image/com.google.cloud.gdchardwaremanagement.v1alpha/reflect-config.json @@ -0,0 +1,2810 @@ +[ + { + "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.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.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Comment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Comment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Contact", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Contact$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Hardware", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Hardware$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Hardware$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo$RackType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo$Amperes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo$NetworkUplinkType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo$PowerReceptacleType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo$Voltage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Order", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Order$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Order$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Order$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest$StateSignal", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Site", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Site$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Sku", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Sku$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Sku$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Subnet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Subnet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Zone", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Zone$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.Zone$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig$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 + }, + { + "name": "com.google.type.Date", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Date$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.DateTime", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.DateTime$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.DayOfWeek", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.PostalAddress", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.PostalAddress$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.TimeOfDay", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.TimeOfDay$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.TimeZone", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.TimeZone$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementClientHttpJsonTest.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementClientHttpJsonTest.java new file mode 100644 index 000000000000..35faf4ea98b7 --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementClientHttpJsonTest.java @@ -0,0 +1,3704 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListCommentsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwareGroupsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwarePagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListLocationsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListOrdersPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSitesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSkusPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListZonesPagedResponse; + +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.gdchardwaremanagement.v1alpha.stub.HttpJsonGDCHardwareManagementStub; +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 com.google.type.Date; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +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 GDCHardwareManagementClientHttpJsonTest { + private static MockHttpService mockService; + private static GDCHardwareManagementClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonGDCHardwareManagementStub.getMethodDescriptors(), + GDCHardwareManagementSettings.getDefaultEndpoint()); + GDCHardwareManagementSettings settings = + GDCHardwareManagementSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + GDCHardwareManagementSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = GDCHardwareManagementClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listOrdersTest() throws Exception { + Order responsesElement = Order.newBuilder().build(); + ListOrdersResponse expectedResponse = + ListOrdersResponse.newBuilder() + .setNextPageToken("") + .addAllOrders(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListOrdersPagedResponse pagedListResponse = client.listOrders(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOrdersList().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 listOrdersExceptionTest() 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.listOrders(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOrdersTest2() throws Exception { + Order responsesElement = Order.newBuilder().build(); + ListOrdersResponse expectedResponse = + ListOrdersResponse.newBuilder() + .setNextPageToken("") + .addAllOrders(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListOrdersPagedResponse pagedListResponse = client.listOrders(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOrdersList().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 listOrdersExceptionTest2() 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.listOrders(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOrderTest() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + Order actualResponse = client.getOrder(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 getOrderExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.getOrder(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOrderTest2() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6539/locations/location-6539/orders/order-6539"; + + Order actualResponse = client.getOrder(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 getOrderExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6539/locations/location-6539/orders/order-6539"; + client.getOrder(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createOrderTest() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Order order = Order.newBuilder().build(); + String orderId = "orderId-1207110391"; + + Order actualResponse = client.createOrderAsync(parent, order, orderId).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 createOrderExceptionTest() 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]"); + Order order = Order.newBuilder().build(); + String orderId = "orderId-1207110391"; + client.createOrderAsync(parent, order, orderId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createOrderTest2() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Order order = Order.newBuilder().build(); + String orderId = "orderId-1207110391"; + + Order actualResponse = client.createOrderAsync(parent, order, orderId).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 createOrderExceptionTest2() 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"; + Order order = Order.newBuilder().build(); + String orderId = "orderId-1207110391"; + client.createOrderAsync(parent, order, orderId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateOrderTest() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Order order = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Order actualResponse = client.updateOrderAsync(order, 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 updateOrderExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Order order = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateOrderAsync(order, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteOrderTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + client.deleteOrderAsync(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 deleteOrderExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.deleteOrderAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteOrderTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-6539/locations/location-6539/orders/order-6539"; + + client.deleteOrderAsync(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 deleteOrderExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6539/locations/location-6539/orders/order-6539"; + client.deleteOrderAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void submitOrderTest() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("submitOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + Order actualResponse = client.submitOrderAsync(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 submitOrderExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.submitOrderAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void submitOrderTest2() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("submitOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-6539/locations/location-6539/orders/order-6539"; + + Order actualResponse = client.submitOrderAsync(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 submitOrderExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6539/locations/location-6539/orders/order-6539"; + client.submitOrderAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listSitesTest() throws Exception { + Site responsesElement = Site.newBuilder().build(); + ListSitesResponse expectedResponse = + ListSitesResponse.newBuilder() + .setNextPageToken("") + .addAllSites(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListSitesPagedResponse pagedListResponse = client.listSites(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSitesList().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 listSitesExceptionTest() 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.listSites(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSitesTest2() throws Exception { + Site responsesElement = Site.newBuilder().build(); + ListSitesResponse expectedResponse = + ListSitesResponse.newBuilder() + .setNextPageToken("") + .addAllSites(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListSitesPagedResponse pagedListResponse = client.listSites(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSitesList().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 listSitesExceptionTest2() 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.listSites(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSiteTest() throws Exception { + Site expectedResponse = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + mockService.addResponse(expectedResponse); + + SiteName name = SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]"); + + Site actualResponse = client.getSite(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 getSiteExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SiteName name = SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]"); + client.getSite(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSiteTest2() throws Exception { + Site expectedResponse = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-546/locations/location-546/sites/site-546"; + + Site actualResponse = client.getSite(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 getSiteExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-546/locations/location-546/sites/site-546"; + client.getSite(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSiteTest() throws Exception { + Site expectedResponse = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSiteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Site site = Site.newBuilder().build(); + String siteId = "siteId-902090046"; + + Site actualResponse = client.createSiteAsync(parent, site, siteId).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 createSiteExceptionTest() 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]"); + Site site = Site.newBuilder().build(); + String siteId = "siteId-902090046"; + client.createSiteAsync(parent, site, siteId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createSiteTest2() throws Exception { + Site expectedResponse = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSiteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Site site = Site.newBuilder().build(); + String siteId = "siteId-902090046"; + + Site actualResponse = client.createSiteAsync(parent, site, siteId).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 createSiteExceptionTest2() 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"; + Site site = Site.newBuilder().build(); + String siteId = "siteId-902090046"; + client.createSiteAsync(parent, site, siteId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateSiteTest() throws Exception { + Site expectedResponse = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSiteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Site site = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Site actualResponse = client.updateSiteAsync(site, 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 updateSiteExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Site site = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSiteAsync(site, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listHardwareGroupsTest() throws Exception { + HardwareGroup responsesElement = HardwareGroup.newBuilder().build(); + ListHardwareGroupsResponse expectedResponse = + ListHardwareGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllHardwareGroups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + ListHardwareGroupsPagedResponse pagedListResponse = client.listHardwareGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHardwareGroupsList().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 listHardwareGroupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.listHardwareGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listHardwareGroupsTest2() throws Exception { + HardwareGroup responsesElement = HardwareGroup.newBuilder().build(); + ListHardwareGroupsResponse expectedResponse = + ListHardwareGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllHardwareGroups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7558/locations/location-7558/orders/order-7558"; + + ListHardwareGroupsPagedResponse pagedListResponse = client.listHardwareGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHardwareGroupsList().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 listHardwareGroupsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7558/locations/location-7558/orders/order-7558"; + client.listHardwareGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHardwareGroupTest() throws Exception { + HardwareGroup expectedResponse = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + HardwareGroupName name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]"); + + HardwareGroup actualResponse = client.getHardwareGroup(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 getHardwareGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + HardwareGroupName name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]"); + client.getHardwareGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHardwareGroupTest2() throws Exception { + HardwareGroup expectedResponse = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-5233/locations/location-5233/orders/order-5233/hardwareGroups/hardwareGroup-5233"; + + HardwareGroup actualResponse = client.getHardwareGroup(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 getHardwareGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5233/locations/location-5233/orders/order-5233/hardwareGroups/hardwareGroup-5233"; + client.getHardwareGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createHardwareGroupTest() throws Exception { + HardwareGroup expectedResponse = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createHardwareGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + String hardwareGroupId = "hardwareGroupId-1961682702"; + + HardwareGroup actualResponse = + client.createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId).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 createHardwareGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + String hardwareGroupId = "hardwareGroupId-1961682702"; + client.createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createHardwareGroupTest2() throws Exception { + HardwareGroup expectedResponse = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createHardwareGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-7558/locations/location-7558/orders/order-7558"; + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + String hardwareGroupId = "hardwareGroupId-1961682702"; + + HardwareGroup actualResponse = + client.createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId).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 createHardwareGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7558/locations/location-7558/orders/order-7558"; + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + String hardwareGroupId = "hardwareGroupId-1961682702"; + client.createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateHardwareGroupTest() throws Exception { + HardwareGroup expectedResponse = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateHardwareGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + HardwareGroup hardwareGroup = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + HardwareGroup actualResponse = client.updateHardwareGroupAsync(hardwareGroup, 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 updateHardwareGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + HardwareGroup hardwareGroup = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateHardwareGroupAsync(hardwareGroup, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteHardwareGroupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHardwareGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + HardwareGroupName name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]"); + + client.deleteHardwareGroupAsync(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 deleteHardwareGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + HardwareGroupName name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]"); + client.deleteHardwareGroupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteHardwareGroupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHardwareGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-5233/locations/location-5233/orders/order-5233/hardwareGroups/hardwareGroup-5233"; + + client.deleteHardwareGroupAsync(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 deleteHardwareGroupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5233/locations/location-5233/orders/order-5233/hardwareGroups/hardwareGroup-5233"; + client.deleteHardwareGroupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listHardwareTest() throws Exception { + Hardware responsesElement = Hardware.newBuilder().build(); + ListHardwareResponse expectedResponse = + ListHardwareResponse.newBuilder() + .setNextPageToken("") + .addAllHardware(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListHardwarePagedResponse pagedListResponse = client.listHardware(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHardwareList().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 listHardwareExceptionTest() 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.listHardware(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listHardwareTest2() throws Exception { + Hardware responsesElement = Hardware.newBuilder().build(); + ListHardwareResponse expectedResponse = + ListHardwareResponse.newBuilder() + .setNextPageToken("") + .addAllHardware(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListHardwarePagedResponse pagedListResponse = client.listHardware(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHardwareList().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 listHardwareExceptionTest2() 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.listHardware(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHardwareTest() throws Exception { + Hardware expectedResponse = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]"); + + Hardware actualResponse = client.getHardware(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 getHardwareExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]"); + client.getHardware(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHardwareTest2() throws Exception { + Hardware expectedResponse = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1800/locations/location-1800/hardware/hardwar-1800"; + + Hardware actualResponse = client.getHardware(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 getHardwareExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1800/locations/location-1800/hardware/hardwar-1800"; + client.getHardware(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createHardwareTest() throws Exception { + Hardware expectedResponse = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createHardwareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Hardware hardware = Hardware.newBuilder().build(); + String hardwareId = "hardwareId680924451"; + + Hardware actualResponse = client.createHardwareAsync(parent, hardware, hardwareId).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 createHardwareExceptionTest() 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]"); + Hardware hardware = Hardware.newBuilder().build(); + String hardwareId = "hardwareId680924451"; + client.createHardwareAsync(parent, hardware, hardwareId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createHardwareTest2() throws Exception { + Hardware expectedResponse = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createHardwareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Hardware hardware = Hardware.newBuilder().build(); + String hardwareId = "hardwareId680924451"; + + Hardware actualResponse = client.createHardwareAsync(parent, hardware, hardwareId).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 createHardwareExceptionTest2() 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"; + Hardware hardware = Hardware.newBuilder().build(); + String hardwareId = "hardwareId680924451"; + client.createHardwareAsync(parent, hardware, hardwareId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateHardwareTest() throws Exception { + Hardware expectedResponse = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateHardwareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Hardware hardware = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Hardware actualResponse = client.updateHardwareAsync(hardware, 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 updateHardwareExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Hardware hardware = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateHardwareAsync(hardware, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteHardwareTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHardwareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]"); + + client.deleteHardwareAsync(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 deleteHardwareExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]"); + client.deleteHardwareAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteHardwareTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHardwareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-1800/locations/location-1800/hardware/hardwar-1800"; + + client.deleteHardwareAsync(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 deleteHardwareExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1800/locations/location-1800/hardware/hardwar-1800"; + client.deleteHardwareAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listCommentsTest() throws Exception { + Comment responsesElement = Comment.newBuilder().build(); + ListCommentsResponse expectedResponse = + ListCommentsResponse.newBuilder() + .setNextPageToken("") + .addAllComments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + ListCommentsPagedResponse pagedListResponse = client.listComments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCommentsList().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 listCommentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.listComments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCommentsTest2() throws Exception { + Comment responsesElement = Comment.newBuilder().build(); + ListCommentsResponse expectedResponse = + ListCommentsResponse.newBuilder() + .setNextPageToken("") + .addAllComments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7558/locations/location-7558/orders/order-7558"; + + ListCommentsPagedResponse pagedListResponse = client.listComments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCommentsList().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 listCommentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7558/locations/location-7558/orders/order-7558"; + client.listComments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCommentTest() throws Exception { + Comment expectedResponse = + Comment.newBuilder() + .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAuthor("author-1406328437") + .setText("text3556653") + .build(); + mockService.addResponse(expectedResponse); + + CommentName name = CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]"); + + Comment actualResponse = client.getComment(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 getCommentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CommentName name = CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]"); + client.getComment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCommentTest2() throws Exception { + Comment expectedResponse = + Comment.newBuilder() + .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAuthor("author-1406328437") + .setText("text3556653") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6823/locations/location-6823/orders/order-6823/comments/comment-6823"; + + Comment actualResponse = client.getComment(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 getCommentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6823/locations/location-6823/orders/order-6823/comments/comment-6823"; + client.getComment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCommentTest() throws Exception { + Comment expectedResponse = + Comment.newBuilder() + .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAuthor("author-1406328437") + .setText("text3556653") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCommentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + Comment comment = Comment.newBuilder().build(); + String commentId = "commentId-1495016486"; + + Comment actualResponse = client.createCommentAsync(parent, comment, commentId).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 createCommentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + Comment comment = Comment.newBuilder().build(); + String commentId = "commentId-1495016486"; + client.createCommentAsync(parent, comment, commentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createCommentTest2() throws Exception { + Comment expectedResponse = + Comment.newBuilder() + .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAuthor("author-1406328437") + .setText("text3556653") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCommentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-7558/locations/location-7558/orders/order-7558"; + Comment comment = Comment.newBuilder().build(); + String commentId = "commentId-1495016486"; + + Comment actualResponse = client.createCommentAsync(parent, comment, commentId).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 createCommentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7558/locations/location-7558/orders/order-7558"; + Comment comment = Comment.newBuilder().build(); + String commentId = "commentId-1495016486"; + client.createCommentAsync(parent, comment, commentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listChangeLogEntriesTest() throws Exception { + ChangeLogEntry responsesElement = ChangeLogEntry.newBuilder().build(); + ListChangeLogEntriesResponse expectedResponse = + ListChangeLogEntriesResponse.newBuilder() + .setNextPageToken("") + .addAllChangeLogEntries(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + ListChangeLogEntriesPagedResponse pagedListResponse = client.listChangeLogEntries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getChangeLogEntriesList().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 listChangeLogEntriesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.listChangeLogEntries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listChangeLogEntriesTest2() throws Exception { + ChangeLogEntry responsesElement = ChangeLogEntry.newBuilder().build(); + ListChangeLogEntriesResponse expectedResponse = + ListChangeLogEntriesResponse.newBuilder() + .setNextPageToken("") + .addAllChangeLogEntries(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7558/locations/location-7558/orders/order-7558"; + + ListChangeLogEntriesPagedResponse pagedListResponse = client.listChangeLogEntries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getChangeLogEntriesList().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 listChangeLogEntriesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7558/locations/location-7558/orders/order-7558"; + client.listChangeLogEntries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getChangeLogEntryTest() throws Exception { + ChangeLogEntry expectedResponse = + ChangeLogEntry.newBuilder() + .setName( + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLog("log107332") + .build(); + mockService.addResponse(expectedResponse); + + ChangeLogEntryName name = + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]"); + + ChangeLogEntry actualResponse = client.getChangeLogEntry(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 getChangeLogEntryExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ChangeLogEntryName name = + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]"); + client.getChangeLogEntry(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getChangeLogEntryTest2() throws Exception { + ChangeLogEntry expectedResponse = + ChangeLogEntry.newBuilder() + .setName( + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLog("log107332") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8433/locations/location-8433/orders/order-8433/changeLogEntries/changeLogEntrie-8433"; + + ChangeLogEntry actualResponse = client.getChangeLogEntry(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 getChangeLogEntryExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8433/locations/location-8433/orders/order-8433/changeLogEntries/changeLogEntrie-8433"; + client.getChangeLogEntry(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSkusTest() throws Exception { + Sku responsesElement = Sku.newBuilder().build(); + ListSkusResponse expectedResponse = + ListSkusResponse.newBuilder() + .setNextPageToken("") + .addAllSkus(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListSkusPagedResponse pagedListResponse = client.listSkus(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSkusList().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 listSkusExceptionTest() 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.listSkus(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSkusTest2() throws Exception { + Sku responsesElement = Sku.newBuilder().build(); + ListSkusResponse expectedResponse = + ListSkusResponse.newBuilder() + .setNextPageToken("") + .addAllSkus(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListSkusPagedResponse pagedListResponse = client.listSkus(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSkusList().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 listSkusExceptionTest2() 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.listSkus(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSkuTest() throws Exception { + Sku expectedResponse = + Sku.newBuilder() + .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConfig(SkuConfig.newBuilder().build()) + .addAllInstances(new ArrayList()) + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setIsActive(true) + .setVcpuCount(936475650) + .build(); + mockService.addResponse(expectedResponse); + + SkuName name = SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]"); + + Sku actualResponse = client.getSku(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 getSkuExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SkuName name = SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]"); + client.getSku(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSkuTest2() throws Exception { + Sku expectedResponse = + Sku.newBuilder() + .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConfig(SkuConfig.newBuilder().build()) + .addAllInstances(new ArrayList()) + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setIsActive(true) + .setVcpuCount(936475650) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9002/locations/location-9002/skus/sku-9002"; + + Sku actualResponse = client.getSku(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 getSkuExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9002/locations/location-9002/skus/sku-9002"; + client.getSku(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listZonesTest() throws Exception { + Zone responsesElement = Zone.newBuilder().build(); + ListZonesResponse expectedResponse = + ListZonesResponse.newBuilder() + .setNextPageToken("") + .addAllZones(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListZonesPagedResponse pagedListResponse = client.listZones(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getZonesList().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 listZonesExceptionTest() 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.listZones(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listZonesTest2() throws Exception { + Zone responsesElement = Zone.newBuilder().build(); + ListZonesResponse expectedResponse = + ListZonesResponse.newBuilder() + .setNextPageToken("") + .addAllZones(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListZonesPagedResponse pagedListResponse = client.listZones(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getZonesList().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 listZonesExceptionTest2() 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.listZones(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getZoneTest() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + mockService.addResponse(expectedResponse); + + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + Zone actualResponse = client.getZone(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 getZoneExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.getZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getZoneTest2() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4499/locations/location-4499/zones/zone-4499"; + + Zone actualResponse = client.getZone(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 getZoneExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4499/locations/location-4499/zones/zone-4499"; + client.getZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createZoneTest() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createZoneTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Zone zone = Zone.newBuilder().build(); + String zoneId = "zoneId-696323609"; + + Zone actualResponse = client.createZoneAsync(parent, zone, zoneId).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 createZoneExceptionTest() 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]"); + Zone zone = Zone.newBuilder().build(); + String zoneId = "zoneId-696323609"; + client.createZoneAsync(parent, zone, zoneId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createZoneTest2() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createZoneTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Zone zone = Zone.newBuilder().build(); + String zoneId = "zoneId-696323609"; + + Zone actualResponse = client.createZoneAsync(parent, zone, zoneId).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 createZoneExceptionTest2() 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"; + Zone zone = Zone.newBuilder().build(); + String zoneId = "zoneId-696323609"; + client.createZoneAsync(parent, zone, zoneId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateZoneTest() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateZoneTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Zone zone = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Zone actualResponse = client.updateZoneAsync(zone, 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 updateZoneExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Zone zone = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateZoneAsync(zone, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteZoneTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteZoneTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + client.deleteZoneAsync(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 deleteZoneExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.deleteZoneAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteZoneTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteZoneTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-4499/locations/location-4499/zones/zone-4499"; + + client.deleteZoneAsync(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 deleteZoneExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4499/locations/location-4499/zones/zone-4499"; + client.deleteZoneAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void signalZoneStateTest() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("signalZoneStateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + SignalZoneStateRequest.StateSignal stateSignal = + SignalZoneStateRequest.StateSignal.forNumber(0); + + Zone actualResponse = client.signalZoneStateAsync(name, stateSignal).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 signalZoneStateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + SignalZoneStateRequest.StateSignal stateSignal = + SignalZoneStateRequest.StateSignal.forNumber(0); + client.signalZoneStateAsync(name, stateSignal).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void signalZoneStateTest2() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("signalZoneStateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-4499/locations/location-4499/zones/zone-4499"; + SignalZoneStateRequest.StateSignal stateSignal = + SignalZoneStateRequest.StateSignal.forNumber(0); + + Zone actualResponse = client.signalZoneStateAsync(name, stateSignal).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 signalZoneStateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4499/locations/location-4499/zones/zone-4499"; + SignalZoneStateRequest.StateSignal stateSignal = + SignalZoneStateRequest.StateSignal.forNumber(0); + client.signalZoneStateAsync(name, stateSignal).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementClientTest.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementClientTest.java new file mode 100644 index 000000000000..0023df391c16 --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementClientTest.java @@ -0,0 +1,3298 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListCommentsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwareGroupsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListHardwarePagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListLocationsPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListOrdersPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSitesPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListSkusPagedResponse; +import static com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient.ListZonesPagedResponse; + +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 com.google.type.Date; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class GDCHardwareManagementClientTest { + private static MockGDCHardwareManagement mockGDCHardwareManagement; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private GDCHardwareManagementClient client; + + @BeforeClass + public static void startStaticServer() { + mockGDCHardwareManagement = new MockGDCHardwareManagement(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockGDCHardwareManagement, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + GDCHardwareManagementSettings settings = + GDCHardwareManagementSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = GDCHardwareManagementClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listOrdersTest() throws Exception { + Order responsesElement = Order.newBuilder().build(); + ListOrdersResponse expectedResponse = + ListOrdersResponse.newBuilder() + .setNextPageToken("") + .addAllOrders(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListOrdersPagedResponse pagedListResponse = client.listOrders(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOrdersList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOrdersRequest actualRequest = ((ListOrdersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOrdersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listOrders(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOrdersTest2() throws Exception { + Order responsesElement = Order.newBuilder().build(); + ListOrdersResponse expectedResponse = + ListOrdersResponse.newBuilder() + .setNextPageToken("") + .addAllOrders(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListOrdersPagedResponse pagedListResponse = client.listOrders(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOrdersList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOrdersRequest actualRequest = ((ListOrdersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOrdersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + client.listOrders(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOrderTest() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + Order actualResponse = client.getOrder(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOrderRequest actualRequest = ((GetOrderRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOrderExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.getOrder(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOrderTest2() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String name = "name3373707"; + + Order actualResponse = client.getOrder(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOrderRequest actualRequest = ((GetOrderRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOrderExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.getOrder(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createOrderTest() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Order order = Order.newBuilder().build(); + String orderId = "orderId-1207110391"; + + Order actualResponse = client.createOrderAsync(parent, order, orderId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateOrderRequest actualRequest = ((CreateOrderRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(order, actualRequest.getOrder()); + Assert.assertEquals(orderId, actualRequest.getOrderId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createOrderExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Order order = Order.newBuilder().build(); + String orderId = "orderId-1207110391"; + client.createOrderAsync(parent, order, orderId).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 createOrderTest2() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String parent = "parent-995424086"; + Order order = Order.newBuilder().build(); + String orderId = "orderId-1207110391"; + + Order actualResponse = client.createOrderAsync(parent, order, orderId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateOrderRequest actualRequest = ((CreateOrderRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(order, actualRequest.getOrder()); + Assert.assertEquals(orderId, actualRequest.getOrderId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createOrderExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + Order order = Order.newBuilder().build(); + String orderId = "orderId-1207110391"; + client.createOrderAsync(parent, order, orderId).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 updateOrderTest() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + Order order = Order.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Order actualResponse = client.updateOrderAsync(order, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateOrderRequest actualRequest = ((UpdateOrderRequest) actualRequests.get(0)); + + Assert.assertEquals(order, actualRequest.getOrder()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateOrderExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + Order order = Order.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateOrderAsync(order, 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 deleteOrderTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + client.deleteOrderAsync(name).get(); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteOrderRequest actualRequest = ((DeleteOrderRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteOrderExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.deleteOrderAsync(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 deleteOrderTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteOrderAsync(name).get(); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteOrderRequest actualRequest = ((DeleteOrderRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteOrderExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.deleteOrderAsync(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 submitOrderTest() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("submitOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + Order actualResponse = client.submitOrderAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SubmitOrderRequest actualRequest = ((SubmitOrderRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void submitOrderExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.submitOrderAsync(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 submitOrderTest2() throws Exception { + Order expectedResponse = + Order.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .addAllTargetWorkloads(new ArrayList()) + .setCustomerMotivation("customerMotivation419733780") + .setFulfillmentTime(Timestamp.newBuilder().build()) + .setRegionCode("regionCode-1991004415") + .setOrderFormUri("orderFormUri212580058") + .setSubmitTime(Timestamp.newBuilder().build()) + .setBillingId("billingId1828026614") + .addAllExistingHardware(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("submitOrderTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String name = "name3373707"; + + Order actualResponse = client.submitOrderAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SubmitOrderRequest actualRequest = ((SubmitOrderRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void submitOrderExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.submitOrderAsync(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 listSitesTest() throws Exception { + Site responsesElement = Site.newBuilder().build(); + ListSitesResponse expectedResponse = + ListSitesResponse.newBuilder() + .setNextPageToken("") + .addAllSites(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListSitesPagedResponse pagedListResponse = client.listSites(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSitesList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSitesRequest actualRequest = ((ListSitesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSitesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listSites(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSitesTest2() throws Exception { + Site responsesElement = Site.newBuilder().build(); + ListSitesResponse expectedResponse = + ListSitesResponse.newBuilder() + .setNextPageToken("") + .addAllSites(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSitesPagedResponse pagedListResponse = client.listSites(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSitesList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSitesRequest actualRequest = ((ListSitesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSitesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSites(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSiteTest() throws Exception { + Site expectedResponse = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + SiteName name = SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]"); + + Site actualResponse = client.getSite(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSiteRequest actualRequest = ((GetSiteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSiteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + SiteName name = SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]"); + client.getSite(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSiteTest2() throws Exception { + Site expectedResponse = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String name = "name3373707"; + + Site actualResponse = client.getSite(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSiteRequest actualRequest = ((GetSiteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSiteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.getSite(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSiteTest() throws Exception { + Site expectedResponse = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSiteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Site site = Site.newBuilder().build(); + String siteId = "siteId-902090046"; + + Site actualResponse = client.createSiteAsync(parent, site, siteId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSiteRequest actualRequest = ((CreateSiteRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(site, actualRequest.getSite()); + Assert.assertEquals(siteId, actualRequest.getSiteId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSiteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Site site = Site.newBuilder().build(); + String siteId = "siteId-902090046"; + client.createSiteAsync(parent, site, siteId).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 createSiteTest2() throws Exception { + Site expectedResponse = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSiteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String parent = "parent-995424086"; + Site site = Site.newBuilder().build(); + String siteId = "siteId-902090046"; + + Site actualResponse = client.createSiteAsync(parent, site, siteId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSiteRequest actualRequest = ((CreateSiteRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(site, actualRequest.getSite()); + Assert.assertEquals(siteId, actualRequest.getSiteId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSiteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + Site site = Site.newBuilder().build(); + String siteId = "siteId-902090046"; + client.createSiteAsync(parent, site, siteId).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 updateSiteTest() throws Exception { + Site expectedResponse = + Site.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrganizationContact(OrganizationContact.newBuilder().build()) + .setGoogleMapsPinUri("googleMapsPinUri123053095") + .addAllAccessTimes(new ArrayList()) + .setNotes("notes105008833") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSiteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + Site site = Site.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Site actualResponse = client.updateSiteAsync(site, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSiteRequest actualRequest = ((UpdateSiteRequest) actualRequests.get(0)); + + Assert.assertEquals(site, actualRequest.getSite()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSiteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + Site site = Site.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSiteAsync(site, 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 listHardwareGroupsTest() throws Exception { + HardwareGroup responsesElement = HardwareGroup.newBuilder().build(); + ListHardwareGroupsResponse expectedResponse = + ListHardwareGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllHardwareGroups(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + ListHardwareGroupsPagedResponse pagedListResponse = client.listHardwareGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHardwareGroupsList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHardwareGroupsRequest actualRequest = ((ListHardwareGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHardwareGroupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.listHardwareGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listHardwareGroupsTest2() throws Exception { + HardwareGroup responsesElement = HardwareGroup.newBuilder().build(); + ListHardwareGroupsResponse expectedResponse = + ListHardwareGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllHardwareGroups(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListHardwareGroupsPagedResponse pagedListResponse = client.listHardwareGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHardwareGroupsList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHardwareGroupsRequest actualRequest = ((ListHardwareGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHardwareGroupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + client.listHardwareGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHardwareGroupTest() throws Exception { + HardwareGroup expectedResponse = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + HardwareGroupName name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]"); + + HardwareGroup actualResponse = client.getHardwareGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetHardwareGroupRequest actualRequest = ((GetHardwareGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getHardwareGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + HardwareGroupName name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]"); + client.getHardwareGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHardwareGroupTest2() throws Exception { + HardwareGroup expectedResponse = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String name = "name3373707"; + + HardwareGroup actualResponse = client.getHardwareGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetHardwareGroupRequest actualRequest = ((GetHardwareGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getHardwareGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.getHardwareGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createHardwareGroupTest() throws Exception { + HardwareGroup expectedResponse = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createHardwareGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + String hardwareGroupId = "hardwareGroupId-1961682702"; + + HardwareGroup actualResponse = + client.createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateHardwareGroupRequest actualRequest = ((CreateHardwareGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(hardwareGroup, actualRequest.getHardwareGroup()); + Assert.assertEquals(hardwareGroupId, actualRequest.getHardwareGroupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createHardwareGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + String hardwareGroupId = "hardwareGroupId-1961682702"; + client.createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId).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 createHardwareGroupTest2() throws Exception { + HardwareGroup expectedResponse = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createHardwareGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String parent = "parent-995424086"; + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + String hardwareGroupId = "hardwareGroupId-1961682702"; + + HardwareGroup actualResponse = + client.createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateHardwareGroupRequest actualRequest = ((CreateHardwareGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(hardwareGroup, actualRequest.getHardwareGroup()); + Assert.assertEquals(hardwareGroupId, actualRequest.getHardwareGroupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createHardwareGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + String hardwareGroupId = "hardwareGroupId-1961682702"; + client.createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId).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 updateHardwareGroupTest() throws Exception { + HardwareGroup expectedResponse = + HardwareGroup.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setHardwareCount(1025608696) + .setConfig(HardwareConfig.newBuilder().build()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateHardwareGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + HardwareGroup actualResponse = client.updateHardwareGroupAsync(hardwareGroup, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateHardwareGroupRequest actualRequest = ((UpdateHardwareGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(hardwareGroup, actualRequest.getHardwareGroup()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateHardwareGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateHardwareGroupAsync(hardwareGroup, 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 deleteHardwareGroupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHardwareGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + HardwareGroupName name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]"); + + client.deleteHardwareGroupAsync(name).get(); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteHardwareGroupRequest actualRequest = ((DeleteHardwareGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteHardwareGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + HardwareGroupName name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]"); + client.deleteHardwareGroupAsync(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 deleteHardwareGroupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHardwareGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteHardwareGroupAsync(name).get(); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteHardwareGroupRequest actualRequest = ((DeleteHardwareGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteHardwareGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.deleteHardwareGroupAsync(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 listHardwareTest() throws Exception { + Hardware responsesElement = Hardware.newBuilder().build(); + ListHardwareResponse expectedResponse = + ListHardwareResponse.newBuilder() + .setNextPageToken("") + .addAllHardware(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListHardwarePagedResponse pagedListResponse = client.listHardware(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHardwareList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHardwareRequest actualRequest = ((ListHardwareRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHardwareExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listHardware(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listHardwareTest2() throws Exception { + Hardware responsesElement = Hardware.newBuilder().build(); + ListHardwareResponse expectedResponse = + ListHardwareResponse.newBuilder() + .setNextPageToken("") + .addAllHardware(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListHardwarePagedResponse pagedListResponse = client.listHardware(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHardwareList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHardwareRequest actualRequest = ((ListHardwareRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHardwareExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + client.listHardware(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHardwareTest() throws Exception { + Hardware expectedResponse = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]"); + + Hardware actualResponse = client.getHardware(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetHardwareRequest actualRequest = ((GetHardwareRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getHardwareExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]"); + client.getHardware(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHardwareTest2() throws Exception { + Hardware expectedResponse = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String name = "name3373707"; + + Hardware actualResponse = client.getHardware(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetHardwareRequest actualRequest = ((GetHardwareRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getHardwareExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.getHardware(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createHardwareTest() throws Exception { + Hardware expectedResponse = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createHardwareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Hardware hardware = Hardware.newBuilder().build(); + String hardwareId = "hardwareId680924451"; + + Hardware actualResponse = client.createHardwareAsync(parent, hardware, hardwareId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateHardwareRequest actualRequest = ((CreateHardwareRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(hardware, actualRequest.getHardware()); + Assert.assertEquals(hardwareId, actualRequest.getHardwareId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createHardwareExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Hardware hardware = Hardware.newBuilder().build(); + String hardwareId = "hardwareId680924451"; + client.createHardwareAsync(parent, hardware, hardwareId).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 createHardwareTest2() throws Exception { + Hardware expectedResponse = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createHardwareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String parent = "parent-995424086"; + Hardware hardware = Hardware.newBuilder().build(); + String hardwareId = "hardwareId680924451"; + + Hardware actualResponse = client.createHardwareAsync(parent, hardware, hardwareId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateHardwareRequest actualRequest = ((CreateHardwareRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(hardware, actualRequest.getHardware()); + Assert.assertEquals(hardwareId, actualRequest.getHardwareId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createHardwareExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + Hardware hardware = Hardware.newBuilder().build(); + String hardwareId = "hardwareId680924451"; + client.createHardwareAsync(parent, hardware, hardwareId).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 updateHardwareTest() throws Exception { + Hardware expectedResponse = + Hardware.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOrder(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroup( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setSite(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .setCiqUri("ciqUri-1360259935") + .setConfig(HardwareConfig.newBuilder().build()) + .setEstimatedInstallationDate(Date.newBuilder().build()) + .setPhysicalInfo(HardwarePhysicalInfo.newBuilder().build()) + .setInstallationInfo(HardwareInstallationInfo.newBuilder().build()) + .setZone(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestedInstallationDate(Date.newBuilder().build()) + .setActualInstallationDate(Date.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateHardwareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + Hardware hardware = Hardware.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Hardware actualResponse = client.updateHardwareAsync(hardware, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateHardwareRequest actualRequest = ((UpdateHardwareRequest) actualRequests.get(0)); + + Assert.assertEquals(hardware, actualRequest.getHardware()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateHardwareExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + Hardware hardware = Hardware.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateHardwareAsync(hardware, 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 deleteHardwareTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHardwareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]"); + + client.deleteHardwareAsync(name).get(); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteHardwareRequest actualRequest = ((DeleteHardwareRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteHardwareExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]"); + client.deleteHardwareAsync(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 deleteHardwareTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHardwareTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteHardwareAsync(name).get(); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteHardwareRequest actualRequest = ((DeleteHardwareRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteHardwareExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.deleteHardwareAsync(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 listCommentsTest() throws Exception { + Comment responsesElement = Comment.newBuilder().build(); + ListCommentsResponse expectedResponse = + ListCommentsResponse.newBuilder() + .setNextPageToken("") + .addAllComments(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + ListCommentsPagedResponse pagedListResponse = client.listComments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCommentsList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCommentsRequest actualRequest = ((ListCommentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCommentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.listComments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCommentsTest2() throws Exception { + Comment responsesElement = Comment.newBuilder().build(); + ListCommentsResponse expectedResponse = + ListCommentsResponse.newBuilder() + .setNextPageToken("") + .addAllComments(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCommentsPagedResponse pagedListResponse = client.listComments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCommentsList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCommentsRequest actualRequest = ((ListCommentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCommentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + client.listComments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCommentTest() throws Exception { + Comment expectedResponse = + Comment.newBuilder() + .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAuthor("author-1406328437") + .setText("text3556653") + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + CommentName name = CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]"); + + Comment actualResponse = client.getComment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCommentRequest actualRequest = ((GetCommentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCommentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + CommentName name = CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]"); + client.getComment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCommentTest2() throws Exception { + Comment expectedResponse = + Comment.newBuilder() + .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAuthor("author-1406328437") + .setText("text3556653") + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String name = "name3373707"; + + Comment actualResponse = client.getComment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCommentRequest actualRequest = ((GetCommentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCommentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.getComment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCommentTest() throws Exception { + Comment expectedResponse = + Comment.newBuilder() + .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAuthor("author-1406328437") + .setText("text3556653") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCommentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + Comment comment = Comment.newBuilder().build(); + String commentId = "commentId-1495016486"; + + Comment actualResponse = client.createCommentAsync(parent, comment, commentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCommentRequest actualRequest = ((CreateCommentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(comment, actualRequest.getComment()); + Assert.assertEquals(commentId, actualRequest.getCommentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCommentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + Comment comment = Comment.newBuilder().build(); + String commentId = "commentId-1495016486"; + client.createCommentAsync(parent, comment, commentId).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 createCommentTest2() throws Exception { + Comment expectedResponse = + Comment.newBuilder() + .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAuthor("author-1406328437") + .setText("text3556653") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCommentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String parent = "parent-995424086"; + Comment comment = Comment.newBuilder().build(); + String commentId = "commentId-1495016486"; + + Comment actualResponse = client.createCommentAsync(parent, comment, commentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCommentRequest actualRequest = ((CreateCommentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(comment, actualRequest.getComment()); + Assert.assertEquals(commentId, actualRequest.getCommentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCommentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + Comment comment = Comment.newBuilder().build(); + String commentId = "commentId-1495016486"; + client.createCommentAsync(parent, comment, commentId).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 listChangeLogEntriesTest() throws Exception { + ChangeLogEntry responsesElement = ChangeLogEntry.newBuilder().build(); + ListChangeLogEntriesResponse expectedResponse = + ListChangeLogEntriesResponse.newBuilder() + .setNextPageToken("") + .addAllChangeLogEntries(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + + ListChangeLogEntriesPagedResponse pagedListResponse = client.listChangeLogEntries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getChangeLogEntriesList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListChangeLogEntriesRequest actualRequest = + ((ListChangeLogEntriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listChangeLogEntriesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + client.listChangeLogEntries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listChangeLogEntriesTest2() throws Exception { + ChangeLogEntry responsesElement = ChangeLogEntry.newBuilder().build(); + ListChangeLogEntriesResponse expectedResponse = + ListChangeLogEntriesResponse.newBuilder() + .setNextPageToken("") + .addAllChangeLogEntries(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListChangeLogEntriesPagedResponse pagedListResponse = client.listChangeLogEntries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getChangeLogEntriesList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListChangeLogEntriesRequest actualRequest = + ((ListChangeLogEntriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listChangeLogEntriesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + client.listChangeLogEntries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getChangeLogEntryTest() throws Exception { + ChangeLogEntry expectedResponse = + ChangeLogEntry.newBuilder() + .setName( + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLog("log107332") + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + ChangeLogEntryName name = + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]"); + + ChangeLogEntry actualResponse = client.getChangeLogEntry(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetChangeLogEntryRequest actualRequest = ((GetChangeLogEntryRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getChangeLogEntryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + ChangeLogEntryName name = + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]"); + client.getChangeLogEntry(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getChangeLogEntryTest2() throws Exception { + ChangeLogEntry expectedResponse = + ChangeLogEntry.newBuilder() + .setName( + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLog("log107332") + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String name = "name3373707"; + + ChangeLogEntry actualResponse = client.getChangeLogEntry(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetChangeLogEntryRequest actualRequest = ((GetChangeLogEntryRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getChangeLogEntryExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.getChangeLogEntry(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSkusTest() throws Exception { + Sku responsesElement = Sku.newBuilder().build(); + ListSkusResponse expectedResponse = + ListSkusResponse.newBuilder() + .setNextPageToken("") + .addAllSkus(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListSkusPagedResponse pagedListResponse = client.listSkus(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSkusList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSkusRequest actualRequest = ((ListSkusRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSkusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listSkus(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSkusTest2() throws Exception { + Sku responsesElement = Sku.newBuilder().build(); + ListSkusResponse expectedResponse = + ListSkusResponse.newBuilder() + .setNextPageToken("") + .addAllSkus(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSkusPagedResponse pagedListResponse = client.listSkus(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSkusList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSkusRequest actualRequest = ((ListSkusRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSkusExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSkus(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSkuTest() throws Exception { + Sku expectedResponse = + Sku.newBuilder() + .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConfig(SkuConfig.newBuilder().build()) + .addAllInstances(new ArrayList()) + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setIsActive(true) + .setVcpuCount(936475650) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + SkuName name = SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]"); + + Sku actualResponse = client.getSku(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSkuRequest actualRequest = ((GetSkuRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSkuExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + SkuName name = SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]"); + client.getSku(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSkuTest2() throws Exception { + Sku expectedResponse = + Sku.newBuilder() + .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConfig(SkuConfig.newBuilder().build()) + .addAllInstances(new ArrayList()) + .setDescription("description-1724546052") + .setRevisionId("revisionId-1507445162") + .setIsActive(true) + .setVcpuCount(936475650) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String name = "name3373707"; + + Sku actualResponse = client.getSku(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSkuRequest actualRequest = ((GetSkuRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSkuExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.getSku(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listZonesTest() throws Exception { + Zone responsesElement = Zone.newBuilder().build(); + ListZonesResponse expectedResponse = + ListZonesResponse.newBuilder() + .setNextPageToken("") + .addAllZones(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListZonesPagedResponse pagedListResponse = client.listZones(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getZonesList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListZonesRequest actualRequest = ((ListZonesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listZonesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listZones(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listZonesTest2() throws Exception { + Zone responsesElement = Zone.newBuilder().build(); + ListZonesResponse expectedResponse = + ListZonesResponse.newBuilder() + .setNextPageToken("") + .addAllZones(Arrays.asList(responsesElement)) + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListZonesPagedResponse pagedListResponse = client.listZones(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getZonesList().get(0), resources.get(0)); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListZonesRequest actualRequest = ((ListZonesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listZonesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + client.listZones(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getZoneTest() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + Zone actualResponse = client.getZone(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetZoneRequest actualRequest = ((GetZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getZoneExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.getZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getZoneTest2() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + mockGDCHardwareManagement.addResponse(expectedResponse); + + String name = "name3373707"; + + Zone actualResponse = client.getZone(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetZoneRequest actualRequest = ((GetZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getZoneExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.getZone(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createZoneTest() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createZoneTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Zone zone = Zone.newBuilder().build(); + String zoneId = "zoneId-696323609"; + + Zone actualResponse = client.createZoneAsync(parent, zone, zoneId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateZoneRequest actualRequest = ((CreateZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(zone, actualRequest.getZone()); + Assert.assertEquals(zoneId, actualRequest.getZoneId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createZoneExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Zone zone = Zone.newBuilder().build(); + String zoneId = "zoneId-696323609"; + client.createZoneAsync(parent, zone, zoneId).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 createZoneTest2() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createZoneTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String parent = "parent-995424086"; + Zone zone = Zone.newBuilder().build(); + String zoneId = "zoneId-696323609"; + + Zone actualResponse = client.createZoneAsync(parent, zone, zoneId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateZoneRequest actualRequest = ((CreateZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(zone, actualRequest.getZone()); + Assert.assertEquals(zoneId, actualRequest.getZoneId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createZoneExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String parent = "parent-995424086"; + Zone zone = Zone.newBuilder().build(); + String zoneId = "zoneId-696323609"; + client.createZoneAsync(parent, zone, zoneId).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 updateZoneTest() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateZoneTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + Zone zone = Zone.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Zone actualResponse = client.updateZoneAsync(zone, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateZoneRequest actualRequest = ((UpdateZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(zone, actualRequest.getZone()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateZoneExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + Zone zone = Zone.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateZoneAsync(zone, 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 deleteZoneTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteZoneTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + + client.deleteZoneAsync(name).get(); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteZoneRequest actualRequest = ((DeleteZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteZoneExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + client.deleteZoneAsync(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 deleteZoneTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteZoneTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteZoneAsync(name).get(); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteZoneRequest actualRequest = ((DeleteZoneRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteZoneExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + client.deleteZoneAsync(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 signalZoneStateTest() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("signalZoneStateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + SignalZoneStateRequest.StateSignal stateSignal = + SignalZoneStateRequest.StateSignal.forNumber(0); + + Zone actualResponse = client.signalZoneStateAsync(name, stateSignal).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SignalZoneStateRequest actualRequest = ((SignalZoneStateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(stateSignal, actualRequest.getStateSignal()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void signalZoneStateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + SignalZoneStateRequest.StateSignal stateSignal = + SignalZoneStateRequest.StateSignal.forNumber(0); + client.signalZoneStateAsync(name, stateSignal).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 signalZoneStateTest2() throws Exception { + Zone expectedResponse = + Zone.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .addAllContacts(new ArrayList()) + .setCiqUri("ciqUri-1360259935") + .setNetworkConfig(ZoneNetworkConfig.newBuilder().build()) + .setGloballyUniqueId("globallyUniqueId-1207923364") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("signalZoneStateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockGDCHardwareManagement.addResponse(resultOperation); + + String name = "name3373707"; + SignalZoneStateRequest.StateSignal stateSignal = + SignalZoneStateRequest.StateSignal.forNumber(0); + + Zone actualResponse = client.signalZoneStateAsync(name, stateSignal).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGDCHardwareManagement.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SignalZoneStateRequest actualRequest = ((SignalZoneStateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(stateSignal, actualRequest.getStateSignal()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void signalZoneStateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGDCHardwareManagement.addException(exception); + + try { + String name = "name3373707"; + SignalZoneStateRequest.StateSignal stateSignal = + SignalZoneStateRequest.StateSignal.forNumber(0); + client.signalZoneStateAsync(name, stateSignal).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + 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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockGDCHardwareManagement.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockGDCHardwareManagement.java new file mode 100644 index 000000000000..db90cbb4deb4 --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockGDCHardwareManagement.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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 MockGDCHardwareManagement implements MockGrpcService { + private final MockGDCHardwareManagementImpl serviceImpl; + + public MockGDCHardwareManagement() { + serviceImpl = new MockGDCHardwareManagementImpl(); + } + + @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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockGDCHardwareManagementImpl.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockGDCHardwareManagementImpl.java new file mode 100644 index 000000000000..0f4568dc843a --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockGDCHardwareManagementImpl.java @@ -0,0 +1,740 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementGrpc.GDCHardwareManagementImplBase; +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 MockGDCHardwareManagementImpl extends GDCHardwareManagementImplBase { + private List requests; + private Queue responses; + + public MockGDCHardwareManagementImpl() { + 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 listOrders( + ListOrdersRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListOrdersResponse) { + requests.add(request); + responseObserver.onNext(((ListOrdersResponse) 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 ListOrders, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListOrdersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getOrder(GetOrderRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Order) { + requests.add(request); + responseObserver.onNext(((Order) 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 GetOrder, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Order.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createOrder(CreateOrderRequest 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 CreateOrder, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateOrder(UpdateOrderRequest 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 UpdateOrder, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteOrder(DeleteOrderRequest 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 DeleteOrder, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void submitOrder(SubmitOrderRequest 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 SubmitOrder, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSites( + ListSitesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSitesResponse) { + requests.add(request); + responseObserver.onNext(((ListSitesResponse) 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 ListSites, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSitesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSite(GetSiteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Site) { + requests.add(request); + responseObserver.onNext(((Site) 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 GetSite, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Site.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSite(CreateSiteRequest 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 CreateSite, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSite(UpdateSiteRequest 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 UpdateSite, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listHardwareGroups( + ListHardwareGroupsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListHardwareGroupsResponse) { + requests.add(request); + responseObserver.onNext(((ListHardwareGroupsResponse) 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 ListHardwareGroups, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListHardwareGroupsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getHardwareGroup( + GetHardwareGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof HardwareGroup) { + requests.add(request); + responseObserver.onNext(((HardwareGroup) 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 GetHardwareGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + HardwareGroup.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createHardwareGroup( + CreateHardwareGroupRequest 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 CreateHardwareGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateHardwareGroup( + UpdateHardwareGroupRequest 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 UpdateHardwareGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteHardwareGroup( + DeleteHardwareGroupRequest 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 DeleteHardwareGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listHardware( + ListHardwareRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListHardwareResponse) { + requests.add(request); + responseObserver.onNext(((ListHardwareResponse) 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 ListHardware, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListHardwareResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getHardware(GetHardwareRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Hardware) { + requests.add(request); + responseObserver.onNext(((Hardware) 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 GetHardware, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Hardware.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createHardware( + CreateHardwareRequest 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 CreateHardware, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateHardware( + UpdateHardwareRequest 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 UpdateHardware, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteHardware( + DeleteHardwareRequest 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 DeleteHardware, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listComments( + ListCommentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListCommentsResponse) { + requests.add(request); + responseObserver.onNext(((ListCommentsResponse) 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 ListComments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListCommentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getComment(GetCommentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Comment) { + requests.add(request); + responseObserver.onNext(((Comment) 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 GetComment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Comment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createComment( + CreateCommentRequest 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 CreateComment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listChangeLogEntries( + ListChangeLogEntriesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListChangeLogEntriesResponse) { + requests.add(request); + responseObserver.onNext(((ListChangeLogEntriesResponse) 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 ListChangeLogEntries, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListChangeLogEntriesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getChangeLogEntry( + GetChangeLogEntryRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ChangeLogEntry) { + requests.add(request); + responseObserver.onNext(((ChangeLogEntry) 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 GetChangeLogEntry, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ChangeLogEntry.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSkus(ListSkusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSkusResponse) { + requests.add(request); + responseObserver.onNext(((ListSkusResponse) 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 ListSkus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSkusResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSku(GetSkuRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Sku) { + requests.add(request); + responseObserver.onNext(((Sku) 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 GetSku, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Sku.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listZones( + ListZonesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListZonesResponse) { + requests.add(request); + responseObserver.onNext(((ListZonesResponse) 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 ListZones, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListZonesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getZone(GetZoneRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Zone) { + requests.add(request); + responseObserver.onNext(((Zone) 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 GetZone, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Zone.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createZone(CreateZoneRequest 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 CreateZone, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateZone(UpdateZoneRequest 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 UpdateZone, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteZone(DeleteZoneRequest 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 DeleteZone, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void signalZoneState( + SignalZoneStateRequest 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 SignalZoneState, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockLocations.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockLocations.java new file mode 100644 index 000000000000..e45db63c6c74 --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockLocationsImpl.java b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockLocationsImpl.java new file mode 100644 index 000000000000..b74469ce6abe --- /dev/null +++ b/java-gdchardwaremanagement/google-cloud-gdchardwaremanagement/src/test/java/com/google/cloud/gdchardwaremanagement/v1alpha/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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-gdchardwaremanagement/grpc-google-cloud-gdchardwaremanagement-v1alpha/pom.xml b/java-gdchardwaremanagement/grpc-google-cloud-gdchardwaremanagement-v1alpha/pom.xml new file mode 100644 index 000000000000..aef6da376b29 --- /dev/null +++ b/java-gdchardwaremanagement/grpc-google-cloud-gdchardwaremanagement-v1alpha/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-gdchardwaremanagement-v1alpha + 0.0.1-SNAPSHOT + grpc-google-cloud-gdchardwaremanagement-v1alpha + GRPC library for google-cloud-gdchardwaremanagement + + com.google.cloud + google-cloud-gdchardwaremanagement-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-gdchardwaremanagement-v1alpha + + + com.google.guava + guava + + + diff --git a/java-gdchardwaremanagement/grpc-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementGrpc.java b/java-gdchardwaremanagement/grpc-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementGrpc.java new file mode 100644 index 000000000000..46d75c9e302e --- /dev/null +++ b/java-gdchardwaremanagement/grpc-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GDCHardwareManagementGrpc.java @@ -0,0 +1,4170 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.gdchardwaremanagement.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The GDC Hardware Management service.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/gdchardwaremanagement/v1alpha/service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class GDCHardwareManagementGrpc { + + private GDCHardwareManagementGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse> + getListOrdersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListOrders", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse> + getListOrdersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse> + getListOrdersMethod; + if ((getListOrdersMethod = GDCHardwareManagementGrpc.getListOrdersMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getListOrdersMethod = GDCHardwareManagementGrpc.getListOrdersMethod) == null) { + GDCHardwareManagementGrpc.getListOrdersMethod = + getListOrdersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListOrders")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("ListOrders")) + .build(); + } + } + } + return getListOrdersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Order> + getGetOrderMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetOrder", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.Order.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Order> + getGetOrderMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Order> + getGetOrderMethod; + if ((getGetOrderMethod = GDCHardwareManagementGrpc.getGetOrderMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getGetOrderMethod = GDCHardwareManagementGrpc.getGetOrderMethod) == null) { + GDCHardwareManagementGrpc.getGetOrderMethod = + getGetOrderMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOrder")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.Order + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("GetOrder")) + .build(); + } + } + } + return getGetOrderMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest, + com.google.longrunning.Operation> + getCreateOrderMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateOrder", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest, + com.google.longrunning.Operation> + getCreateOrderMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest, + com.google.longrunning.Operation> + getCreateOrderMethod; + if ((getCreateOrderMethod = GDCHardwareManagementGrpc.getCreateOrderMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getCreateOrderMethod = GDCHardwareManagementGrpc.getCreateOrderMethod) == null) { + GDCHardwareManagementGrpc.getCreateOrderMethod = + getCreateOrderMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateOrder")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("CreateOrder")) + .build(); + } + } + } + return getCreateOrderMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest, + com.google.longrunning.Operation> + getUpdateOrderMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateOrder", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest, + com.google.longrunning.Operation> + getUpdateOrderMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest, + com.google.longrunning.Operation> + getUpdateOrderMethod; + if ((getUpdateOrderMethod = GDCHardwareManagementGrpc.getUpdateOrderMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getUpdateOrderMethod = GDCHardwareManagementGrpc.getUpdateOrderMethod) == null) { + GDCHardwareManagementGrpc.getUpdateOrderMethod = + getUpdateOrderMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateOrder")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("UpdateOrder")) + .build(); + } + } + } + return getUpdateOrderMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest, + com.google.longrunning.Operation> + getDeleteOrderMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteOrder", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest, + com.google.longrunning.Operation> + getDeleteOrderMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest, + com.google.longrunning.Operation> + getDeleteOrderMethod; + if ((getDeleteOrderMethod = GDCHardwareManagementGrpc.getDeleteOrderMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getDeleteOrderMethod = GDCHardwareManagementGrpc.getDeleteOrderMethod) == null) { + GDCHardwareManagementGrpc.getDeleteOrderMethod = + getDeleteOrderMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOrder")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("DeleteOrder")) + .build(); + } + } + } + return getDeleteOrderMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest, + com.google.longrunning.Operation> + getSubmitOrderMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SubmitOrder", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest, + com.google.longrunning.Operation> + getSubmitOrderMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest, + com.google.longrunning.Operation> + getSubmitOrderMethod; + if ((getSubmitOrderMethod = GDCHardwareManagementGrpc.getSubmitOrderMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getSubmitOrderMethod = GDCHardwareManagementGrpc.getSubmitOrderMethod) == null) { + GDCHardwareManagementGrpc.getSubmitOrderMethod = + getSubmitOrderMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SubmitOrder")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("SubmitOrder")) + .build(); + } + } + } + return getSubmitOrderMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse> + getListSitesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSites", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse> + getListSitesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse> + getListSitesMethod; + if ((getListSitesMethod = GDCHardwareManagementGrpc.getListSitesMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getListSitesMethod = GDCHardwareManagementGrpc.getListSitesMethod) == null) { + GDCHardwareManagementGrpc.getListSitesMethod = + getListSitesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSites")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("ListSites")) + .build(); + } + } + } + return getListSitesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Site> + getGetSiteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSite", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.Site.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Site> + getGetSiteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Site> + getGetSiteMethod; + if ((getGetSiteMethod = GDCHardwareManagementGrpc.getGetSiteMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getGetSiteMethod = GDCHardwareManagementGrpc.getGetSiteMethod) == null) { + GDCHardwareManagementGrpc.getGetSiteMethod = + getGetSiteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSite")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.Site + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("GetSite")) + .build(); + } + } + } + return getGetSiteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest, + com.google.longrunning.Operation> + getCreateSiteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSite", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest, + com.google.longrunning.Operation> + getCreateSiteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest, + com.google.longrunning.Operation> + getCreateSiteMethod; + if ((getCreateSiteMethod = GDCHardwareManagementGrpc.getCreateSiteMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getCreateSiteMethod = GDCHardwareManagementGrpc.getCreateSiteMethod) == null) { + GDCHardwareManagementGrpc.getCreateSiteMethod = + getCreateSiteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSite")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("CreateSite")) + .build(); + } + } + } + return getCreateSiteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest, + com.google.longrunning.Operation> + getUpdateSiteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSite", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest, + com.google.longrunning.Operation> + getUpdateSiteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest, + com.google.longrunning.Operation> + getUpdateSiteMethod; + if ((getUpdateSiteMethod = GDCHardwareManagementGrpc.getUpdateSiteMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getUpdateSiteMethod = GDCHardwareManagementGrpc.getUpdateSiteMethod) == null) { + GDCHardwareManagementGrpc.getUpdateSiteMethod = + getUpdateSiteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSite")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("UpdateSite")) + .build(); + } + } + } + return getUpdateSiteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse> + getListHardwareGroupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListHardwareGroups", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest.class, + responseType = + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse> + getListHardwareGroupsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse> + getListHardwareGroupsMethod; + if ((getListHardwareGroupsMethod = GDCHardwareManagementGrpc.getListHardwareGroupsMethod) + == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getListHardwareGroupsMethod = GDCHardwareManagementGrpc.getListHardwareGroupsMethod) + == null) { + GDCHardwareManagementGrpc.getListHardwareGroupsMethod = + getListHardwareGroupsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListHardwareGroups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha + .ListHardwareGroupsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha + .ListHardwareGroupsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("ListHardwareGroups")) + .build(); + } + } + } + return getListHardwareGroupsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup> + getGetHardwareGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetHardwareGroup", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup> + getGetHardwareGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup> + getGetHardwareGroupMethod; + if ((getGetHardwareGroupMethod = GDCHardwareManagementGrpc.getGetHardwareGroupMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getGetHardwareGroupMethod = GDCHardwareManagementGrpc.getGetHardwareGroupMethod) + == null) { + GDCHardwareManagementGrpc.getGetHardwareGroupMethod = + getGetHardwareGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetHardwareGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("GetHardwareGroup")) + .build(); + } + } + } + return getGetHardwareGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest, + com.google.longrunning.Operation> + getCreateHardwareGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateHardwareGroup", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest, + com.google.longrunning.Operation> + getCreateHardwareGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest, + com.google.longrunning.Operation> + getCreateHardwareGroupMethod; + if ((getCreateHardwareGroupMethod = GDCHardwareManagementGrpc.getCreateHardwareGroupMethod) + == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getCreateHardwareGroupMethod = GDCHardwareManagementGrpc.getCreateHardwareGroupMethod) + == null) { + GDCHardwareManagementGrpc.getCreateHardwareGroupMethod = + getCreateHardwareGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateHardwareGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha + .CreateHardwareGroupRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("CreateHardwareGroup")) + .build(); + } + } + } + return getCreateHardwareGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest, + com.google.longrunning.Operation> + getUpdateHardwareGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateHardwareGroup", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest, + com.google.longrunning.Operation> + getUpdateHardwareGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest, + com.google.longrunning.Operation> + getUpdateHardwareGroupMethod; + if ((getUpdateHardwareGroupMethod = GDCHardwareManagementGrpc.getUpdateHardwareGroupMethod) + == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getUpdateHardwareGroupMethod = GDCHardwareManagementGrpc.getUpdateHardwareGroupMethod) + == null) { + GDCHardwareManagementGrpc.getUpdateHardwareGroupMethod = + getUpdateHardwareGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateHardwareGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha + .UpdateHardwareGroupRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("UpdateHardwareGroup")) + .build(); + } + } + } + return getUpdateHardwareGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest, + com.google.longrunning.Operation> + getDeleteHardwareGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteHardwareGroup", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest, + com.google.longrunning.Operation> + getDeleteHardwareGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest, + com.google.longrunning.Operation> + getDeleteHardwareGroupMethod; + if ((getDeleteHardwareGroupMethod = GDCHardwareManagementGrpc.getDeleteHardwareGroupMethod) + == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getDeleteHardwareGroupMethod = GDCHardwareManagementGrpc.getDeleteHardwareGroupMethod) + == null) { + GDCHardwareManagementGrpc.getDeleteHardwareGroupMethod = + getDeleteHardwareGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteHardwareGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha + .DeleteHardwareGroupRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("DeleteHardwareGroup")) + .build(); + } + } + } + return getDeleteHardwareGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse> + getListHardwareMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListHardware", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse> + getListHardwareMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse> + getListHardwareMethod; + if ((getListHardwareMethod = GDCHardwareManagementGrpc.getListHardwareMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getListHardwareMethod = GDCHardwareManagementGrpc.getListHardwareMethod) == null) { + GDCHardwareManagementGrpc.getListHardwareMethod = + getListHardwareMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListHardware")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("ListHardware")) + .build(); + } + } + } + return getListHardwareMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware> + getGetHardwareMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetHardware", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware> + getGetHardwareMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware> + getGetHardwareMethod; + if ((getGetHardwareMethod = GDCHardwareManagementGrpc.getGetHardwareMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getGetHardwareMethod = GDCHardwareManagementGrpc.getGetHardwareMethod) == null) { + GDCHardwareManagementGrpc.getGetHardwareMethod = + getGetHardwareMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetHardware")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("GetHardware")) + .build(); + } + } + } + return getGetHardwareMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest, + com.google.longrunning.Operation> + getCreateHardwareMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateHardware", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest, + com.google.longrunning.Operation> + getCreateHardwareMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest, + com.google.longrunning.Operation> + getCreateHardwareMethod; + if ((getCreateHardwareMethod = GDCHardwareManagementGrpc.getCreateHardwareMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getCreateHardwareMethod = GDCHardwareManagementGrpc.getCreateHardwareMethod) == null) { + GDCHardwareManagementGrpc.getCreateHardwareMethod = + getCreateHardwareMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateHardware")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("CreateHardware")) + .build(); + } + } + } + return getCreateHardwareMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest, + com.google.longrunning.Operation> + getUpdateHardwareMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateHardware", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest, + com.google.longrunning.Operation> + getUpdateHardwareMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest, + com.google.longrunning.Operation> + getUpdateHardwareMethod; + if ((getUpdateHardwareMethod = GDCHardwareManagementGrpc.getUpdateHardwareMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getUpdateHardwareMethod = GDCHardwareManagementGrpc.getUpdateHardwareMethod) == null) { + GDCHardwareManagementGrpc.getUpdateHardwareMethod = + getUpdateHardwareMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateHardware")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("UpdateHardware")) + .build(); + } + } + } + return getUpdateHardwareMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest, + com.google.longrunning.Operation> + getDeleteHardwareMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteHardware", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest, + com.google.longrunning.Operation> + getDeleteHardwareMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest, + com.google.longrunning.Operation> + getDeleteHardwareMethod; + if ((getDeleteHardwareMethod = GDCHardwareManagementGrpc.getDeleteHardwareMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getDeleteHardwareMethod = GDCHardwareManagementGrpc.getDeleteHardwareMethod) == null) { + GDCHardwareManagementGrpc.getDeleteHardwareMethod = + getDeleteHardwareMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteHardware")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("DeleteHardware")) + .build(); + } + } + } + return getDeleteHardwareMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse> + getListCommentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListComments", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse> + getListCommentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse> + getListCommentsMethod; + if ((getListCommentsMethod = GDCHardwareManagementGrpc.getListCommentsMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getListCommentsMethod = GDCHardwareManagementGrpc.getListCommentsMethod) == null) { + GDCHardwareManagementGrpc.getListCommentsMethod = + getListCommentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListComments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("ListComments")) + .build(); + } + } + } + return getListCommentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment> + getGetCommentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetComment", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.Comment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment> + getGetCommentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment> + getGetCommentMethod; + if ((getGetCommentMethod = GDCHardwareManagementGrpc.getGetCommentMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getGetCommentMethod = GDCHardwareManagementGrpc.getGetCommentMethod) == null) { + GDCHardwareManagementGrpc.getGetCommentMethod = + getGetCommentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetComment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.Comment + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("GetComment")) + .build(); + } + } + } + return getGetCommentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest, + com.google.longrunning.Operation> + getCreateCommentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateComment", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest, + com.google.longrunning.Operation> + getCreateCommentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest, + com.google.longrunning.Operation> + getCreateCommentMethod; + if ((getCreateCommentMethod = GDCHardwareManagementGrpc.getCreateCommentMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getCreateCommentMethod = GDCHardwareManagementGrpc.getCreateCommentMethod) == null) { + GDCHardwareManagementGrpc.getCreateCommentMethod = + getCreateCommentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateComment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("CreateComment")) + .build(); + } + } + } + return getCreateCommentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse> + getListChangeLogEntriesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListChangeLogEntries", + requestType = + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest.class, + responseType = + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse> + getListChangeLogEntriesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse> + getListChangeLogEntriesMethod; + if ((getListChangeLogEntriesMethod = GDCHardwareManagementGrpc.getListChangeLogEntriesMethod) + == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getListChangeLogEntriesMethod = + GDCHardwareManagementGrpc.getListChangeLogEntriesMethod) + == null) { + GDCHardwareManagementGrpc.getListChangeLogEntriesMethod = + getListChangeLogEntriesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListChangeLogEntries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha + .ListChangeLogEntriesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha + .ListChangeLogEntriesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("ListChangeLogEntries")) + .build(); + } + } + } + return getListChangeLogEntriesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry> + getGetChangeLogEntryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetChangeLogEntry", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry> + getGetChangeLogEntryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry> + getGetChangeLogEntryMethod; + if ((getGetChangeLogEntryMethod = GDCHardwareManagementGrpc.getGetChangeLogEntryMethod) + == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getGetChangeLogEntryMethod = GDCHardwareManagementGrpc.getGetChangeLogEntryMethod) + == null) { + GDCHardwareManagementGrpc.getGetChangeLogEntryMethod = + getGetChangeLogEntryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetChangeLogEntry")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha + .GetChangeLogEntryRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("GetChangeLogEntry")) + .build(); + } + } + } + return getGetChangeLogEntryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse> + getListSkusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSkus", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse> + getListSkusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse> + getListSkusMethod; + if ((getListSkusMethod = GDCHardwareManagementGrpc.getListSkusMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getListSkusMethod = GDCHardwareManagementGrpc.getListSkusMethod) == null) { + GDCHardwareManagementGrpc.getListSkusMethod = + getListSkusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSkus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("ListSkus")) + .build(); + } + } + } + return getListSkusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Sku> + getGetSkuMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSku", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.Sku.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Sku> + getGetSkuMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Sku> + getGetSkuMethod; + if ((getGetSkuMethod = GDCHardwareManagementGrpc.getGetSkuMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getGetSkuMethod = GDCHardwareManagementGrpc.getGetSkuMethod) == null) { + GDCHardwareManagementGrpc.getGetSkuMethod = + getGetSkuMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSku")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.Sku + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("GetSku")) + .build(); + } + } + } + return getGetSkuMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse> + getListZonesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListZones", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse> + getListZonesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse> + getListZonesMethod; + if ((getListZonesMethod = GDCHardwareManagementGrpc.getListZonesMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getListZonesMethod = GDCHardwareManagementGrpc.getListZonesMethod) == null) { + GDCHardwareManagementGrpc.getListZonesMethod = + getListZonesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListZones")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("ListZones")) + .build(); + } + } + } + return getListZonesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone> + getGetZoneMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetZone", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest.class, + responseType = com.google.cloud.gdchardwaremanagement.v1alpha.Zone.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone> + getGetZoneMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone> + getGetZoneMethod; + if ((getGetZoneMethod = GDCHardwareManagementGrpc.getGetZoneMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getGetZoneMethod = GDCHardwareManagementGrpc.getGetZoneMethod) == null) { + GDCHardwareManagementGrpc.getGetZoneMethod = + getGetZoneMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetZone")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.Zone + .getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("GetZone")) + .build(); + } + } + } + return getGetZoneMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest, + com.google.longrunning.Operation> + getCreateZoneMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateZone", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest, + com.google.longrunning.Operation> + getCreateZoneMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest, + com.google.longrunning.Operation> + getCreateZoneMethod; + if ((getCreateZoneMethod = GDCHardwareManagementGrpc.getCreateZoneMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getCreateZoneMethod = GDCHardwareManagementGrpc.getCreateZoneMethod) == null) { + GDCHardwareManagementGrpc.getCreateZoneMethod = + getCreateZoneMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateZone")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("CreateZone")) + .build(); + } + } + } + return getCreateZoneMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest, + com.google.longrunning.Operation> + getUpdateZoneMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateZone", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest, + com.google.longrunning.Operation> + getUpdateZoneMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest, + com.google.longrunning.Operation> + getUpdateZoneMethod; + if ((getUpdateZoneMethod = GDCHardwareManagementGrpc.getUpdateZoneMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getUpdateZoneMethod = GDCHardwareManagementGrpc.getUpdateZoneMethod) == null) { + GDCHardwareManagementGrpc.getUpdateZoneMethod = + getUpdateZoneMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateZone")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("UpdateZone")) + .build(); + } + } + } + return getUpdateZoneMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest, + com.google.longrunning.Operation> + getDeleteZoneMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteZone", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest, + com.google.longrunning.Operation> + getDeleteZoneMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest, + com.google.longrunning.Operation> + getDeleteZoneMethod; + if ((getDeleteZoneMethod = GDCHardwareManagementGrpc.getDeleteZoneMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getDeleteZoneMethod = GDCHardwareManagementGrpc.getDeleteZoneMethod) == null) { + GDCHardwareManagementGrpc.getDeleteZoneMethod = + getDeleteZoneMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteZone")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("DeleteZone")) + .build(); + } + } + } + return getDeleteZoneMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest, + com.google.longrunning.Operation> + getSignalZoneStateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SignalZoneState", + requestType = com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest, + com.google.longrunning.Operation> + getSignalZoneStateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest, + com.google.longrunning.Operation> + getSignalZoneStateMethod; + if ((getSignalZoneStateMethod = GDCHardwareManagementGrpc.getSignalZoneStateMethod) == null) { + synchronized (GDCHardwareManagementGrpc.class) { + if ((getSignalZoneStateMethod = GDCHardwareManagementGrpc.getSignalZoneStateMethod) + == null) { + GDCHardwareManagementGrpc.getSignalZoneStateMethod = + getSignalZoneStateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SignalZoneState")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new GDCHardwareManagementMethodDescriptorSupplier("SignalZoneState")) + .build(); + } + } + } + return getSignalZoneStateMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static GDCHardwareManagementStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GDCHardwareManagementStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GDCHardwareManagementStub(channel, callOptions); + } + }; + return GDCHardwareManagementStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static GDCHardwareManagementBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GDCHardwareManagementBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GDCHardwareManagementBlockingStub(channel, callOptions); + } + }; + return GDCHardwareManagementBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static GDCHardwareManagementFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GDCHardwareManagementFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GDCHardwareManagementFutureStub(channel, callOptions); + } + }; + return GDCHardwareManagementFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The GDC Hardware Management service.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists orders in a given project and location.
+     * 
+ */ + default void listOrders( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListOrdersMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of an order.
+     * 
+ */ + default void getOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOrderMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new order in a given project and location.
+     * 
+ */ + default void createOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateOrderMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of an order.
+     * 
+ */ + default void updateOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateOrderMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an order.
+     * 
+ */ + default void deleteOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteOrderMethod(), responseObserver); + } + + /** + * + * + *
+     * Submits an order.
+     * 
+ */ + default void submitOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSubmitOrderMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists sites in a given project and location.
+     * 
+ */ + default void listSites( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSitesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a site.
+     * 
+ */ + default void getSite( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSiteMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new site in a given project and location.
+     * 
+ */ + default void createSite( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSiteMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a site.
+     * 
+ */ + default void updateSite( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSiteMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists hardware groups in a given order.
+     * 
+ */ + default void listHardwareGroups( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListHardwareGroupsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a hardware group.
+     * 
+ */ + default void getHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetHardwareGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new hardware group in a given order.
+     * 
+ */ + default void createHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateHardwareGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a hardware group.
+     * 
+ */ + default void updateHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateHardwareGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a hardware group.
+     * 
+ */ + default void deleteHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteHardwareGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists hardware in a given project and location.
+     * 
+ */ + default void listHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListHardwareMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets hardware details.
+     * 
+ */ + default void getHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetHardwareMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates new hardware in a given project and location.
+     * 
+ */ + default void createHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateHardwareMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates hardware parameters.
+     * 
+ */ + default void updateHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateHardwareMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes hardware.
+     * 
+ */ + default void deleteHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteHardwareMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the comments on an order.
+     * 
+ */ + default void listComments( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListCommentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the content of a comment.
+     * 
+ */ + default void getComment( + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetCommentMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new comment on an order.
+     * 
+ */ + default void createComment( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateCommentMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the changes made to an order.
+     * 
+ */ + default void listChangeLogEntries( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListChangeLogEntriesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a change to an order.
+     * 
+ */ + default void getChangeLogEntry( + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetChangeLogEntryMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists SKUs for a given project and location.
+     * 
+ */ + default void listSkus( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSkusMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of an SKU.
+     * 
+ */ + default void getSku( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSkuMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists zones in a given project and location.
+     * 
+ */ + default void listZones( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListZonesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a zone.
+     * 
+ */ + default void getZone( + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetZoneMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new zone in a given project and location.
+     * 
+ */ + default void createZone( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateZoneMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a zone.
+     * 
+ */ + default void updateZone( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateZoneMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a zone.
+     * 
+ */ + default void deleteZone( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteZoneMethod(), responseObserver); + } + + /** + * + * + *
+     * Signals the state of a zone.
+     * 
+ */ + default void signalZoneState( + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSignalZoneStateMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service GDCHardwareManagement. + * + *
+   * The GDC Hardware Management service.
+   * 
+ */ + public abstract static class GDCHardwareManagementImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return GDCHardwareManagementGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service GDCHardwareManagement. + * + *
+   * The GDC Hardware Management service.
+   * 
+ */ + public static final class GDCHardwareManagementStub + extends io.grpc.stub.AbstractAsyncStub { + private GDCHardwareManagementStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GDCHardwareManagementStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GDCHardwareManagementStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists orders in a given project and location.
+     * 
+ */ + public void listOrders( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListOrdersMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details of an order.
+     * 
+ */ + public void getOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetOrderMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new order in a given project and location.
+     * 
+ */ + public void createOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateOrderMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of an order.
+     * 
+ */ + public void updateOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateOrderMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an order.
+     * 
+ */ + public void deleteOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteOrderMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Submits an order.
+     * 
+ */ + public void submitOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSubmitOrderMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists sites in a given project and location.
+     * 
+ */ + public void listSites( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSitesMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details of a site.
+     * 
+ */ + public void getSite( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSiteMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new site in a given project and location.
+     * 
+ */ + public void createSite( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSiteMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a site.
+     * 
+ */ + public void updateSite( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSiteMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists hardware groups in a given order.
+     * 
+ */ + public void listHardwareGroups( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListHardwareGroupsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a hardware group.
+     * 
+ */ + public void getHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetHardwareGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new hardware group in a given order.
+     * 
+ */ + public void createHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateHardwareGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a hardware group.
+     * 
+ */ + public void updateHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateHardwareGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a hardware group.
+     * 
+ */ + public void deleteHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteHardwareGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists hardware in a given project and location.
+     * 
+ */ + public void listHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListHardwareMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets hardware details.
+     * 
+ */ + public void getHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetHardwareMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates new hardware in a given project and location.
+     * 
+ */ + public void createHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateHardwareMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates hardware parameters.
+     * 
+ */ + public void updateHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateHardwareMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes hardware.
+     * 
+ */ + public void deleteHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteHardwareMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the comments on an order.
+     * 
+ */ + public void listComments( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListCommentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the content of a comment.
+     * 
+ */ + public void getComment( + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCommentMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new comment on an order.
+     * 
+ */ + public void createComment( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateCommentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the changes made to an order.
+     * 
+ */ + public void listChangeLogEntries( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListChangeLogEntriesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a change to an order.
+     * 
+ */ + public void getChangeLogEntry( + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetChangeLogEntryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists SKUs for a given project and location.
+     * 
+ */ + public void listSkus( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSkusMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details of an SKU.
+     * 
+ */ + public void getSku( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSkuMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists zones in a given project and location.
+     * 
+ */ + public void listZones( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListZonesMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details of a zone.
+     * 
+ */ + public void getZone( + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetZoneMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new zone in a given project and location.
+     * 
+ */ + public void createZone( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateZoneMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a zone.
+     * 
+ */ + public void updateZone( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateZoneMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deletes a zone.
+     * 
+ */ + public void deleteZone( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteZoneMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Signals the state of a zone.
+     * 
+ */ + public void signalZoneState( + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSignalZoneStateMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service GDCHardwareManagement. + * + *
+   * The GDC Hardware Management service.
+   * 
+ */ + public static final class GDCHardwareManagementBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private GDCHardwareManagementBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GDCHardwareManagementBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GDCHardwareManagementBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists orders in a given project and location.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse listOrders( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListOrdersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of an order.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Order getOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetOrderMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new order in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateOrderMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of an order.
+     * 
+ */ + public com.google.longrunning.Operation updateOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateOrderMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an order.
+     * 
+ */ + public com.google.longrunning.Operation deleteOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteOrderMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Submits an order.
+     * 
+ */ + public com.google.longrunning.Operation submitOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSubmitOrderMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists sites in a given project and location.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse listSites( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSitesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a site.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Site getSite( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSiteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new site in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createSite( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSiteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a site.
+     * 
+ */ + public com.google.longrunning.Operation updateSite( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSiteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists hardware groups in a given order.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse + listHardwareGroups( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListHardwareGroupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a hardware group.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetHardwareGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new hardware group in a given order.
+     * 
+ */ + public com.google.longrunning.Operation createHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateHardwareGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a hardware group.
+     * 
+ */ + public com.google.longrunning.Operation updateHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateHardwareGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a hardware group.
+     * 
+ */ + public com.google.longrunning.Operation deleteHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteHardwareGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists hardware in a given project and location.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse listHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListHardwareMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets hardware details.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetHardwareMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates new hardware in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateHardwareMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates hardware parameters.
+     * 
+ */ + public com.google.longrunning.Operation updateHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateHardwareMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes hardware.
+     * 
+ */ + public com.google.longrunning.Operation deleteHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteHardwareMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the comments on an order.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse listComments( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCommentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the content of a comment.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment getComment( + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCommentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new comment on an order.
+     * 
+ */ + public com.google.longrunning.Operation createComment( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateCommentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the changes made to an order.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + listChangeLogEntries( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListChangeLogEntriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a change to an order.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry getChangeLogEntry( + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetChangeLogEntryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists SKUs for a given project and location.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse listSkus( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSkusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of an SKU.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku getSku( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSkuMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists zones in a given project and location.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse listZones( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListZonesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a zone.
+     * 
+ */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone getZone( + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetZoneMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new zone in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createZone( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateZoneMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a zone.
+     * 
+ */ + public com.google.longrunning.Operation updateZone( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateZoneMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a zone.
+     * 
+ */ + public com.google.longrunning.Operation deleteZone( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteZoneMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Signals the state of a zone.
+     * 
+ */ + public com.google.longrunning.Operation signalZoneState( + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSignalZoneStateMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * GDCHardwareManagement. + * + *
+   * The GDC Hardware Management service.
+   * 
+ */ + public static final class GDCHardwareManagementFutureStub + extends io.grpc.stub.AbstractFutureStub { + private GDCHardwareManagementFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GDCHardwareManagementFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GDCHardwareManagementFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists orders in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse> + listOrders(com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListOrdersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of an order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.Order> + getOrder(com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetOrderMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new order in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createOrder(com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateOrderMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of an order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateOrder(com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateOrderMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteOrder(com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteOrderMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Submits an order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + submitOrder(com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSubmitOrderMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists sites in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse> + listSites(com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSitesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a site.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.Site> + getSite(com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSiteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new site in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createSite(com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSiteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a site.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateSite(com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSiteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists hardware groups in a given order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse> + listHardwareGroups( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListHardwareGroupsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a hardware group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup> + getHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetHardwareGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new hardware group in a given order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateHardwareGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a hardware group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateHardwareGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a hardware group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteHardwareGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists hardware in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse> + listHardware(com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListHardwareMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets hardware details.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware> + getHardware(com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetHardwareMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates new hardware in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateHardwareMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates hardware parameters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateHardwareMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes hardware.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteHardwareMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the comments on an order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse> + listComments(com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListCommentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the content of a comment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.Comment> + getComment(com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCommentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new comment on an order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createComment(com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateCommentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the changes made to an order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse> + listChangeLogEntries( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListChangeLogEntriesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a change to an order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry> + getChangeLogEntry( + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetChangeLogEntryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists SKUs for a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse> + listSkus(com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSkusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of an SKU.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.Sku> + getSku(com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSkuMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists zones in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse> + listZones(com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListZonesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a zone.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.gdchardwaremanagement.v1alpha.Zone> + getZone(com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetZoneMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new zone in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createZone(com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateZoneMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a zone.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateZone(com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateZoneMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a zone.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteZone(com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteZoneMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Signals the state of a zone.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + signalZoneState( + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSignalZoneStateMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_ORDERS = 0; + private static final int METHODID_GET_ORDER = 1; + private static final int METHODID_CREATE_ORDER = 2; + private static final int METHODID_UPDATE_ORDER = 3; + private static final int METHODID_DELETE_ORDER = 4; + private static final int METHODID_SUBMIT_ORDER = 5; + private static final int METHODID_LIST_SITES = 6; + private static final int METHODID_GET_SITE = 7; + private static final int METHODID_CREATE_SITE = 8; + private static final int METHODID_UPDATE_SITE = 9; + private static final int METHODID_LIST_HARDWARE_GROUPS = 10; + private static final int METHODID_GET_HARDWARE_GROUP = 11; + private static final int METHODID_CREATE_HARDWARE_GROUP = 12; + private static final int METHODID_UPDATE_HARDWARE_GROUP = 13; + private static final int METHODID_DELETE_HARDWARE_GROUP = 14; + private static final int METHODID_LIST_HARDWARE = 15; + private static final int METHODID_GET_HARDWARE = 16; + private static final int METHODID_CREATE_HARDWARE = 17; + private static final int METHODID_UPDATE_HARDWARE = 18; + private static final int METHODID_DELETE_HARDWARE = 19; + private static final int METHODID_LIST_COMMENTS = 20; + private static final int METHODID_GET_COMMENT = 21; + private static final int METHODID_CREATE_COMMENT = 22; + private static final int METHODID_LIST_CHANGE_LOG_ENTRIES = 23; + private static final int METHODID_GET_CHANGE_LOG_ENTRY = 24; + private static final int METHODID_LIST_SKUS = 25; + private static final int METHODID_GET_SKU = 26; + private static final int METHODID_LIST_ZONES = 27; + private static final int METHODID_GET_ZONE = 28; + private static final int METHODID_CREATE_ZONE = 29; + private static final int METHODID_UPDATE_ZONE = 30; + private static final int METHODID_DELETE_ZONE = 31; + private static final int METHODID_SIGNAL_ZONE_STATE = 32; + + 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_ORDERS: + serviceImpl.listOrders( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse>) + responseObserver); + break; + case METHODID_GET_ORDER: + serviceImpl.getOrder( + (com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_ORDER: + serviceImpl.createOrder( + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ORDER: + serviceImpl.updateOrder( + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ORDER: + serviceImpl.deleteOrder( + (com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SUBMIT_ORDER: + serviceImpl.submitOrder( + (com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SITES: + serviceImpl.listSites( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse>) + responseObserver); + break; + case METHODID_GET_SITE: + serviceImpl.getSite( + (com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_SITE: + serviceImpl.createSite( + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SITE: + serviceImpl.updateSite( + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_HARDWARE_GROUPS: + serviceImpl.listHardwareGroups( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse>) + responseObserver); + break; + case METHODID_GET_HARDWARE_GROUP: + serviceImpl.getHardwareGroup( + (com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup>) + responseObserver); + break; + case METHODID_CREATE_HARDWARE_GROUP: + serviceImpl.createHardwareGroup( + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_HARDWARE_GROUP: + serviceImpl.updateHardwareGroup( + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_HARDWARE_GROUP: + serviceImpl.deleteHardwareGroup( + (com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_HARDWARE: + serviceImpl.listHardware( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse>) + responseObserver); + break; + case METHODID_GET_HARDWARE: + serviceImpl.getHardware( + (com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_HARDWARE: + serviceImpl.createHardware( + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_HARDWARE: + serviceImpl.updateHardware( + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_HARDWARE: + serviceImpl.deleteHardware( + (com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_COMMENTS: + serviceImpl.listComments( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse>) + responseObserver); + break; + case METHODID_GET_COMMENT: + serviceImpl.getComment( + (com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_COMMENT: + serviceImpl.createComment( + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CHANGE_LOG_ENTRIES: + serviceImpl.listChangeLogEntries( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse>) + responseObserver); + break; + case METHODID_GET_CHANGE_LOG_ENTRY: + serviceImpl.getChangeLogEntry( + (com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry>) + responseObserver); + break; + case METHODID_LIST_SKUS: + serviceImpl.listSkus( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse>) + responseObserver); + break; + case METHODID_GET_SKU: + serviceImpl.getSku( + (com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ZONES: + serviceImpl.listZones( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse>) + responseObserver); + break; + case METHODID_GET_ZONE: + serviceImpl.getZone( + (com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_ZONE: + serviceImpl.createZone( + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ZONE: + serviceImpl.updateZone( + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ZONE: + serviceImpl.deleteZone( + (com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SIGNAL_ZONE_STATE: + serviceImpl.signalZoneState( + (com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest) 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( + getListOrdersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse>( + service, METHODID_LIST_ORDERS))) + .addMethod( + getGetOrderMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Order>( + service, METHODID_GET_ORDER))) + .addMethod( + getCreateOrderMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_ORDER))) + .addMethod( + getUpdateOrderMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_ORDER))) + .addMethod( + getDeleteOrderMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_ORDER))) + .addMethod( + getSubmitOrderMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest, + com.google.longrunning.Operation>(service, METHODID_SUBMIT_ORDER))) + .addMethod( + getListSitesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse>( + service, METHODID_LIST_SITES))) + .addMethod( + getGetSiteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Site>( + service, METHODID_GET_SITE))) + .addMethod( + getCreateSiteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_SITE))) + .addMethod( + getUpdateSiteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_SITE))) + .addMethod( + getListHardwareGroupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse>( + service, METHODID_LIST_HARDWARE_GROUPS))) + .addMethod( + getGetHardwareGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup>( + service, METHODID_GET_HARDWARE_GROUP))) + .addMethod( + getCreateHardwareGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_HARDWARE_GROUP))) + .addMethod( + getUpdateHardwareGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_HARDWARE_GROUP))) + .addMethod( + getDeleteHardwareGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_HARDWARE_GROUP))) + .addMethod( + getListHardwareMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse>( + service, METHODID_LIST_HARDWARE))) + .addMethod( + getGetHardwareMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware>( + service, METHODID_GET_HARDWARE))) + .addMethod( + getCreateHardwareMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_HARDWARE))) + .addMethod( + getUpdateHardwareMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_HARDWARE))) + .addMethod( + getDeleteHardwareMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_HARDWARE))) + .addMethod( + getListCommentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse>( + service, METHODID_LIST_COMMENTS))) + .addMethod( + getGetCommentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment>( + service, METHODID_GET_COMMENT))) + .addMethod( + getCreateCommentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_COMMENT))) + .addMethod( + getListChangeLogEntriesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse>( + service, METHODID_LIST_CHANGE_LOG_ENTRIES))) + .addMethod( + getGetChangeLogEntryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry>( + service, METHODID_GET_CHANGE_LOG_ENTRY))) + .addMethod( + getListSkusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse>( + service, METHODID_LIST_SKUS))) + .addMethod( + getGetSkuMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Sku>(service, METHODID_GET_SKU))) + .addMethod( + getListZonesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse>( + service, METHODID_LIST_ZONES))) + .addMethod( + getGetZoneMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone>( + service, METHODID_GET_ZONE))) + .addMethod( + getCreateZoneMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_ZONE))) + .addMethod( + getUpdateZoneMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_ZONE))) + .addMethod( + getDeleteZoneMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_ZONE))) + .addMethod( + getSignalZoneStateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest, + com.google.longrunning.Operation>(service, METHODID_SIGNAL_ZONE_STATE))) + .build(); + } + + private abstract static class GDCHardwareManagementBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + GDCHardwareManagementBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("GDCHardwareManagement"); + } + } + + private static final class GDCHardwareManagementFileDescriptorSupplier + extends GDCHardwareManagementBaseDescriptorSupplier { + GDCHardwareManagementFileDescriptorSupplier() {} + } + + private static final class GDCHardwareManagementMethodDescriptorSupplier + extends GDCHardwareManagementBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + GDCHardwareManagementMethodDescriptorSupplier(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 (GDCHardwareManagementGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new GDCHardwareManagementFileDescriptorSupplier()) + .addMethod(getListOrdersMethod()) + .addMethod(getGetOrderMethod()) + .addMethod(getCreateOrderMethod()) + .addMethod(getUpdateOrderMethod()) + .addMethod(getDeleteOrderMethod()) + .addMethod(getSubmitOrderMethod()) + .addMethod(getListSitesMethod()) + .addMethod(getGetSiteMethod()) + .addMethod(getCreateSiteMethod()) + .addMethod(getUpdateSiteMethod()) + .addMethod(getListHardwareGroupsMethod()) + .addMethod(getGetHardwareGroupMethod()) + .addMethod(getCreateHardwareGroupMethod()) + .addMethod(getUpdateHardwareGroupMethod()) + .addMethod(getDeleteHardwareGroupMethod()) + .addMethod(getListHardwareMethod()) + .addMethod(getGetHardwareMethod()) + .addMethod(getCreateHardwareMethod()) + .addMethod(getUpdateHardwareMethod()) + .addMethod(getDeleteHardwareMethod()) + .addMethod(getListCommentsMethod()) + .addMethod(getGetCommentMethod()) + .addMethod(getCreateCommentMethod()) + .addMethod(getListChangeLogEntriesMethod()) + .addMethod(getGetChangeLogEntryMethod()) + .addMethod(getListSkusMethod()) + .addMethod(getGetSkuMethod()) + .addMethod(getListZonesMethod()) + .addMethod(getGetZoneMethod()) + .addMethod(getCreateZoneMethod()) + .addMethod(getUpdateZoneMethod()) + .addMethod(getDeleteZoneMethod()) + .addMethod(getSignalZoneStateMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-gdchardwaremanagement/owlbot.py b/java-gdchardwaremanagement/owlbot.py new file mode 100644 index 000000000000..2ba11e6bba67 --- /dev/null +++ b/java-gdchardwaremanagement/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-gdchardwaremanagement/pom.xml b/java-gdchardwaremanagement/pom.xml new file mode 100644 index 000000000000..6e0f336a1e1d --- /dev/null +++ b/java-gdchardwaremanagement/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + com.google.cloud + google-cloud-gdchardwaremanagement-parent + pom + 0.0.1-SNAPSHOT + Google GDC Hardware Management API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.40.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-gdchardwaremanagement-parent + + + + + + com.google.cloud + google-cloud-gdchardwaremanagement + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-gdchardwaremanagement-v1alpha + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-gdchardwaremanagement-v1alpha + 0.0.1-SNAPSHOT + + + + + + + google-cloud-gdchardwaremanagement + grpc-google-cloud-gdchardwaremanagement-v1alpha + proto-google-cloud-gdchardwaremanagement-v1alpha + google-cloud-gdchardwaremanagement-bom + + + diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/clirr-ignored-differences.xml b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/clirr-ignored-differences.xml new file mode 100644 index 000000000000..ac5c9b57bf71 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/gdchardwaremanagement/v1alpha/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/gdchardwaremanagement/v1alpha/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/gdchardwaremanagement/v1alpha/*OrBuilder + boolean has*(*) + + diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/pom.xml b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/pom.xml new file mode 100644 index 000000000000..aabcfdae325b --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-gdchardwaremanagement-v1alpha + 0.0.1-SNAPSHOT + proto-google-cloud-gdchardwaremanagement-v1alpha + Proto library for google-cloud-gdchardwaremanagement + + com.google.cloud + google-cloud-gdchardwaremanagement-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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ChangeLogEntry.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ChangeLogEntry.java new file mode 100644 index 000000000000..30cc9de35347 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ChangeLogEntry.java @@ -0,0 +1,1479 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A log entry of a change made to an order.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry} + */ +public final class ChangeLogEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry) + ChangeLogEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeLogEntry.newBuilder() to construct. + private ChangeLogEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeLogEntry() { + name_ = ""; + log_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeLogEntry(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + 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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Name of this change log entry.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+   * 
+ * + * 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 this change log entry.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+   * 
+ * + * 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. Time when this change log entry was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Time when this change log entry was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this change log entry was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int LABELS_FIELD_NUMBER = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_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 associated with this change log entry as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.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 associated with this change log entry as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels associated with this change log entry as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.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 associated with this change log entry as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.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 LOG_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object log_ = ""; + /** + * + * + *
+   * Output only. Content of this log entry.
+   * 
+ * + * string log = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The log. + */ + @java.lang.Override + public java.lang.String getLog() { + java.lang.Object ref = log_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + log_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Content of this log entry.
+   * 
+ * + * string log = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for log. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLogBytes() { + java.lang.Object ref = log_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + log_ = 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()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(log_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, log_); + } + 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()); + } + 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(3, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(log_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, log_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getLog().equals(other.getLog())) return false; + if (!getUnknownFields().equals(other.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 (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + LOG_FIELD_NUMBER; + hash = (53 * hash) + getLog().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry 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.gdchardwaremanagement.v1alpha.ChangeLogEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry 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.gdchardwaremanagement.v1alpha.ChangeLogEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry 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.gdchardwaremanagement.v1alpha.ChangeLogEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A log entry of a change made to an order.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry) + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + 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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.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(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + log_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry 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.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.log_ = log_; + } + 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.gdchardwaremanagement.v1alpha.ChangeLogEntry) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000004; + if (!other.getLog().isEmpty()) { + log_ = other.log_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + log_ = 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 name_ = ""; + /** + * + * + *
+     * Identifier. Name of this change log entry.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+     * 
+ * + * 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 this change log entry.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+     * 
+ * + * 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 this change log entry.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+     * 
+ * + * 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 this change log entry.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+     * 
+ * + * 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 this change log entry.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+     * 
+ * + * 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. Time when this change log entry was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. Time when this change log entry was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this change log entry was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this change log entry was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this change log entry was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 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. Time when this change log entry was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this change log entry was created.
+     * 
+ * + * + * .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. Time when this change log entry was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this change log entry was created.
+     * 
+ * + * + * .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.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_ |= 0x00000004; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels associated with this change log entry as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.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 associated with this change log entry as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this change log entry as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.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 associated with this change log entry as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.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_ & ~0x00000004); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels associated with this change log entry as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.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_ |= 0x00000004; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this change log entry as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.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_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * Optional. Labels associated with this change log entry as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private java.lang.Object log_ = ""; + /** + * + * + *
+     * Output only. Content of this log entry.
+     * 
+ * + * string log = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The log. + */ + public java.lang.String getLog() { + java.lang.Object ref = log_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + log_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Content of this log entry.
+     * 
+ * + * string log = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for log. + */ + public com.google.protobuf.ByteString getLogBytes() { + java.lang.Object ref = log_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + log_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Content of this log entry.
+     * 
+ * + * string log = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The log to set. + * @return This builder for chaining. + */ + public Builder setLog(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + log_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Content of this log entry.
+     * 
+ * + * string log = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLog() { + log_ = getDefaultInstance().getLog(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Content of this log entry.
+     * 
+ * + * string log = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for log to set. + * @return This builder for chaining. + */ + public Builder setLogBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + log_ = 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.gdchardwaremanagement.v1alpha.ChangeLogEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeLogEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ChangeLogEntryName.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ChangeLogEntryName.java new file mode 100644 index 000000000000..a2e5668b55ce --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ChangeLogEntryName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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 ChangeLogEntryName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ORDER_CHANGE_LOG_ENTRY = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String order; + private final String changeLogEntry; + + @Deprecated + protected ChangeLogEntryName() { + project = null; + location = null; + order = null; + changeLogEntry = null; + } + + private ChangeLogEntryName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + order = Preconditions.checkNotNull(builder.getOrder()); + changeLogEntry = Preconditions.checkNotNull(builder.getChangeLogEntry()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOrder() { + return order; + } + + public String getChangeLogEntry() { + return changeLogEntry; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ChangeLogEntryName of( + String project, String location, String order, String changeLogEntry) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setOrder(order) + .setChangeLogEntry(changeLogEntry) + .build(); + } + + public static String format( + String project, String location, String order, String changeLogEntry) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setOrder(order) + .setChangeLogEntry(changeLogEntry) + .build() + .toString(); + } + + public static ChangeLogEntryName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ORDER_CHANGE_LOG_ENTRY.validatedMatch( + formattedString, "ChangeLogEntryName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("order"), + matchMap.get("change_log_entry")); + } + + 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 (ChangeLogEntryName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ORDER_CHANGE_LOG_ENTRY.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 (order != null) { + fieldMapBuilder.put("order", order); + } + if (changeLogEntry != null) { + fieldMapBuilder.put("change_log_entry", changeLogEntry); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ORDER_CHANGE_LOG_ENTRY.instantiate( + "project", + project, + "location", + location, + "order", + order, + "change_log_entry", + changeLogEntry); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ChangeLogEntryName that = ((ChangeLogEntryName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.order, that.order) + && Objects.equals(this.changeLogEntry, that.changeLogEntry); + } + 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(order); + h *= 1000003; + h ^= Objects.hashCode(changeLogEntry); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}. + */ + public static class Builder { + private String project; + private String location; + private String order; + private String changeLogEntry; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOrder() { + return order; + } + + public String getChangeLogEntry() { + return changeLogEntry; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setOrder(String order) { + this.order = order; + return this; + } + + public Builder setChangeLogEntry(String changeLogEntry) { + this.changeLogEntry = changeLogEntry; + return this; + } + + private Builder(ChangeLogEntryName changeLogEntryName) { + this.project = changeLogEntryName.project; + this.location = changeLogEntryName.location; + this.order = changeLogEntryName.order; + this.changeLogEntry = changeLogEntryName.changeLogEntry; + } + + public ChangeLogEntryName build() { + return new ChangeLogEntryName(this); + } + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ChangeLogEntryOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ChangeLogEntryOrBuilder.java new file mode 100644 index 000000000000..32d0b4dd1eb0 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ChangeLogEntryOrBuilder.java @@ -0,0 +1,186 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ChangeLogEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of this change log entry.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Name of this change log entry.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when this change log entry was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this change log entry was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this change log entry was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels associated with this change log entry as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels associated with this change log entry as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels associated with this change log entry as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels associated with this change log entry as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels associated with this change log entry as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Content of this log entry.
+   * 
+ * + * string log = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The log. + */ + java.lang.String getLog(); + /** + * + * + *
+   * Output only. Content of this log entry.
+   * 
+ * + * string log = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for log. + */ + com.google.protobuf.ByteString getLogBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Comment.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Comment.java new file mode 100644 index 000000000000..faf5ff8b1954 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Comment.java @@ -0,0 +1,1671 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A comment on an order.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Comment} + */ +public final class Comment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.Comment) + CommentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Comment.newBuilder() to construct. + private Comment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Comment() { + name_ = ""; + author_ = ""; + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Comment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + 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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Name of this comment.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+   * 
+ * + * 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 this comment.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+   * 
+ * + * 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. Time when this comment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Time when this comment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this comment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int LABELS_FIELD_NUMBER = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_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 associated with this comment as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.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 associated with this comment as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels associated with this comment as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.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 associated with this comment as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.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 AUTHOR_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object author_ = ""; + /** + * + * + *
+   * Output only. Username of the author of this comment. This is auto-populated
+   * from the credentials used during creation of the comment.
+   * 
+ * + * string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The author. + */ + @java.lang.Override + public java.lang.String getAuthor() { + java.lang.Object ref = author_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + author_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Username of the author of this comment. This is auto-populated
+   * from the credentials used during creation of the comment.
+   * 
+ * + * string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for author. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthorBytes() { + java.lang.Object ref = author_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + author_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEXT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * + * + *
+   * Required. Text of this comment. The length of text must be <= 1000
+   * characters.
+   * 
+ * + * string text = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Text of this comment. The length of text must be <= 1000
+   * characters.
+   * 
+ * + * string text = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(author_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, author_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, text_); + } + 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()); + } + 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(3, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(author_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, author_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, text_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.Comment)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.Comment other = + (com.google.cloud.gdchardwaremanagement.v1alpha.Comment) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getAuthor().equals(other.getAuthor())) return false; + if (!getText().equals(other.getText())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + AUTHOR_FIELD_NUMBER; + hash = (53 * hash) + getAuthor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment 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.gdchardwaremanagement.v1alpha.Comment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment 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.gdchardwaremanagement.v1alpha.Comment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment 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.gdchardwaremanagement.v1alpha.Comment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A comment on an order.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Comment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.Comment) + com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + 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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.Comment.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(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + author_ = ""; + text_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Comment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment build() { + com.google.cloud.gdchardwaremanagement.v1alpha.Comment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.Comment result = + new com.google.cloud.gdchardwaremanagement.v1alpha.Comment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.Comment 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.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.author_ = author_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.text_ = text_; + } + 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.gdchardwaremanagement.v1alpha.Comment) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.Comment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.Comment other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.Comment.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000004; + if (!other.getAuthor().isEmpty()) { + author_ = other.author_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + author_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Identifier. Name of this comment.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+     * 
+ * + * 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 this comment.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+     * 
+ * + * 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 this comment.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+     * 
+ * + * 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 this comment.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+     * 
+ * + * 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 this comment.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+     * 
+ * + * 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. Time when this comment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. Time when this comment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this comment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this comment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this comment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 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. Time when this comment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this comment was created.
+     * 
+ * + * + * .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. Time when this comment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this comment was created.
+     * 
+ * + * + * .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.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_ |= 0x00000004; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels associated with this comment as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.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 associated with this comment as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this comment as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.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 associated with this comment as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.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_ & ~0x00000004); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels associated with this comment as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.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_ |= 0x00000004; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this comment as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.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_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * Optional. Labels associated with this comment as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private java.lang.Object author_ = ""; + /** + * + * + *
+     * Output only. Username of the author of this comment. This is auto-populated
+     * from the credentials used during creation of the comment.
+     * 
+ * + * string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The author. + */ + public java.lang.String getAuthor() { + java.lang.Object ref = author_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + author_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Username of the author of this comment. This is auto-populated
+     * from the credentials used during creation of the comment.
+     * 
+ * + * string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for author. + */ + public com.google.protobuf.ByteString getAuthorBytes() { + java.lang.Object ref = author_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + author_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Username of the author of this comment. This is auto-populated
+     * from the credentials used during creation of the comment.
+     * 
+ * + * string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The author to set. + * @return This builder for chaining. + */ + public Builder setAuthor(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + author_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Username of the author of this comment. This is auto-populated
+     * from the credentials used during creation of the comment.
+     * 
+ * + * string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAuthor() { + author_ = getDefaultInstance().getAuthor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Username of the author of this comment. This is auto-populated
+     * from the credentials used during creation of the comment.
+     * 
+ * + * string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for author to set. + * @return This builder for chaining. + */ + public Builder setAuthorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + author_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object text_ = ""; + /** + * + * + *
+     * Required. Text of this comment. The length of text must be <= 1000
+     * characters.
+     * 
+ * + * string text = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Text of this comment. The length of text must be <= 1000
+     * characters.
+     * 
+ * + * string text = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Text of this comment. The length of text must be <= 1000
+     * characters.
+     * 
+ * + * string text = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Text of this comment. The length of text must be <= 1000
+     * characters.
+     * 
+ * + * string text = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Text of this comment. The length of text must be <= 1000
+     * characters.
+     * 
+ * + * string text = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @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.gdchardwaremanagement.v1alpha.Comment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.Comment) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.Comment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.Comment(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Comment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Comment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CommentName.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CommentName.java new file mode 100644 index 000000000000..3d306c3535de --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CommentName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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 CommentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ORDER_COMMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/orders/{order}/comments/{comment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String order; + private final String comment; + + @Deprecated + protected CommentName() { + project = null; + location = null; + order = null; + comment = null; + } + + private CommentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + order = Preconditions.checkNotNull(builder.getOrder()); + comment = Preconditions.checkNotNull(builder.getComment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOrder() { + return order; + } + + public String getComment() { + return comment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CommentName of(String project, String location, String order, String comment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setOrder(order) + .setComment(comment) + .build(); + } + + public static String format(String project, String location, String order, String comment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setOrder(order) + .setComment(comment) + .build() + .toString(); + } + + public static CommentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ORDER_COMMENT.validatedMatch( + formattedString, "CommentName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("order"), + matchMap.get("comment")); + } + + 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 (CommentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ORDER_COMMENT.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 (order != null) { + fieldMapBuilder.put("order", order); + } + if (comment != null) { + fieldMapBuilder.put("comment", comment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ORDER_COMMENT.instantiate( + "project", project, "location", location, "order", order, "comment", comment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + CommentName that = ((CommentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.order, that.order) + && Objects.equals(this.comment, that.comment); + } + 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(order); + h *= 1000003; + h ^= Objects.hashCode(comment); + return h; + } + + /** Builder for projects/{project}/locations/{location}/orders/{order}/comments/{comment}. */ + public static class Builder { + private String project; + private String location; + private String order; + private String comment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOrder() { + return order; + } + + public String getComment() { + return comment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setOrder(String order) { + this.order = order; + return this; + } + + public Builder setComment(String comment) { + this.comment = comment; + return this; + } + + private Builder(CommentName commentName) { + this.project = commentName.project; + this.location = commentName.location; + this.order = commentName.order; + this.comment = commentName.comment; + } + + public CommentName build() { + return new CommentName(this); + } + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CommentOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CommentOrBuilder.java new file mode 100644 index 000000000000..c1ed32f30319 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CommentOrBuilder.java @@ -0,0 +1,215 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface CommentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.Comment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of this comment.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Name of this comment.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when this comment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this comment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this comment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels associated with this comment as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels associated with this comment as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels associated with this comment as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels associated with this comment as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels associated with this comment as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Username of the author of this comment. This is auto-populated
+   * from the credentials used during creation of the comment.
+   * 
+ * + * string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The author. + */ + java.lang.String getAuthor(); + /** + * + * + *
+   * Output only. Username of the author of this comment. This is auto-populated
+   * from the credentials used during creation of the comment.
+   * 
+ * + * string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for author. + */ + com.google.protobuf.ByteString getAuthorBytes(); + + /** + * + * + *
+   * Required. Text of this comment. The length of text must be <= 1000
+   * characters.
+   * 
+ * + * string text = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+   * Required. Text of this comment. The length of text must be <= 1000
+   * characters.
+   * 
+ * + * string text = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Contact.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Contact.java new file mode 100644 index 000000000000..5b15ac107abf --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Contact.java @@ -0,0 +1,2031 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Contact details of a point of contact.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Contact} + */ +public final class Contact extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.Contact) + ContactOrBuilder { + private static final long serialVersionUID = 0L; + // Use Contact.newBuilder() to construct. + private Contact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Contact() { + givenName_ = ""; + familyName_ = ""; + email_ = ""; + phone_ = ""; + reachableTimes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Contact(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Contact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Contact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder.class); + } + + private int bitField0_; + public static final int GIVEN_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object givenName_ = ""; + /** + * + * + *
+   * Required. Given name of the contact.
+   * 
+ * + * string given_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The givenName. + */ + @java.lang.Override + public java.lang.String getGivenName() { + java.lang.Object ref = givenName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + givenName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Given name of the contact.
+   * 
+ * + * string given_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for givenName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGivenNameBytes() { + java.lang.Object ref = givenName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + givenName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAMILY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object familyName_ = ""; + /** + * + * + *
+   * Optional. Family name of the contact.
+   * 
+ * + * string family_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The familyName. + */ + @java.lang.Override + public java.lang.String getFamilyName() { + java.lang.Object ref = familyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + familyName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Family name of the contact.
+   * 
+ * + * string family_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for familyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFamilyNameBytes() { + java.lang.Object ref = familyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + familyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMAIL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object email_ = ""; + /** + * + * + *
+   * Required. Email of the contact.
+   * 
+ * + * string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Email of the contact.
+   * 
+ * + * string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHONE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object phone_ = ""; + /** + * + * + *
+   * Required. Phone number of the contact.
+   * 
+ * + * string phone = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The phone. + */ + @java.lang.Override + public java.lang.String getPhone() { + java.lang.Object ref = phone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phone_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Phone number of the contact.
+   * 
+ * + * string phone = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for phone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPhoneBytes() { + java.lang.Object ref = phone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_ZONE_FIELD_NUMBER = 5; + private com.google.type.TimeZone timeZone_; + /** + * + * + *
+   * Optional. Time zone of the contact.
+   * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the timeZone field is set. + */ + @java.lang.Override + public boolean hasTimeZone() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Time zone of the contact.
+   * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + @java.lang.Override + public com.google.type.TimeZone getTimeZone() { + return timeZone_ == null ? com.google.type.TimeZone.getDefaultInstance() : timeZone_; + } + /** + * + * + *
+   * Optional. Time zone of the contact.
+   * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder() { + return timeZone_ == null ? com.google.type.TimeZone.getDefaultInstance() : timeZone_; + } + + public static final int REACHABLE_TIMES_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List reachableTimes_; + /** + * + * + *
+   * Optional. The time periods when the contact is reachable.
+   * If this field is empty, the contact is reachable at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getReachableTimesList() { + return reachableTimes_; + } + /** + * + * + *
+   * Optional. The time periods when the contact is reachable.
+   * If this field is empty, the contact is reachable at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder> + getReachableTimesOrBuilderList() { + return reachableTimes_; + } + /** + * + * + *
+   * Optional. The time periods when the contact is reachable.
+   * If this field is empty, the contact is reachable at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getReachableTimesCount() { + return reachableTimes_.size(); + } + /** + * + * + *
+   * Optional. The time periods when the contact is reachable.
+   * If this field is empty, the contact is reachable at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod getReachableTimes(int index) { + return reachableTimes_.get(index); + } + /** + * + * + *
+   * Optional. The time periods when the contact is reachable.
+   * If this field is empty, the contact is reachable at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder + getReachableTimesOrBuilder(int index) { + return reachableTimes_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(givenName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, givenName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, familyName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, email_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, phone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getTimeZone()); + } + for (int i = 0; i < reachableTimes_.size(); i++) { + output.writeMessage(6, reachableTimes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(givenName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, givenName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, familyName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, email_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, phone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTimeZone()); + } + for (int i = 0; i < reachableTimes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, reachableTimes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.Contact)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.Contact other = + (com.google.cloud.gdchardwaremanagement.v1alpha.Contact) obj; + + if (!getGivenName().equals(other.getGivenName())) return false; + if (!getFamilyName().equals(other.getFamilyName())) return false; + if (!getEmail().equals(other.getEmail())) return false; + if (!getPhone().equals(other.getPhone())) return false; + if (hasTimeZone() != other.hasTimeZone()) return false; + if (hasTimeZone()) { + if (!getTimeZone().equals(other.getTimeZone())) return false; + } + if (!getReachableTimesList().equals(other.getReachableTimesList())) return false; + if (!getUnknownFields().equals(other.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) + GIVEN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getGivenName().hashCode(); + hash = (37 * hash) + FAMILY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFamilyName().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (37 * hash) + PHONE_FIELD_NUMBER; + hash = (53 * hash) + getPhone().hashCode(); + if (hasTimeZone()) { + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + } + if (getReachableTimesCount() > 0) { + hash = (37 * hash) + REACHABLE_TIMES_FIELD_NUMBER; + hash = (53 * hash) + getReachableTimesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact 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.gdchardwaremanagement.v1alpha.Contact parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact 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.gdchardwaremanagement.v1alpha.Contact parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact 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.gdchardwaremanagement.v1alpha.Contact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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; + } + /** + * + * + *
+   * Contact details of a point of contact.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Contact} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.Contact) + com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Contact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Contact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.Contact.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTimeZoneFieldBuilder(); + getReachableTimesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + givenName_ = ""; + familyName_ = ""; + email_ = ""; + phone_ = ""; + timeZone_ = null; + if (timeZoneBuilder_ != null) { + timeZoneBuilder_.dispose(); + timeZoneBuilder_ = null; + } + if (reachableTimesBuilder_ == null) { + reachableTimes_ = java.util.Collections.emptyList(); + } else { + reachableTimes_ = null; + reachableTimesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Contact_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Contact.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact build() { + com.google.cloud.gdchardwaremanagement.v1alpha.Contact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.Contact result = + new com.google.cloud.gdchardwaremanagement.v1alpha.Contact(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.Contact result) { + if (reachableTimesBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + reachableTimes_ = java.util.Collections.unmodifiableList(reachableTimes_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.reachableTimes_ = reachableTimes_; + } else { + result.reachableTimes_ = reachableTimesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.Contact result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.givenName_ = givenName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.familyName_ = familyName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.email_ = email_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.phone_ = phone_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.timeZone_ = timeZoneBuilder_ == null ? timeZone_ : timeZoneBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gdchardwaremanagement.v1alpha.Contact) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.Contact) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.Contact other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.Contact.getDefaultInstance()) + return this; + if (!other.getGivenName().isEmpty()) { + givenName_ = other.givenName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFamilyName().isEmpty()) { + familyName_ = other.familyName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPhone().isEmpty()) { + phone_ = other.phone_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasTimeZone()) { + mergeTimeZone(other.getTimeZone()); + } + if (reachableTimesBuilder_ == null) { + if (!other.reachableTimes_.isEmpty()) { + if (reachableTimes_.isEmpty()) { + reachableTimes_ = other.reachableTimes_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureReachableTimesIsMutable(); + reachableTimes_.addAll(other.reachableTimes_); + } + onChanged(); + } + } else { + if (!other.reachableTimes_.isEmpty()) { + if (reachableTimesBuilder_.isEmpty()) { + reachableTimesBuilder_.dispose(); + reachableTimesBuilder_ = null; + reachableTimes_ = other.reachableTimes_; + bitField0_ = (bitField0_ & ~0x00000020); + reachableTimesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReachableTimesFieldBuilder() + : null; + } else { + reachableTimesBuilder_.addAllMessages(other.reachableTimes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + givenName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + familyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + email_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + phone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getTimeZoneFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.parser(), + extensionRegistry); + if (reachableTimesBuilder_ == null) { + ensureReachableTimesIsMutable(); + reachableTimes_.add(m); + } else { + reachableTimesBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object givenName_ = ""; + /** + * + * + *
+     * Required. Given name of the contact.
+     * 
+ * + * string given_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The givenName. + */ + public java.lang.String getGivenName() { + java.lang.Object ref = givenName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + givenName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Given name of the contact.
+     * 
+ * + * string given_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for givenName. + */ + public com.google.protobuf.ByteString getGivenNameBytes() { + java.lang.Object ref = givenName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + givenName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Given name of the contact.
+     * 
+ * + * string given_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The givenName to set. + * @return This builder for chaining. + */ + public Builder setGivenName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + givenName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Given name of the contact.
+     * 
+ * + * string given_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGivenName() { + givenName_ = getDefaultInstance().getGivenName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Given name of the contact.
+     * 
+ * + * string given_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for givenName to set. + * @return This builder for chaining. + */ + public Builder setGivenNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + givenName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object familyName_ = ""; + /** + * + * + *
+     * Optional. Family name of the contact.
+     * 
+ * + * string family_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The familyName. + */ + public java.lang.String getFamilyName() { + java.lang.Object ref = familyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + familyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Family name of the contact.
+     * 
+ * + * string family_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for familyName. + */ + public com.google.protobuf.ByteString getFamilyNameBytes() { + java.lang.Object ref = familyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + familyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Family name of the contact.
+     * 
+ * + * string family_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The familyName to set. + * @return This builder for chaining. + */ + public Builder setFamilyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + familyName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Family name of the contact.
+     * 
+ * + * string family_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFamilyName() { + familyName_ = getDefaultInstance().getFamilyName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Family name of the contact.
+     * 
+ * + * string family_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for familyName to set. + * @return This builder for chaining. + */ + public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + familyName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object email_ = ""; + /** + * + * + *
+     * Required. Email of the contact.
+     * 
+ * + * string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Email of the contact.
+     * 
+ * + * string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for email. + */ + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Email of the contact.
+     * 
+ * + * string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + email_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Email of the contact.
+     * 
+ * + * string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEmail() { + email_ = getDefaultInstance().getEmail(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Email of the contact.
+     * 
+ * + * string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + email_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object phone_ = ""; + /** + * + * + *
+     * Required. Phone number of the contact.
+     * 
+ * + * string phone = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The phone. + */ + public java.lang.String getPhone() { + java.lang.Object ref = phone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Phone number of the contact.
+     * 
+ * + * string phone = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for phone. + */ + public com.google.protobuf.ByteString getPhoneBytes() { + java.lang.Object ref = phone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Phone number of the contact.
+     * 
+ * + * string phone = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The phone to set. + * @return This builder for chaining. + */ + public Builder setPhone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + phone_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Phone number of the contact.
+     * 
+ * + * string phone = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPhone() { + phone_ = getDefaultInstance().getPhone(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Phone number of the contact.
+     * 
+ * + * string phone = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for phone to set. + * @return This builder for chaining. + */ + public Builder setPhoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + phone_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.type.TimeZone timeZone_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeZone, + com.google.type.TimeZone.Builder, + com.google.type.TimeZoneOrBuilder> + timeZoneBuilder_; + /** + * + * + *
+     * Optional. Time zone of the contact.
+     * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the timeZone field is set. + */ + public boolean hasTimeZone() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. Time zone of the contact.
+     * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + public com.google.type.TimeZone getTimeZone() { + if (timeZoneBuilder_ == null) { + return timeZone_ == null ? com.google.type.TimeZone.getDefaultInstance() : timeZone_; + } else { + return timeZoneBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Time zone of the contact.
+     * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setTimeZone(com.google.type.TimeZone value) { + if (timeZoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeZone_ = value; + } else { + timeZoneBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Time zone of the contact.
+     * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setTimeZone(com.google.type.TimeZone.Builder builderForValue) { + if (timeZoneBuilder_ == null) { + timeZone_ = builderForValue.build(); + } else { + timeZoneBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Time zone of the contact.
+     * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeTimeZone(com.google.type.TimeZone value) { + if (timeZoneBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && timeZone_ != null + && timeZone_ != com.google.type.TimeZone.getDefaultInstance()) { + getTimeZoneBuilder().mergeFrom(value); + } else { + timeZone_ = value; + } + } else { + timeZoneBuilder_.mergeFrom(value); + } + if (timeZone_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Time zone of the contact.
+     * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearTimeZone() { + bitField0_ = (bitField0_ & ~0x00000010); + timeZone_ = null; + if (timeZoneBuilder_ != null) { + timeZoneBuilder_.dispose(); + timeZoneBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Time zone of the contact.
+     * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.TimeZone.Builder getTimeZoneBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getTimeZoneFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Time zone of the contact.
+     * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder() { + if (timeZoneBuilder_ != null) { + return timeZoneBuilder_.getMessageOrBuilder(); + } else { + return timeZone_ == null ? com.google.type.TimeZone.getDefaultInstance() : timeZone_; + } + } + /** + * + * + *
+     * Optional. Time zone of the contact.
+     * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeZone, + com.google.type.TimeZone.Builder, + com.google.type.TimeZoneOrBuilder> + getTimeZoneFieldBuilder() { + if (timeZoneBuilder_ == null) { + timeZoneBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeZone, + com.google.type.TimeZone.Builder, + com.google.type.TimeZoneOrBuilder>( + getTimeZone(), getParentForChildren(), isClean()); + timeZone_ = null; + } + return timeZoneBuilder_; + } + + private java.util.List + reachableTimes_ = java.util.Collections.emptyList(); + + private void ensureReachableTimesIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + reachableTimes_ = + new java.util.ArrayList( + reachableTimes_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder> + reachableTimesBuilder_; + + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getReachableTimesList() { + if (reachableTimesBuilder_ == null) { + return java.util.Collections.unmodifiableList(reachableTimes_); + } else { + return reachableTimesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getReachableTimesCount() { + if (reachableTimesBuilder_ == null) { + return reachableTimes_.size(); + } else { + return reachableTimesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod getReachableTimes(int index) { + if (reachableTimesBuilder_ == null) { + return reachableTimes_.get(index); + } else { + return reachableTimesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReachableTimes( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod value) { + if (reachableTimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReachableTimesIsMutable(); + reachableTimes_.set(index, value); + onChanged(); + } else { + reachableTimesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReachableTimes( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder builderForValue) { + if (reachableTimesBuilder_ == null) { + ensureReachableTimesIsMutable(); + reachableTimes_.set(index, builderForValue.build()); + onChanged(); + } else { + reachableTimesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addReachableTimes( + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod value) { + if (reachableTimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReachableTimesIsMutable(); + reachableTimes_.add(value); + onChanged(); + } else { + reachableTimesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addReachableTimes( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod value) { + if (reachableTimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReachableTimesIsMutable(); + reachableTimes_.add(index, value); + onChanged(); + } else { + reachableTimesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addReachableTimes( + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder builderForValue) { + if (reachableTimesBuilder_ == null) { + ensureReachableTimesIsMutable(); + reachableTimes_.add(builderForValue.build()); + onChanged(); + } else { + reachableTimesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addReachableTimes( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder builderForValue) { + if (reachableTimesBuilder_ == null) { + ensureReachableTimesIsMutable(); + reachableTimes_.add(index, builderForValue.build()); + onChanged(); + } else { + reachableTimesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllReachableTimes( + java.lang.Iterable + values) { + if (reachableTimesBuilder_ == null) { + ensureReachableTimesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reachableTimes_); + onChanged(); + } else { + reachableTimesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReachableTimes() { + if (reachableTimesBuilder_ == null) { + reachableTimes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + reachableTimesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeReachableTimes(int index) { + if (reachableTimesBuilder_ == null) { + ensureReachableTimesIsMutable(); + reachableTimes_.remove(index); + onChanged(); + } else { + reachableTimesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder + getReachableTimesBuilder(int index) { + return getReachableTimesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder + getReachableTimesOrBuilder(int index) { + if (reachableTimesBuilder_ == null) { + return reachableTimes_.get(index); + } else { + return reachableTimesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder> + getReachableTimesOrBuilderList() { + if (reachableTimesBuilder_ != null) { + return reachableTimesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(reachableTimes_); + } + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder + addReachableTimesBuilder() { + return getReachableTimesFieldBuilder() + .addBuilder( + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder + addReachableTimesBuilder(int index) { + return getReachableTimesFieldBuilder() + .addBuilder( + index, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The time periods when the contact is reachable.
+     * If this field is empty, the contact is reachable at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getReachableTimesBuilderList() { + return getReachableTimesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder> + getReachableTimesFieldBuilder() { + if (reachableTimesBuilder_ == null) { + reachableTimesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder>( + reachableTimes_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + reachableTimes_ = null; + } + return reachableTimesBuilder_; + } + + @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.gdchardwaremanagement.v1alpha.Contact) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.Contact) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.Contact DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.Contact(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Contact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Contact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ContactOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ContactOrBuilder.java new file mode 100644 index 000000000000..3dbe8227dcae --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ContactOrBuilder.java @@ -0,0 +1,229 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ContactOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.Contact) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Given name of the contact.
+   * 
+ * + * string given_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The givenName. + */ + java.lang.String getGivenName(); + /** + * + * + *
+   * Required. Given name of the contact.
+   * 
+ * + * string given_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for givenName. + */ + com.google.protobuf.ByteString getGivenNameBytes(); + + /** + * + * + *
+   * Optional. Family name of the contact.
+   * 
+ * + * string family_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The familyName. + */ + java.lang.String getFamilyName(); + /** + * + * + *
+   * Optional. Family name of the contact.
+   * 
+ * + * string family_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for familyName. + */ + com.google.protobuf.ByteString getFamilyNameBytes(); + + /** + * + * + *
+   * Required. Email of the contact.
+   * 
+ * + * string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The email. + */ + java.lang.String getEmail(); + /** + * + * + *
+   * Required. Email of the contact.
+   * 
+ * + * string email = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for email. + */ + com.google.protobuf.ByteString getEmailBytes(); + + /** + * + * + *
+   * Required. Phone number of the contact.
+   * 
+ * + * string phone = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The phone. + */ + java.lang.String getPhone(); + /** + * + * + *
+   * Required. Phone number of the contact.
+   * 
+ * + * string phone = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for phone. + */ + com.google.protobuf.ByteString getPhoneBytes(); + + /** + * + * + *
+   * Optional. Time zone of the contact.
+   * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the timeZone field is set. + */ + boolean hasTimeZone(); + /** + * + * + *
+   * Optional. Time zone of the contact.
+   * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + com.google.type.TimeZone getTimeZone(); + /** + * + * + *
+   * Optional. Time zone of the contact.
+   * 
+ * + * .google.type.TimeZone time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder(); + + /** + * + * + *
+   * Optional. The time periods when the contact is reachable.
+   * If this field is empty, the contact is reachable at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getReachableTimesList(); + /** + * + * + *
+   * Optional. The time periods when the contact is reachable.
+   * If this field is empty, the contact is reachable at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod getReachableTimes(int index); + /** + * + * + *
+   * Optional. The time periods when the contact is reachable.
+   * If this field is empty, the contact is reachable at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getReachableTimesCount(); + /** + * + * + *
+   * Optional. The time periods when the contact is reachable.
+   * If this field is empty, the contact is reachable at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getReachableTimesOrBuilderList(); + /** + * + * + *
+   * Optional. The time periods when the contact is reachable.
+   * If this field is empty, the contact is reachable at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod reachable_times = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder getReachableTimesOrBuilder( + int index); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateCommentRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateCommentRequest.java new file mode 100644 index 000000000000..29bc774d7149 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateCommentRequest.java @@ -0,0 +1,1383 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to create a comment.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest} + */ +public final class CreateCommentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest) + CreateCommentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCommentRequest.newBuilder() to construct. + private CreateCommentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCommentRequest() { + parent_ = ""; + commentId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCommentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateCommentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateCommentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The order to create the comment on.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The order to create the comment on.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 COMMENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object commentId_ = ""; + /** + * + * + *
+   * Optional. ID used to uniquely identify the Comment within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The comment.name field in the request will be ignored.
+   * 
+ * + * string comment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The commentId. + */ + @java.lang.Override + public java.lang.String getCommentId() { + java.lang.Object ref = commentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + commentId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. ID used to uniquely identify the Comment within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The comment.name field in the request will be ignored.
+   * 
+ * + * string comment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for commentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCommentIdBytes() { + java.lang.Object ref = commentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + commentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMENT_FIELD_NUMBER = 3; + private com.google.cloud.gdchardwaremanagement.v1alpha.Comment comment_; + /** + * + * + *
+   * Required. The comment to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the comment field is set. + */ + @java.lang.Override + public boolean hasComment() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The comment to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The comment. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment getComment() { + return comment_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Comment.getDefaultInstance() + : comment_; + } + /** + * + * + *
+   * Required. The comment to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder getCommentOrBuilder() { + return comment_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Comment.getDefaultInstance() + : comment_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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(commentId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, commentId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getComment()); + } + 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(commentId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, commentId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getComment()); + } + 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.gdchardwaremanagement.v1alpha.CreateCommentRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getCommentId().equals(other.getCommentId())) return false; + if (hasComment() != other.hasComment()) return false; + if (hasComment()) { + if (!getComment().equals(other.getComment())) 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) + COMMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getCommentId().hashCode(); + if (hasComment()) { + hash = (37 * hash) + COMMENT_FIELD_NUMBER; + hash = (53 * hash) + getComment().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.gdchardwaremanagement.v1alpha.CreateCommentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest 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.gdchardwaremanagement.v1alpha.CreateCommentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest + 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.gdchardwaremanagement.v1alpha.CreateCommentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest 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.gdchardwaremanagement.v1alpha.CreateCommentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create a comment.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateCommentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateCommentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCommentFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + commentId_ = ""; + comment_ = null; + if (commentBuilder_ != null) { + commentBuilder_.dispose(); + commentBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateCommentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.commentId_ = commentId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.comment_ = commentBuilder_ == null ? comment_ : commentBuilder_.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.gdchardwaremanagement.v1alpha.CreateCommentRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCommentId().isEmpty()) { + commentId_ = other.commentId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasComment()) { + mergeComment(other.getComment()); + } + 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: + { + commentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCommentFieldBuilder().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. The order to create the comment on.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The order to create the comment on.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The order to create the comment on.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to create the comment on.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to create the comment on.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * 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 commentId_ = ""; + /** + * + * + *
+     * Optional. ID used to uniquely identify the Comment within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The comment.name field in the request will be ignored.
+     * 
+ * + * string comment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The commentId. + */ + public java.lang.String getCommentId() { + java.lang.Object ref = commentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + commentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Comment within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The comment.name field in the request will be ignored.
+     * 
+ * + * string comment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for commentId. + */ + public com.google.protobuf.ByteString getCommentIdBytes() { + java.lang.Object ref = commentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + commentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Comment within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The comment.name field in the request will be ignored.
+     * 
+ * + * string comment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The commentId to set. + * @return This builder for chaining. + */ + public Builder setCommentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + commentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Comment within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The comment.name field in the request will be ignored.
+     * 
+ * + * string comment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCommentId() { + commentId_ = getDefaultInstance().getCommentId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Comment within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The comment.name field in the request will be ignored.
+     * 
+ * + * string comment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for commentId to set. + * @return This builder for chaining. + */ + public Builder setCommentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + commentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.Comment comment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Comment, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder> + commentBuilder_; + /** + * + * + *
+     * Required. The comment to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the comment field is set. + */ + public boolean hasComment() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The comment to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The comment. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment getComment() { + if (commentBuilder_ == null) { + return comment_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Comment.getDefaultInstance() + : comment_; + } else { + return commentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The comment to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setComment(com.google.cloud.gdchardwaremanagement.v1alpha.Comment value) { + if (commentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + comment_ = value; + } else { + commentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The comment to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setComment( + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder builderForValue) { + if (commentBuilder_ == null) { + comment_ = builderForValue.build(); + } else { + commentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The comment to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeComment(com.google.cloud.gdchardwaremanagement.v1alpha.Comment value) { + if (commentBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && comment_ != null + && comment_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Comment.getDefaultInstance()) { + getCommentBuilder().mergeFrom(value); + } else { + comment_ = value; + } + } else { + commentBuilder_.mergeFrom(value); + } + if (comment_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The comment to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearComment() { + bitField0_ = (bitField0_ & ~0x00000004); + comment_ = null; + if (commentBuilder_ != null) { + commentBuilder_.dispose(); + commentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The comment to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder getCommentBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCommentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The comment to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder getCommentOrBuilder() { + if (commentBuilder_ != null) { + return commentBuilder_.getMessageOrBuilder(); + } else { + return comment_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Comment.getDefaultInstance() + : comment_; + } + } + /** + * + * + *
+     * Required. The comment to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Comment, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder> + getCommentFieldBuilder() { + if (commentBuilder_ == null) { + commentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Comment, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder>( + getComment(), getParentForChildren(), isClean()); + comment_ = null; + } + return commentBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.CreateCommentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCommentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateCommentRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateCommentRequestOrBuilder.java new file mode 100644 index 000000000000..e653afc3e6df --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateCommentRequestOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface CreateCommentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The order to create the comment on.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The order to create the comment on.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. ID used to uniquely identify the Comment within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The comment.name field in the request will be ignored.
+   * 
+ * + * string comment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The commentId. + */ + java.lang.String getCommentId(); + /** + * + * + *
+   * Optional. ID used to uniquely identify the Comment within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The comment.name field in the request will be ignored.
+   * 
+ * + * string comment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for commentId. + */ + com.google.protobuf.ByteString getCommentIdBytes(); + + /** + * + * + *
+   * Required. The comment to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the comment field is set. + */ + boolean hasComment(); + /** + * + * + *
+   * Required. The comment to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The comment. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Comment getComment(); + /** + * + * + *
+   * Required. The comment to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Comment comment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder getCommentOrBuilder(); + + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareGroupRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareGroupRequest.java new file mode 100644 index 000000000000..24d61fb3cc97 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareGroupRequest.java @@ -0,0 +1,1397 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to create a hardware group.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest} + */ +public final class CreateHardwareGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest) + CreateHardwareGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateHardwareGroupRequest.newBuilder() to construct. + private CreateHardwareGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateHardwareGroupRequest() { + parent_ = ""; + hardwareGroupId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateHardwareGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest.Builder + .class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The order to create the hardware group in.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The order to create the hardware group in.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 HARDWARE_GROUP_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object hardwareGroupId_ = ""; + /** + * + * + *
+   * Optional. ID used to uniquely identify the HardwareGroup within its parent
+   * scope. This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The hardware_group.name field in the request will be ignored.
+   * 
+ * + * string hardware_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hardwareGroupId. + */ + @java.lang.Override + public java.lang.String getHardwareGroupId() { + java.lang.Object ref = hardwareGroupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hardwareGroupId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. ID used to uniquely identify the HardwareGroup within its parent
+   * scope. This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The hardware_group.name field in the request will be ignored.
+   * 
+ * + * string hardware_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for hardwareGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHardwareGroupIdBytes() { + java.lang.Object ref = hardwareGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hardwareGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HARDWARE_GROUP_FIELD_NUMBER = 3; + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardwareGroup_; + /** + * + * + *
+   * Required. The hardware group to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardwareGroup field is set. + */ + @java.lang.Override + public boolean hasHardwareGroup() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The hardware group to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardwareGroup. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getHardwareGroup() { + return hardwareGroup_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance() + : hardwareGroup_; + } + /** + * + * + *
+   * Required. The hardware group to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder + getHardwareGroupOrBuilder() { + return hardwareGroup_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance() + : hardwareGroup_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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(hardwareGroupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hardwareGroupId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getHardwareGroup()); + } + 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(hardwareGroupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, hardwareGroupId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getHardwareGroup()); + } + 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.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getHardwareGroupId().equals(other.getHardwareGroupId())) return false; + if (hasHardwareGroup() != other.hasHardwareGroup()) return false; + if (hasHardwareGroup()) { + if (!getHardwareGroup().equals(other.getHardwareGroup())) 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) + HARDWARE_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getHardwareGroupId().hashCode(); + if (hasHardwareGroup()) { + hash = (37 * hash) + HARDWARE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getHardwareGroup().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.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest 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.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest + 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.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest 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.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create a hardware group.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHardwareGroupFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + hardwareGroupId_ = ""; + hardwareGroup_ = null; + if (hardwareGroupBuilder_ != null) { + hardwareGroupBuilder_.dispose(); + hardwareGroupBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest + buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hardwareGroupId_ = hardwareGroupId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.hardwareGroup_ = + hardwareGroupBuilder_ == null ? hardwareGroup_ : hardwareGroupBuilder_.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.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getHardwareGroupId().isEmpty()) { + hardwareGroupId_ = other.hardwareGroupId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasHardwareGroup()) { + mergeHardwareGroup(other.getHardwareGroup()); + } + 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: + { + hardwareGroupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getHardwareGroupFieldBuilder().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. The order to create the hardware group in.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The order to create the hardware group in.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The order to create the hardware group in.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to create the hardware group in.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to create the hardware group in.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * 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 hardwareGroupId_ = ""; + /** + * + * + *
+     * Optional. ID used to uniquely identify the HardwareGroup within its parent
+     * scope. This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The hardware_group.name field in the request will be ignored.
+     * 
+ * + * string hardware_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hardwareGroupId. + */ + public java.lang.String getHardwareGroupId() { + java.lang.Object ref = hardwareGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hardwareGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the HardwareGroup within its parent
+     * scope. This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The hardware_group.name field in the request will be ignored.
+     * 
+ * + * string hardware_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for hardwareGroupId. + */ + public com.google.protobuf.ByteString getHardwareGroupIdBytes() { + java.lang.Object ref = hardwareGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hardwareGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the HardwareGroup within its parent
+     * scope. This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The hardware_group.name field in the request will be ignored.
+     * 
+ * + * string hardware_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The hardwareGroupId to set. + * @return This builder for chaining. + */ + public Builder setHardwareGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hardwareGroupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the HardwareGroup within its parent
+     * scope. This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The hardware_group.name field in the request will be ignored.
+     * 
+ * + * string hardware_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearHardwareGroupId() { + hardwareGroupId_ = getDefaultInstance().getHardwareGroupId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the HardwareGroup within its parent
+     * scope. This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The hardware_group.name field in the request will be ignored.
+     * 
+ * + * string hardware_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for hardwareGroupId to set. + * @return This builder for chaining. + */ + public Builder setHardwareGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hardwareGroupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardwareGroup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder> + hardwareGroupBuilder_; + /** + * + * + *
+     * Required. The hardware group to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardwareGroup field is set. + */ + public boolean hasHardwareGroup() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The hardware group to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardwareGroup. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getHardwareGroup() { + if (hardwareGroupBuilder_ == null) { + return hardwareGroup_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance() + : hardwareGroup_; + } else { + return hardwareGroupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The hardware group to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup value) { + if (hardwareGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hardwareGroup_ = value; + } else { + hardwareGroupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The hardware group to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder builderForValue) { + if (hardwareGroupBuilder_ == null) { + hardwareGroup_ = builderForValue.build(); + } else { + hardwareGroupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The hardware group to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup value) { + if (hardwareGroupBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && hardwareGroup_ != null + && hardwareGroup_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup + .getDefaultInstance()) { + getHardwareGroupBuilder().mergeFrom(value); + } else { + hardwareGroup_ = value; + } + } else { + hardwareGroupBuilder_.mergeFrom(value); + } + if (hardwareGroup_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The hardware group to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearHardwareGroup() { + bitField0_ = (bitField0_ & ~0x00000004); + hardwareGroup_ = null; + if (hardwareGroupBuilder_ != null) { + hardwareGroupBuilder_.dispose(); + hardwareGroupBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The hardware group to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder + getHardwareGroupBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getHardwareGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The hardware group to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder + getHardwareGroupOrBuilder() { + if (hardwareGroupBuilder_ != null) { + return hardwareGroupBuilder_.getMessageOrBuilder(); + } else { + return hardwareGroup_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance() + : hardwareGroup_; + } + } + /** + * + * + *
+     * Required. The hardware group to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder> + getHardwareGroupFieldBuilder() { + if (hardwareGroupBuilder_ == null) { + hardwareGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder>( + getHardwareGroup(), getParentForChildren(), isClean()); + hardwareGroup_ = null; + } + return hardwareGroupBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateHardwareGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareGroupRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareGroupRequestOrBuilder.java new file mode 100644 index 000000000000..45d053a73576 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareGroupRequestOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface CreateHardwareGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The order to create the hardware group in.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The order to create the hardware group in.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. ID used to uniquely identify the HardwareGroup within its parent
+   * scope. This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The hardware_group.name field in the request will be ignored.
+   * 
+ * + * string hardware_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hardwareGroupId. + */ + java.lang.String getHardwareGroupId(); + /** + * + * + *
+   * Optional. ID used to uniquely identify the HardwareGroup within its parent
+   * scope. This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The hardware_group.name field in the request will be ignored.
+   * 
+ * + * string hardware_group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for hardwareGroupId. + */ + com.google.protobuf.ByteString getHardwareGroupIdBytes(); + + /** + * + * + *
+   * Required. The hardware group to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardwareGroup field is set. + */ + boolean hasHardwareGroup(); + /** + * + * + *
+   * Required. The hardware group to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardwareGroup. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getHardwareGroup(); + /** + * + * + *
+   * Required. The hardware group to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder getHardwareGroupOrBuilder(); + + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareRequest.java new file mode 100644 index 000000000000..321704e11066 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareRequest.java @@ -0,0 +1,1194 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to create hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest} + */ +public final class CreateHardwareRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest) + CreateHardwareRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateHardwareRequest.newBuilder() to construct. + private CreateHardwareRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateHardwareRequest() { + parent_ = ""; + hardwareId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateHardwareRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The project and location to create hardware in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location to create hardware in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HARDWARE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object hardwareId_ = ""; + /** + * + * + *
+   * Optional. ID used to uniquely identify the Hardware within its parent
+   * scope. This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The hardware.name field in the request will be ignored.
+   * 
+ * + * string hardware_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hardwareId. + */ + @java.lang.Override + public java.lang.String getHardwareId() { + java.lang.Object ref = hardwareId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hardwareId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. ID used to uniquely identify the Hardware within its parent
+   * scope. This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The hardware.name field in the request will be ignored.
+   * 
+ * + * string hardware_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for hardwareId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHardwareIdBytes() { + java.lang.Object ref = hardwareId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hardwareId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HARDWARE_FIELD_NUMBER = 3; + private com.google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware_; + /** + * + * + *
+   * Required. The resource to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardware field is set. + */ + @java.lang.Override + public boolean hasHardware() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardware. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getHardware() { + return hardware_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance() + : hardware_; + } + /** + * + * + *
+   * Required. The resource to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder getHardwareOrBuilder() { + return hardware_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance() + : hardware_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(hardwareId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hardwareId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getHardware()); + } + 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(hardwareId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, hardwareId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getHardware()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getHardwareId().equals(other.getHardwareId())) return false; + if (hasHardware() != other.hasHardware()) return false; + if (hasHardware()) { + if (!getHardware().equals(other.getHardware())) return false; + } + if (!getUnknownFields().equals(other.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) + HARDWARE_ID_FIELD_NUMBER; + hash = (53 * hash) + getHardwareId().hashCode(); + if (hasHardware()) { + hash = (37 * hash) + HARDWARE_FIELD_NUMBER; + hash = (53 * hash) + getHardware().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest 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.gdchardwaremanagement.v1alpha.CreateHardwareRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest + 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.gdchardwaremanagement.v1alpha.CreateHardwareRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest 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.gdchardwaremanagement.v1alpha.CreateHardwareRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHardwareFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + hardwareId_ = ""; + hardware_ = null; + if (hardwareBuilder_ != null) { + hardwareBuilder_.dispose(); + hardwareBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hardwareId_ = hardwareId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.hardware_ = hardwareBuilder_ == null ? hardware_ : hardwareBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getHardwareId().isEmpty()) { + hardwareId_ = other.hardwareId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasHardware()) { + mergeHardware(other.getHardware()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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: + { + hardwareId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getHardwareFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location to create hardware in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location to create hardware in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location to create hardware in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to create hardware in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to create hardware in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object hardwareId_ = ""; + /** + * + * + *
+     * Optional. ID used to uniquely identify the Hardware within its parent
+     * scope. This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The hardware.name field in the request will be ignored.
+     * 
+ * + * string hardware_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hardwareId. + */ + public java.lang.String getHardwareId() { + java.lang.Object ref = hardwareId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hardwareId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Hardware within its parent
+     * scope. This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The hardware.name field in the request will be ignored.
+     * 
+ * + * string hardware_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for hardwareId. + */ + public com.google.protobuf.ByteString getHardwareIdBytes() { + java.lang.Object ref = hardwareId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hardwareId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Hardware within its parent
+     * scope. This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The hardware.name field in the request will be ignored.
+     * 
+ * + * string hardware_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The hardwareId to set. + * @return This builder for chaining. + */ + public Builder setHardwareId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hardwareId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Hardware within its parent
+     * scope. This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The hardware.name field in the request will be ignored.
+     * 
+ * + * string hardware_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearHardwareId() { + hardwareId_ = getDefaultInstance().getHardwareId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Hardware within its parent
+     * scope. This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The hardware.name field in the request will be ignored.
+     * 
+ * + * string hardware_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for hardwareId to set. + * @return This builder for chaining. + */ + public Builder setHardwareIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hardwareId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder> + hardwareBuilder_; + /** + * + * + *
+     * Required. The resource to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardware field is set. + */ + public boolean hasHardware() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardware. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getHardware() { + if (hardwareBuilder_ == null) { + return hardware_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance() + : hardware_; + } else { + return hardwareBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHardware(com.google.cloud.gdchardwaremanagement.v1alpha.Hardware value) { + if (hardwareBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hardware_ = value; + } else { + hardwareBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder builderForValue) { + if (hardwareBuilder_ == null) { + hardware_ = builderForValue.build(); + } else { + hardwareBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeHardware(com.google.cloud.gdchardwaremanagement.v1alpha.Hardware value) { + if (hardwareBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && hardware_ != null + && hardware_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance()) { + getHardwareBuilder().mergeFrom(value); + } else { + hardware_ = value; + } + } else { + hardwareBuilder_.mergeFrom(value); + } + if (hardware_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearHardware() { + bitField0_ = (bitField0_ & ~0x00000004); + hardware_ = null; + if (hardwareBuilder_ != null) { + hardwareBuilder_.dispose(); + hardwareBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder getHardwareBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getHardwareFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder getHardwareOrBuilder() { + if (hardwareBuilder_ != null) { + return hardwareBuilder_.getMessageOrBuilder(); + } else { + return hardware_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance() + : hardware_; + } + } + /** + * + * + *
+     * Required. The resource to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder> + getHardwareFieldBuilder() { + if (hardwareBuilder_ == null) { + hardwareBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder>( + getHardware(), getParentForChildren(), isClean()); + hardware_ = null; + } + return hardwareBuilder_; + } + + @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.gdchardwaremanagement.v1alpha.CreateHardwareRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateHardwareRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareRequestOrBuilder.java new file mode 100644 index 000000000000..c5f36ca3e169 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateHardwareRequestOrBuilder.java @@ -0,0 +1,137 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface CreateHardwareRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to create hardware in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location to create hardware in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. ID used to uniquely identify the Hardware within its parent
+   * scope. This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The hardware.name field in the request will be ignored.
+   * 
+ * + * string hardware_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hardwareId. + */ + java.lang.String getHardwareId(); + /** + * + * + *
+   * Optional. ID used to uniquely identify the Hardware within its parent
+   * scope. This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The hardware.name field in the request will be ignored.
+   * 
+ * + * string hardware_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for hardwareId. + */ + com.google.protobuf.ByteString getHardwareIdBytes(); + + /** + * + * + *
+   * Required. The resource to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardware field is set. + */ + boolean hasHardware(); + /** + * + * + *
+   * Required. The resource to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardware. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getHardware(); + /** + * + * + *
+   * Required. The resource to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder getHardwareOrBuilder(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateOrderRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateOrderRequest.java new file mode 100644 index 000000000000..a5a033444e7c --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateOrderRequest.java @@ -0,0 +1,1381 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to create an order.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest} + */ +public final class CreateOrderRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest) + CreateOrderRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateOrderRequest.newBuilder() to construct. + private CreateOrderRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateOrderRequest() { + parent_ = ""; + orderId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateOrderRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateOrderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateOrderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The project and location to create the order in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location to create the order in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderId_ = ""; + /** + * + * + *
+   * Optional. ID used to uniquely identify the Order within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The order.name field in the request will be ignored.
+   * 
+ * + * string order_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderId. + */ + @java.lang.Override + public java.lang.String getOrderId() { + java.lang.Object ref = orderId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. ID used to uniquely identify the Order within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The order.name field in the request will be ignored.
+   * 
+ * + * string order_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderIdBytes() { + java.lang.Object ref = orderId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_FIELD_NUMBER = 3; + private com.google.cloud.gdchardwaremanagement.v1alpha.Order order_; + /** + * + * + *
+   * Required. The order to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the order field is set. + */ + @java.lang.Override + public boolean hasOrder() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The order to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The order. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order getOrder() { + return order_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance() + : order_; + } + /** + * + * + *
+   * Required. The order to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder getOrderOrBuilder() { + return order_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance() + : order_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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(orderId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, orderId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getOrder()); + } + 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(orderId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, orderId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOrder()); + } + 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.gdchardwaremanagement.v1alpha.CreateOrderRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getOrderId().equals(other.getOrderId())) return false; + if (hasOrder() != other.hasOrder()) return false; + if (hasOrder()) { + if (!getOrder().equals(other.getOrder())) 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) + ORDER_ID_FIELD_NUMBER; + hash = (53 * hash) + getOrderId().hashCode(); + if (hasOrder()) { + hash = (37 * hash) + ORDER_FIELD_NUMBER; + hash = (53 * hash) + getOrder().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.gdchardwaremanagement.v1alpha.CreateOrderRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest 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.gdchardwaremanagement.v1alpha.CreateOrderRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest + 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.gdchardwaremanagement.v1alpha.CreateOrderRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest 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.gdchardwaremanagement.v1alpha.CreateOrderRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create an order.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateOrderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateOrderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOrderFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + orderId_ = ""; + order_ = null; + if (orderBuilder_ != null) { + orderBuilder_.dispose(); + orderBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateOrderRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.orderId_ = orderId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.order_ = orderBuilder_ == null ? order_ : orderBuilder_.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.gdchardwaremanagement.v1alpha.CreateOrderRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOrderId().isEmpty()) { + orderId_ = other.orderId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasOrder()) { + mergeOrder(other.getOrder()); + } + 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: + { + orderId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getOrderFieldBuilder().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. The project and location to create the order in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location to create the order in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location to create the order in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to create the order in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to create the order in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object orderId_ = ""; + /** + * + * + *
+     * Optional. ID used to uniquely identify the Order within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The order.name field in the request will be ignored.
+     * 
+ * + * string order_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderId. + */ + public java.lang.String getOrderId() { + java.lang.Object ref = orderId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Order within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The order.name field in the request will be ignored.
+     * 
+ * + * string order_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderId. + */ + public com.google.protobuf.ByteString getOrderIdBytes() { + java.lang.Object ref = orderId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Order within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The order.name field in the request will be ignored.
+     * 
+ * + * string order_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderId to set. + * @return This builder for chaining. + */ + public Builder setOrderId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Order within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The order.name field in the request will be ignored.
+     * 
+ * + * string order_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderId() { + orderId_ = getDefaultInstance().getOrderId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Order within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The order.name field in the request will be ignored.
+     * 
+ * + * string order_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderId to set. + * @return This builder for chaining. + */ + public Builder setOrderIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.Order order_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Order, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder> + orderBuilder_; + /** + * + * + *
+     * Required. The order to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the order field is set. + */ + public boolean hasOrder() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The order to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The order. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Order getOrder() { + if (orderBuilder_ == null) { + return order_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance() + : order_; + } else { + return orderBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The order to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOrder(com.google.cloud.gdchardwaremanagement.v1alpha.Order value) { + if (orderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + order_ = value; + } else { + orderBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder builderForValue) { + if (orderBuilder_ == null) { + order_ = builderForValue.build(); + } else { + orderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOrder(com.google.cloud.gdchardwaremanagement.v1alpha.Order value) { + if (orderBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && order_ != null + && order_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance()) { + getOrderBuilder().mergeFrom(value); + } else { + order_ = value; + } + } else { + orderBuilder_.mergeFrom(value); + } + if (order_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The order to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOrder() { + bitField0_ = (bitField0_ & ~0x00000004); + order_ = null; + if (orderBuilder_ != null) { + orderBuilder_.dispose(); + orderBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder getOrderBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOrderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The order to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder getOrderOrBuilder() { + if (orderBuilder_ != null) { + return orderBuilder_.getMessageOrBuilder(); + } else { + return order_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance() + : order_; + } + } + /** + * + * + *
+     * Required. The order to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Order, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder> + getOrderFieldBuilder() { + if (orderBuilder_ == null) { + orderBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Order, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder>( + getOrder(), getParentForChildren(), isClean()); + order_ = null; + } + return orderBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.CreateOrderRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateOrderRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateOrderRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateOrderRequestOrBuilder.java new file mode 100644 index 000000000000..b775c7f9ec15 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateOrderRequestOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface CreateOrderRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to create the order in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location to create the order in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. ID used to uniquely identify the Order within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The order.name field in the request will be ignored.
+   * 
+ * + * string order_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderId. + */ + java.lang.String getOrderId(); + /** + * + * + *
+   * Optional. ID used to uniquely identify the Order within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The order.name field in the request will be ignored.
+   * 
+ * + * string order_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderId. + */ + com.google.protobuf.ByteString getOrderIdBytes(); + + /** + * + * + *
+   * Required. The order to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the order field is set. + */ + boolean hasOrder(); + /** + * + * + *
+   * Required. The order to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The order. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Order getOrder(); + /** + * + * + *
+   * Required. The order to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder getOrderOrBuilder(); + + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateSiteRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateSiteRequest.java new file mode 100644 index 000000000000..b101a24a6b7a --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateSiteRequest.java @@ -0,0 +1,1378 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to create a site.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest} + */ +public final class CreateSiteRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest) + CreateSiteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSiteRequest.newBuilder() to construct. + private CreateSiteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSiteRequest() { + parent_ = ""; + siteId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSiteRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateSiteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateSiteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The project and location to create the site in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location to create the site in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object siteId_ = ""; + /** + * + * + *
+   * Optional. ID used to uniquely identify the Site within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The site.name field in the request will be ignored.
+   * 
+ * + * string site_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The siteId. + */ + @java.lang.Override + public java.lang.String getSiteId() { + java.lang.Object ref = siteId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. ID used to uniquely identify the Site within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The site.name field in the request will be ignored.
+   * 
+ * + * string site_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for siteId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSiteIdBytes() { + java.lang.Object ref = siteId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + siteId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FIELD_NUMBER = 3; + private com.google.cloud.gdchardwaremanagement.v1alpha.Site site_; + /** + * + * + *
+   * Required. The site to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the site field is set. + */ + @java.lang.Override + public boolean hasSite() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The site to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The site. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Site getSite() { + return site_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance() + : site_; + } + /** + * + * + *
+   * Required. The site to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder getSiteOrBuilder() { + return site_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance() + : site_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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(siteId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSite()); + } + 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(siteId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSite()); + } + 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.gdchardwaremanagement.v1alpha.CreateSiteRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSiteId().equals(other.getSiteId())) return false; + if (hasSite() != other.hasSite()) return false; + if (hasSite()) { + if (!getSite().equals(other.getSite())) 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) + SITE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSiteId().hashCode(); + if (hasSite()) { + hash = (37 * hash) + SITE_FIELD_NUMBER; + hash = (53 * hash) + getSite().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.gdchardwaremanagement.v1alpha.CreateSiteRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest 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.gdchardwaremanagement.v1alpha.CreateSiteRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest 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.gdchardwaremanagement.v1alpha.CreateSiteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest 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.gdchardwaremanagement.v1alpha.CreateSiteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create a site.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateSiteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateSiteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSiteFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + siteId_ = ""; + site_ = null; + if (siteBuilder_ != null) { + siteBuilder_.dispose(); + siteBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateSiteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.siteId_ = siteId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.site_ = siteBuilder_ == null ? site_ : siteBuilder_.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.gdchardwaremanagement.v1alpha.CreateSiteRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSiteId().isEmpty()) { + siteId_ = other.siteId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSite()) { + mergeSite(other.getSite()); + } + 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: + { + siteId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getSiteFieldBuilder().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. The project and location to create the site in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location to create the site in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location to create the site in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to create the site in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to create the site in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object siteId_ = ""; + /** + * + * + *
+     * Optional. ID used to uniquely identify the Site within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The site.name field in the request will be ignored.
+     * 
+ * + * string site_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The siteId. + */ + public java.lang.String getSiteId() { + java.lang.Object ref = siteId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Site within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The site.name field in the request will be ignored.
+     * 
+ * + * string site_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for siteId. + */ + public com.google.protobuf.ByteString getSiteIdBytes() { + java.lang.Object ref = siteId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + siteId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Site within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The site.name field in the request will be ignored.
+     * 
+ * + * string site_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The siteId to set. + * @return This builder for chaining. + */ + public Builder setSiteId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + siteId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Site within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The site.name field in the request will be ignored.
+     * 
+ * + * string site_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSiteId() { + siteId_ = getDefaultInstance().getSiteId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Site within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The site.name field in the request will be ignored.
+     * 
+ * + * string site_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for siteId to set. + * @return This builder for chaining. + */ + public Builder setSiteIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + siteId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.Site site_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Site, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder> + siteBuilder_; + /** + * + * + *
+     * Required. The site to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the site field is set. + */ + public boolean hasSite() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The site to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The site. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Site getSite() { + if (siteBuilder_ == null) { + return site_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance() + : site_; + } else { + return siteBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The site to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSite(com.google.cloud.gdchardwaremanagement.v1alpha.Site value) { + if (siteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + site_ = value; + } else { + siteBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The site to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSite( + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder builderForValue) { + if (siteBuilder_ == null) { + site_ = builderForValue.build(); + } else { + siteBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The site to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSite(com.google.cloud.gdchardwaremanagement.v1alpha.Site value) { + if (siteBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && site_ != null + && site_ != com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance()) { + getSiteBuilder().mergeFrom(value); + } else { + site_ = value; + } + } else { + siteBuilder_.mergeFrom(value); + } + if (site_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The site to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSite() { + bitField0_ = (bitField0_ & ~0x00000004); + site_ = null; + if (siteBuilder_ != null) { + siteBuilder_.dispose(); + siteBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The site to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder getSiteBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSiteFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The site to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder getSiteOrBuilder() { + if (siteBuilder_ != null) { + return siteBuilder_.getMessageOrBuilder(); + } else { + return site_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance() + : site_; + } + } + /** + * + * + *
+     * Required. The site to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Site, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder> + getSiteFieldBuilder() { + if (siteBuilder_ == null) { + siteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Site, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder>( + getSite(), getParentForChildren(), isClean()); + site_ = null; + } + return siteBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.CreateSiteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSiteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateSiteRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateSiteRequestOrBuilder.java new file mode 100644 index 000000000000..9e0eef2f8c24 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateSiteRequestOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface CreateSiteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to create the site in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location to create the site in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. ID used to uniquely identify the Site within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The site.name field in the request will be ignored.
+   * 
+ * + * string site_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The siteId. + */ + java.lang.String getSiteId(); + /** + * + * + *
+   * Optional. ID used to uniquely identify the Site within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The site.name field in the request will be ignored.
+   * 
+ * + * string site_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for siteId. + */ + com.google.protobuf.ByteString getSiteIdBytes(); + + /** + * + * + *
+   * Required. The site to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the site field is set. + */ + boolean hasSite(); + /** + * + * + *
+   * Required. The site to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The site. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Site getSite(); + /** + * + * + *
+   * Required. The site to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder getSiteOrBuilder(); + + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateZoneRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateZoneRequest.java new file mode 100644 index 000000000000..3c5ae8c4260c --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateZoneRequest.java @@ -0,0 +1,1392 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to create a zone.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest} + */ +public final class CreateZoneRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest) + CreateZoneRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateZoneRequest.newBuilder() to construct. + private CreateZoneRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateZoneRequest() { + parent_ = ""; + zoneId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateZoneRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The project and location to create the zone in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location to create the zone in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object zoneId_ = ""; + /** + * + * + *
+   * Optional. ID used to uniquely identify the Zone within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The zone.name field in the request will be ignored.
+   * 
+ * + * string zone_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The zoneId. + */ + @java.lang.Override + public java.lang.String getZoneId() { + java.lang.Object ref = zoneId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zoneId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. ID used to uniquely identify the Zone within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The zone.name field in the request will be ignored.
+   * 
+ * + * string zone_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for zoneId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneIdBytes() { + java.lang.Object ref = zoneId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_FIELD_NUMBER = 3; + private com.google.cloud.gdchardwaremanagement.v1alpha.Zone zone_; + /** + * + * + *
+   * Required. The zone to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the zone field is set. + */ + @java.lang.Override + public boolean hasZone() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The zone to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The zone. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone getZone() { + return zone_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance() + : zone_; + } + /** + * + * + *
+   * Required. The zone to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder getZoneOrBuilder() { + return zone_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance() + : zone_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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(zoneId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zoneId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getZone()); + } + 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(zoneId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, zoneId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getZone()); + } + 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.gdchardwaremanagement.v1alpha.CreateZoneRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getZoneId().equals(other.getZoneId())) return false; + if (hasZone() != other.hasZone()) return false; + if (hasZone()) { + if (!getZone().equals(other.getZone())) 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) + ZONE_ID_FIELD_NUMBER; + hash = (53 * hash) + getZoneId().hashCode(); + if (hasZone()) { + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().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.gdchardwaremanagement.v1alpha.CreateZoneRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest 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.gdchardwaremanagement.v1alpha.CreateZoneRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest 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.gdchardwaremanagement.v1alpha.CreateZoneRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest 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.gdchardwaremanagement.v1alpha.CreateZoneRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to create a zone.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getZoneFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + zoneId_ = ""; + zone_ = null; + if (zoneBuilder_ != null) { + zoneBuilder_.dispose(); + zoneBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateZoneRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.zoneId_ = zoneId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.zone_ = zoneBuilder_ == null ? zone_ : zoneBuilder_.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.gdchardwaremanagement.v1alpha.CreateZoneRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getZoneId().isEmpty()) { + zoneId_ = other.zoneId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasZone()) { + mergeZone(other.getZone()); + } + 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: + { + zoneId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getZoneFieldBuilder().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. The project and location to create the zone in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location to create the zone in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location to create the zone in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to create the zone in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to create the zone in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object zoneId_ = ""; + /** + * + * + *
+     * Optional. ID used to uniquely identify the Zone within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The zone.name field in the request will be ignored.
+     * 
+ * + * string zone_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The zoneId. + */ + public java.lang.String getZoneId() { + java.lang.Object ref = zoneId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zoneId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Zone within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The zone.name field in the request will be ignored.
+     * 
+ * + * string zone_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for zoneId. + */ + public com.google.protobuf.ByteString getZoneIdBytes() { + java.lang.Object ref = zoneId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Zone within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The zone.name field in the request will be ignored.
+     * 
+ * + * string zone_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The zoneId to set. + * @return This builder for chaining. + */ + public Builder setZoneId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zoneId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Zone within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The zone.name field in the request will be ignored.
+     * 
+ * + * string zone_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearZoneId() { + zoneId_ = getDefaultInstance().getZoneId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID used to uniquely identify the Zone within its parent scope.
+     * This field should contain at most 63 characters and must start with
+     * lowercase characters.
+     * Only lowercase characters, numbers and `-` are accepted.
+     * The `-` character cannot be the first or the last one.
+     * A system generated ID will be used if the field is not set.
+     *
+     * The zone.name field in the request will be ignored.
+     * 
+ * + * string zone_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for zoneId to set. + * @return This builder for chaining. + */ + public Builder setZoneIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zoneId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.Zone zone_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Zone, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder> + zoneBuilder_; + /** + * + * + *
+     * Required. The zone to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the zone field is set. + */ + public boolean hasZone() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The zone to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The zone. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone getZone() { + if (zoneBuilder_ == null) { + return zone_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance() + : zone_; + } else { + return zoneBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The zone to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setZone(com.google.cloud.gdchardwaremanagement.v1alpha.Zone value) { + if (zoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + } else { + zoneBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The zone to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setZone( + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder builderForValue) { + if (zoneBuilder_ == null) { + zone_ = builderForValue.build(); + } else { + zoneBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The zone to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeZone(com.google.cloud.gdchardwaremanagement.v1alpha.Zone value) { + if (zoneBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && zone_ != null + && zone_ != com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance()) { + getZoneBuilder().mergeFrom(value); + } else { + zone_ = value; + } + } else { + zoneBuilder_.mergeFrom(value); + } + if (zone_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The zone to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearZone() { + bitField0_ = (bitField0_ & ~0x00000004); + zone_ = null; + if (zoneBuilder_ != null) { + zoneBuilder_.dispose(); + zoneBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The zone to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder getZoneBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getZoneFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The zone to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder getZoneOrBuilder() { + if (zoneBuilder_ != null) { + return zoneBuilder_.getMessageOrBuilder(); + } else { + return zone_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance() + : zone_; + } + } + /** + * + * + *
+     * Required. The zone to create.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Zone, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder> + getZoneFieldBuilder() { + if (zoneBuilder_ == null) { + zoneBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Zone, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder>( + getZone(), getParentForChildren(), isClean()); + zone_ = null; + } + return zoneBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.CreateZoneRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateZoneRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateZoneRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateZoneRequestOrBuilder.java new file mode 100644 index 000000000000..2e936980b81e --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/CreateZoneRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface CreateZoneRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to create the zone in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location to create the zone in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. ID used to uniquely identify the Zone within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The zone.name field in the request will be ignored.
+   * 
+ * + * string zone_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The zoneId. + */ + java.lang.String getZoneId(); + /** + * + * + *
+   * Optional. ID used to uniquely identify the Zone within its parent scope.
+   * This field should contain at most 63 characters and must start with
+   * lowercase characters.
+   * Only lowercase characters, numbers and `-` are accepted.
+   * The `-` character cannot be the first or the last one.
+   * A system generated ID will be used if the field is not set.
+   *
+   * The zone.name field in the request will be ignored.
+   * 
+ * + * string zone_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for zoneId. + */ + com.google.protobuf.ByteString getZoneIdBytes(); + + /** + * + * + *
+   * Required. The zone to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the zone field is set. + */ + boolean hasZone(); + /** + * + * + *
+   * Required. The zone to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The zone. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Zone getZone(); + /** + * + * + *
+   * Required. The zone to create.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder getZoneOrBuilder(); + + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareGroupRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareGroupRequest.java new file mode 100644 index 000000000000..ea0a378432ee --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareGroupRequest.java @@ -0,0 +1,861 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to delete a hardware group.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest} + */ +public final class DeleteHardwareGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest) + DeleteHardwareGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteHardwareGroupRequest.newBuilder() to construct. + private DeleteHardwareGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteHardwareGroupRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteHardwareGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest) 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.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest 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.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest + 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.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest 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.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete a hardware group.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest + buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest 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.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest + .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. The name of the hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteHardwareGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareGroupRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareGroupRequestOrBuilder.java new file mode 100644 index 000000000000..766a9c3a3800 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareGroupRequestOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface DeleteHardwareGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareRequest.java new file mode 100644 index 000000000000..61a0e0b1c404 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareRequest.java @@ -0,0 +1,861 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to delete hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest} + */ +public final class DeleteHardwareRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest) + DeleteHardwareRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteHardwareRequest.newBuilder() to construct. + private DeleteHardwareRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteHardwareRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteHardwareRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.DeleteHardwareRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest) 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.gdchardwaremanagement.v1alpha.DeleteHardwareRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest 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.gdchardwaremanagement.v1alpha.DeleteHardwareRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest + 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.gdchardwaremanagement.v1alpha.DeleteHardwareRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest 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.gdchardwaremanagement.v1alpha.DeleteHardwareRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest 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.gdchardwaremanagement.v1alpha.DeleteHardwareRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest + .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. The name of the hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.DeleteHardwareRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteHardwareRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareRequestOrBuilder.java new file mode 100644 index 000000000000..de3c0758ce7c --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteHardwareRequestOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface DeleteHardwareRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteOrderRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteOrderRequest.java new file mode 100644 index 000000000000..dbf88686ff80 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteOrderRequest.java @@ -0,0 +1,950 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to delete an order.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest} + */ +public final class DeleteOrderRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest) + DeleteOrderRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteOrderRequest.newBuilder() to construct. + private DeleteOrderRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteOrderRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteOrderRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteOrderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteOrderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + /** + * + * + *
+   * Optional. An option to delete any nested resources in the Order, such as a
+   * HardwareGroup. If true, any nested resources for this Order will also be
+   * deleted. Otherwise, the request will only succeed if the Order has no
+   * nested resources.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest 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.gdchardwaremanagement.v1alpha.DeleteOrderRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest + 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.gdchardwaremanagement.v1alpha.DeleteOrderRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest 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.gdchardwaremanagement.v1alpha.DeleteOrderRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete an order.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteOrderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteOrderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest.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_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteOrderRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + private boolean force_; + /** + * + * + *
+     * Optional. An option to delete any nested resources in the Order, such as a
+     * HardwareGroup. If true, any nested resources for this Order will also be
+     * deleted. Otherwise, the request will only succeed if the Order has no
+     * nested resources.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Optional. An option to delete any nested resources in the Order, such as a
+     * HardwareGroup. If true, any nested resources for this Order will also be
+     * deleted. Otherwise, the request will only succeed if the Order has no
+     * nested resources.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An option to delete any nested resources in the Order, such as a
+     * HardwareGroup. If true, any nested resources for this Order will also be
+     * deleted. Otherwise, the request will only succeed if the Order has no
+     * nested resources.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteOrderRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteOrderRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteOrderRequestOrBuilder.java new file mode 100644 index 000000000000..05252b917ee8 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteOrderRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface DeleteOrderRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. An option to delete any nested resources in the Order, such as a
+   * HardwareGroup. If true, any nested resources for this Order will also be
+   * deleted. Otherwise, the request will only succeed if the Order has no
+   * nested resources.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteZoneRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteZoneRequest.java new file mode 100644 index 000000000000..f28eec7b5e74 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteZoneRequest.java @@ -0,0 +1,857 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to delete a zone.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest} + */ +public final class DeleteZoneRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest) + DeleteZoneRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteZoneRequest.newBuilder() to construct. + private DeleteZoneRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteZoneRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteZoneRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.DeleteZoneRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest) 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.gdchardwaremanagement.v1alpha.DeleteZoneRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest 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.gdchardwaremanagement.v1alpha.DeleteZoneRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest 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.gdchardwaremanagement.v1alpha.DeleteZoneRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest 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.gdchardwaremanagement.v1alpha.DeleteZoneRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete a zone.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteZoneRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest 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.gdchardwaremanagement.v1alpha.DeleteZoneRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest.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. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.DeleteZoneRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteZoneRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteZoneRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteZoneRequestOrBuilder.java new file mode 100644 index 000000000000..534142a4fd47 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DeleteZoneRequestOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface DeleteZoneRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Dimensions.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Dimensions.java new file mode 100644 index 000000000000..a96bfa0ebc02 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Dimensions.java @@ -0,0 +1,725 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Represents the dimensions of an object.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Dimensions} + */ +public final class Dimensions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.Dimensions) + DimensionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Dimensions.newBuilder() to construct. + private Dimensions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Dimensions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Dimensions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Dimensions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Dimensions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.Builder.class); + } + + public static final int WIDTH_INCHES_FIELD_NUMBER = 1; + private float widthInches_ = 0F; + /** + * + * + *
+   * Required. Width in inches.
+   * 
+ * + * float width_inches = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The widthInches. + */ + @java.lang.Override + public float getWidthInches() { + return widthInches_; + } + + public static final int HEIGHT_INCHES_FIELD_NUMBER = 2; + private float heightInches_ = 0F; + /** + * + * + *
+   * Required. Height in inches.
+   * 
+ * + * float height_inches = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The heightInches. + */ + @java.lang.Override + public float getHeightInches() { + return heightInches_; + } + + public static final int DEPTH_INCHES_FIELD_NUMBER = 3; + private float depthInches_ = 0F; + /** + * + * + *
+   * Required. Depth in inches.
+   * 
+ * + * float depth_inches = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The depthInches. + */ + @java.lang.Override + public float getDepthInches() { + return depthInches_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(widthInches_) != 0) { + output.writeFloat(1, widthInches_); + } + if (java.lang.Float.floatToRawIntBits(heightInches_) != 0) { + output.writeFloat(2, heightInches_); + } + if (java.lang.Float.floatToRawIntBits(depthInches_) != 0) { + output.writeFloat(3, depthInches_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(widthInches_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, widthInches_); + } + if (java.lang.Float.floatToRawIntBits(heightInches_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, heightInches_); + } + if (java.lang.Float.floatToRawIntBits(depthInches_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, depthInches_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions other = + (com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions) obj; + + if (java.lang.Float.floatToIntBits(getWidthInches()) + != java.lang.Float.floatToIntBits(other.getWidthInches())) return false; + if (java.lang.Float.floatToIntBits(getHeightInches()) + != java.lang.Float.floatToIntBits(other.getHeightInches())) return false; + if (java.lang.Float.floatToIntBits(getDepthInches()) + != java.lang.Float.floatToIntBits(other.getDepthInches())) return false; + if (!getUnknownFields().equals(other.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) + WIDTH_INCHES_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getWidthInches()); + hash = (37 * hash) + HEIGHT_INCHES_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getHeightInches()); + hash = (37 * hash) + DEPTH_INCHES_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getDepthInches()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions 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.gdchardwaremanagement.v1alpha.Dimensions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions 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.gdchardwaremanagement.v1alpha.Dimensions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions 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.gdchardwaremanagement.v1alpha.Dimensions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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 dimensions of an object.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Dimensions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.Dimensions) + com.google.cloud.gdchardwaremanagement.v1alpha.DimensionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Dimensions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Dimensions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + widthInches_ = 0F; + heightInches_ = 0F; + depthInches_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Dimensions_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions build() { + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions result = + new com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.widthInches_ = widthInches_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.heightInches_ = heightInches_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.depthInches_ = depthInches_; + } + } + + @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.gdchardwaremanagement.v1alpha.Dimensions) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.getDefaultInstance()) + return this; + if (other.getWidthInches() != 0F) { + setWidthInches(other.getWidthInches()); + } + if (other.getHeightInches() != 0F) { + setHeightInches(other.getHeightInches()); + } + if (other.getDepthInches() != 0F) { + setDepthInches(other.getDepthInches()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + widthInches_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: + { + heightInches_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: + { + depthInches_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float widthInches_; + /** + * + * + *
+     * Required. Width in inches.
+     * 
+ * + * float width_inches = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The widthInches. + */ + @java.lang.Override + public float getWidthInches() { + return widthInches_; + } + /** + * + * + *
+     * Required. Width in inches.
+     * 
+ * + * float width_inches = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The widthInches to set. + * @return This builder for chaining. + */ + public Builder setWidthInches(float value) { + + widthInches_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Width in inches.
+     * 
+ * + * float width_inches = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearWidthInches() { + bitField0_ = (bitField0_ & ~0x00000001); + widthInches_ = 0F; + onChanged(); + return this; + } + + private float heightInches_; + /** + * + * + *
+     * Required. Height in inches.
+     * 
+ * + * float height_inches = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The heightInches. + */ + @java.lang.Override + public float getHeightInches() { + return heightInches_; + } + /** + * + * + *
+     * Required. Height in inches.
+     * 
+ * + * float height_inches = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The heightInches to set. + * @return This builder for chaining. + */ + public Builder setHeightInches(float value) { + + heightInches_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Height in inches.
+     * 
+ * + * float height_inches = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearHeightInches() { + bitField0_ = (bitField0_ & ~0x00000002); + heightInches_ = 0F; + onChanged(); + return this; + } + + private float depthInches_; + /** + * + * + *
+     * Required. Depth in inches.
+     * 
+ * + * float depth_inches = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The depthInches. + */ + @java.lang.Override + public float getDepthInches() { + return depthInches_; + } + /** + * + * + *
+     * Required. Depth in inches.
+     * 
+ * + * float depth_inches = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The depthInches to set. + * @return This builder for chaining. + */ + public Builder setDepthInches(float value) { + + depthInches_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Depth in inches.
+     * 
+ * + * float depth_inches = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDepthInches() { + bitField0_ = (bitField0_ & ~0x00000004); + depthInches_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gdchardwaremanagement.v1alpha.Dimensions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.Dimensions) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Dimensions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DimensionsOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DimensionsOrBuilder.java new file mode 100644 index 000000000000..b707913ac98e --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/DimensionsOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface DimensionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.Dimensions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Width in inches.
+   * 
+ * + * float width_inches = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The widthInches. + */ + float getWidthInches(); + + /** + * + * + *
+   * Required. Height in inches.
+   * 
+ * + * float height_inches = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The heightInches. + */ + float getHeightInches(); + + /** + * + * + *
+   * Required. Depth in inches.
+   * 
+ * + * float depth_inches = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The depthInches. + */ + float getDepthInches(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetChangeLogEntryRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetChangeLogEntryRequest.java new file mode 100644 index 000000000000..9a593f7c895d --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetChangeLogEntryRequest.java @@ -0,0 +1,669 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to get a change log entry.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest} + */ +public final class GetChangeLogEntryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest) + GetChangeLogEntryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetChangeLogEntryRequest.newBuilder() to construct. + private GetChangeLogEntryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetChangeLogEntryRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetChangeLogEntryRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetChangeLogEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetChangeLogEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the change log entry.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the change log entry.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+   * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest) 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.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest 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.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest + 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.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest 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.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a change log entry.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetChangeLogEntryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetChangeLogEntryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetChangeLogEntryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest 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.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the change log entry.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the change log entry.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the change log entry.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the change log entry.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the change log entry.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetChangeLogEntryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetChangeLogEntryRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetChangeLogEntryRequestOrBuilder.java new file mode 100644 index 000000000000..6cac014866ec --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetChangeLogEntryRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface GetChangeLogEntryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the change log entry.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the change log entry.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetCommentRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetCommentRequest.java new file mode 100644 index 000000000000..ddf65c7f22f4 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetCommentRequest.java @@ -0,0 +1,661 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to get a comment.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest} + */ +public final class GetCommentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest) + GetCommentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCommentRequest.newBuilder() to construct. + private GetCommentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCommentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCommentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetCommentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetCommentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the comment.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the comment.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+   * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetCommentRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest) 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.gdchardwaremanagement.v1alpha.GetCommentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest 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.gdchardwaremanagement.v1alpha.GetCommentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest 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.gdchardwaremanagement.v1alpha.GetCommentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest 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.gdchardwaremanagement.v1alpha.GetCommentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a comment.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetCommentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetCommentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetCommentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest 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.gdchardwaremanagement.v1alpha.GetCommentRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the comment.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the comment.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the comment.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the comment.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the comment.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetCommentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCommentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetCommentRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetCommentRequestOrBuilder.java new file mode 100644 index 000000000000..0359d7ed9f89 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetCommentRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface GetCommentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the comment.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the comment.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareGroupRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareGroupRequest.java new file mode 100644 index 000000000000..67a548c39be5 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareGroupRequest.java @@ -0,0 +1,666 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to get a hardware group.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest} + */ +public final class GetHardwareGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest) + GetHardwareGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetHardwareGroupRequest.newBuilder() to construct. + private GetHardwareGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetHardwareGroupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetHardwareGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest) 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.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest 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.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest + 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.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest 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.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a hardware group.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest 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.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetHardwareGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareGroupRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareGroupRequestOrBuilder.java new file mode 100644 index 000000000000..ec668bd09464 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareGroupRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface GetHardwareGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareRequest.java new file mode 100644 index 000000000000..45470adee7ad --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareRequest.java @@ -0,0 +1,656 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to get hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest} + */ +public final class GetHardwareRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest) + GetHardwareRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetHardwareRequest.newBuilder() to construct. + private GetHardwareRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetHardwareRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetHardwareRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetHardwareRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest) 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.gdchardwaremanagement.v1alpha.GetHardwareRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest 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.gdchardwaremanagement.v1alpha.GetHardwareRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest + 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.gdchardwaremanagement.v1alpha.GetHardwareRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest 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.gdchardwaremanagement.v1alpha.GetHardwareRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest 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.gdchardwaremanagement.v1alpha.GetHardwareRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetHardwareRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetHardwareRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareRequestOrBuilder.java new file mode 100644 index 000000000000..4726e7d16606 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetHardwareRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface GetHardwareRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetOrderRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetOrderRequest.java new file mode 100644 index 000000000000..9f098ebf0fdd --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetOrderRequest.java @@ -0,0 +1,646 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to get an order.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest} + */ +public final class GetOrderRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest) + GetOrderRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetOrderRequest.newBuilder() to construct. + private GetOrderRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetOrderRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetOrderRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetOrderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetOrderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest.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.gdchardwaremanagement.v1alpha.GetOrderRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest) 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.gdchardwaremanagement.v1alpha.GetOrderRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest 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.gdchardwaremanagement.v1alpha.GetOrderRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest 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.gdchardwaremanagement.v1alpha.GetOrderRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest 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.gdchardwaremanagement.v1alpha.GetOrderRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get an order.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetOrderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetOrderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetOrderRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest 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.gdchardwaremanagement.v1alpha.GetOrderRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest.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.gdchardwaremanagement.v1alpha.GetOrderRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOrderRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetOrderRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetOrderRequestOrBuilder.java new file mode 100644 index 000000000000..a7d8d430c2d4 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetOrderRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface GetOrderRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest) + 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSiteRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSiteRequest.java new file mode 100644 index 000000000000..663b35c17952 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSiteRequest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to get a site.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest} + */ +public final class GetSiteRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest) + GetSiteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSiteRequest.newBuilder() to construct. + private GetSiteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSiteRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSiteRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSiteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSiteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the site.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the site.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetSiteRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest) 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.gdchardwaremanagement.v1alpha.GetSiteRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest 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.gdchardwaremanagement.v1alpha.GetSiteRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest 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.gdchardwaremanagement.v1alpha.GetSiteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest 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.gdchardwaremanagement.v1alpha.GetSiteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a site.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSiteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSiteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSiteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest 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.gdchardwaremanagement.v1alpha.GetSiteRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the site.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the site.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the site.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the site.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the site.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetSiteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSiteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSiteRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSiteRequestOrBuilder.java new file mode 100644 index 000000000000..8356e86a9acd --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSiteRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface GetSiteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the site.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the site.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSkuRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSkuRequest.java new file mode 100644 index 000000000000..6f1272c6721f --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSkuRequest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to get an SKU.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest} + */ +public final class GetSkuRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest) + GetSkuRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSkuRequest.newBuilder() to construct. + private GetSkuRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSkuRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSkuRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSkuRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSkuRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the SKU.
+   * Format: `projects/{project}/locations/{location}/skus/{sku}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the SKU.
+   * Format: `projects/{project}/locations/{location}/skus/{sku}`
+   * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetSkuRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest) 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.gdchardwaremanagement.v1alpha.GetSkuRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest 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.gdchardwaremanagement.v1alpha.GetSkuRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest 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.gdchardwaremanagement.v1alpha.GetSkuRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest 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.gdchardwaremanagement.v1alpha.GetSkuRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get an SKU.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSkuRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSkuRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSkuRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest 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.gdchardwaremanagement.v1alpha.GetSkuRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the SKU.
+     * Format: `projects/{project}/locations/{location}/skus/{sku}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the SKU.
+     * Format: `projects/{project}/locations/{location}/skus/{sku}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the SKU.
+     * Format: `projects/{project}/locations/{location}/skus/{sku}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the SKU.
+     * Format: `projects/{project}/locations/{location}/skus/{sku}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the SKU.
+     * Format: `projects/{project}/locations/{location}/skus/{sku}`
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetSkuRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSkuRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSkuRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSkuRequestOrBuilder.java new file mode 100644 index 000000000000..7062bc83118a --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetSkuRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface GetSkuRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the SKU.
+   * Format: `projects/{project}/locations/{location}/skus/{sku}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the SKU.
+   * Format: `projects/{project}/locations/{location}/skus/{sku}`
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetZoneRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetZoneRequest.java new file mode 100644 index 000000000000..68431f991042 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetZoneRequest.java @@ -0,0 +1,651 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to get a zone.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest} + */ +public final class GetZoneRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest) + GetZoneRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetZoneRequest.newBuilder() to construct. + private GetZoneRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetZoneRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetZoneRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetZoneRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest) 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.gdchardwaremanagement.v1alpha.GetZoneRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest 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.gdchardwaremanagement.v1alpha.GetZoneRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest 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.gdchardwaremanagement.v1alpha.GetZoneRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest 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.gdchardwaremanagement.v1alpha.GetZoneRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a zone.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetZoneRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest 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.gdchardwaremanagement.v1alpha.GetZoneRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.GetZoneRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetZoneRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetZoneRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetZoneRequestOrBuilder.java new file mode 100644 index 000000000000..af7703991835 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/GetZoneRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface GetZoneRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Hardware.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Hardware.java new file mode 100644 index 000000000000..f4e2eb0fc01a --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Hardware.java @@ -0,0 +1,5004 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * An instance of hardware installed at a site.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Hardware} + */ +public final class Hardware extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.Hardware) + HardwareOrBuilder { + private static final long serialVersionUID = 0L; + // Use Hardware.newBuilder() to construct. + private Hardware(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Hardware() { + name_ = ""; + displayName_ = ""; + order_ = ""; + hardwareGroup_ = ""; + site_ = ""; + state_ = 0; + ciqUri_ = ""; + zone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Hardware(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + 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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder.class); + } + + /** + * + * + *
+   * Valid states for hardware.
+   * 
+ * + * Protobuf enum {@code google.cloud.gdchardwaremanagement.v1alpha.Hardware.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State of the Hardware is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * More information is required from the customer to make progress.
+     * 
+ * + * ADDITIONAL_INFO_NEEDED = 1; + */ + ADDITIONAL_INFO_NEEDED(1), + /** + * + * + *
+     * Google has initiated building hardware for this Hardware.
+     * 
+ * + * BUILDING = 2; + */ + BUILDING(2), + /** + * + * + *
+     * The hardware has been built and is being shipped.
+     * 
+ * + * SHIPPING = 3; + */ + SHIPPING(3), + /** + * + * + *
+     * The hardware is being installed.
+     * 
+ * + * INSTALLING = 4; + */ + INSTALLING(4), + /** + * + * + *
+     * The hardware has been installed.
+     * 
+ * + * INSTALLED = 5; + */ + INSTALLED(5), + /** + * + * + *
+     * An error occurred and customer intervention is required.
+     * 
+ * + * FAILED = 6; + */ + FAILED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State of the Hardware is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * More information is required from the customer to make progress.
+     * 
+ * + * ADDITIONAL_INFO_NEEDED = 1; + */ + public static final int ADDITIONAL_INFO_NEEDED_VALUE = 1; + /** + * + * + *
+     * Google has initiated building hardware for this Hardware.
+     * 
+ * + * BUILDING = 2; + */ + public static final int BUILDING_VALUE = 2; + /** + * + * + *
+     * The hardware has been built and is being shipped.
+     * 
+ * + * SHIPPING = 3; + */ + public static final int SHIPPING_VALUE = 3; + /** + * + * + *
+     * The hardware is being installed.
+     * 
+ * + * INSTALLING = 4; + */ + public static final int INSTALLING_VALUE = 4; + /** + * + * + *
+     * The hardware has been installed.
+     * 
+ * + * INSTALLED = 5; + */ + public static final int INSTALLED_VALUE = 5; + /** + * + * + *
+     * An error occurred and customer intervention is required.
+     * 
+ * + * FAILED = 6; + */ + public static final int FAILED_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 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 ADDITIONAL_INFO_NEEDED; + case 2: + return BUILDING; + case 3: + return SHIPPING; + case 4: + return INSTALLING; + case 5: + return INSTALLED; + case 6: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public 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.gdchardwaremanagement.v1alpha.Hardware.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.gdchardwaremanagement.v1alpha.Hardware.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Name of this hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * 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 this hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. Display name for this hardware.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Display name for this hardware.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when this hardware was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Time when this hardware was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this hardware was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when this hardware was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Time when this hardware was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when this hardware was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_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 associated with this hardware as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 5 [(.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 associated with this hardware as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels associated with this hardware as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 5 [(.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 associated with this hardware as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 5 [(.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 ORDER_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object order_ = ""; + /** + * + * + *
+   * Required. Name of the order that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string order = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The order. + */ + @java.lang.Override + public java.lang.String getOrder() { + java.lang.Object ref = order_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + order_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the order that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string order = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for order. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderBytes() { + java.lang.Object ref = order_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + order_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HARDWARE_GROUP_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object hardwareGroup_ = ""; + /** + * + * + *
+   * Output only. Name for the hardware group that this hardware belongs to.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * string hardware_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The hardwareGroup. + */ + @java.lang.Override + public java.lang.String getHardwareGroup() { + java.lang.Object ref = hardwareGroup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hardwareGroup_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name for the hardware group that this hardware belongs to.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * string hardware_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for hardwareGroup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHardwareGroupBytes() { + java.lang.Object ref = hardwareGroup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hardwareGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object site_ = ""; + /** + * + * + *
+   * Required. Name for the site that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The site. + */ + @java.lang.Override + public java.lang.String getSite() { + java.lang.Object ref = site_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + site_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name for the site that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for site. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSiteBytes() { + java.lang.Object ref = site_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + site_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 9; + private int state_ = 0; + /** + * + * + *
+   * Output only. Current state for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware.State state = 9 [(.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. Current state for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State getState() { + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State result = + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State.forNumber(state_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State.UNRECOGNIZED + : result; + } + + public static final int CIQ_URI_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object ciqUri_ = ""; + /** + * + * + *
+   * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+   * Hardware.
+   * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ciqUri. + */ + @java.lang.Override + public java.lang.String getCiqUri() { + java.lang.Object ref = ciqUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ciqUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+   * Hardware.
+   * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ciqUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCiqUriBytes() { + java.lang.Object ref = ciqUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ciqUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_FIELD_NUMBER = 11; + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config_; + /** + * + * + *
+   * Required. Configuration for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Required. Configuration for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig getConfig() { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.getDefaultInstance() + : config_; + } + /** + * + * + *
+   * Required. Configuration for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder + getConfigOrBuilder() { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.getDefaultInstance() + : config_; + } + + public static final int ESTIMATED_INSTALLATION_DATE_FIELD_NUMBER = 12; + private com.google.type.Date estimatedInstallationDate_; + /** + * + * + *
+   * Output only. Estimated installation date for this hardware.
+   * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the estimatedInstallationDate field is set. + */ + @java.lang.Override + public boolean hasEstimatedInstallationDate() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Estimated installation date for this hardware.
+   * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The estimatedInstallationDate. + */ + @java.lang.Override + public com.google.type.Date getEstimatedInstallationDate() { + return estimatedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : estimatedInstallationDate_; + } + /** + * + * + *
+   * Output only. Estimated installation date for this hardware.
+   * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.type.DateOrBuilder getEstimatedInstallationDateOrBuilder() { + return estimatedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : estimatedInstallationDate_; + } + + public static final int PHYSICAL_INFO_FIELD_NUMBER = 13; + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physicalInfo_; + /** + * + * + *
+   * Optional. Physical properties of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the physicalInfo field is set. + */ + @java.lang.Override + public boolean hasPhysicalInfo() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Optional. Physical properties of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The physicalInfo. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo getPhysicalInfo() { + return physicalInfo_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.getDefaultInstance() + : physicalInfo_; + } + /** + * + * + *
+   * Optional. Physical properties of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfoOrBuilder + getPhysicalInfoOrBuilder() { + return physicalInfo_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.getDefaultInstance() + : physicalInfo_; + } + + public static final int INSTALLATION_INFO_FIELD_NUMBER = 14; + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installationInfo_; + /** + * + * + *
+   * Optional. Information for installation of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the installationInfo field is set. + */ + @java.lang.Override + public boolean hasInstallationInfo() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Optional. Information for installation of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The installationInfo. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + getInstallationInfo() { + return installationInfo_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + .getDefaultInstance() + : installationInfo_; + } + /** + * + * + *
+   * Optional. Information for installation of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfoOrBuilder + getInstallationInfoOrBuilder() { + return installationInfo_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + .getDefaultInstance() + : installationInfo_; + } + + public static final int ZONE_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + /** + * + * + *
+   * Required. Name for the zone that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string zone = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name for the zone that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string zone = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_INSTALLATION_DATE_FIELD_NUMBER = 16; + private com.google.type.Date requestedInstallationDate_; + /** + * + * + *
+   * Optional. Requested installation date for this hardware. This is
+   * auto-populated when the order is accepted, if the hardware's HardwareGroup
+   * specifies this. It can also be filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the requestedInstallationDate field is set. + */ + @java.lang.Override + public boolean hasRequestedInstallationDate() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Optional. Requested installation date for this hardware. This is
+   * auto-populated when the order is accepted, if the hardware's HardwareGroup
+   * specifies this. It can also be filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requestedInstallationDate. + */ + @java.lang.Override + public com.google.type.Date getRequestedInstallationDate() { + return requestedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : requestedInstallationDate_; + } + /** + * + * + *
+   * Optional. Requested installation date for this hardware. This is
+   * auto-populated when the order is accepted, if the hardware's HardwareGroup
+   * specifies this. It can also be filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.type.DateOrBuilder getRequestedInstallationDateOrBuilder() { + return requestedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : requestedInstallationDate_; + } + + public static final int ACTUAL_INSTALLATION_DATE_FIELD_NUMBER = 17; + private com.google.type.Date actualInstallationDate_; + /** + * + * + *
+   * Output only. Actual installation date for this hardware. Filled in by
+   * Google.
+   * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the actualInstallationDate field is set. + */ + @java.lang.Override + public boolean hasActualInstallationDate() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * Output only. Actual installation date for this hardware. Filled in by
+   * Google.
+   * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The actualInstallationDate. + */ + @java.lang.Override + public com.google.type.Date getActualInstallationDate() { + return actualInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : actualInstallationDate_; + } + /** + * + * + *
+   * Output only. Actual installation date for this hardware. Filled in by
+   * Google.
+   * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.type.DateOrBuilder getActualInstallationDateOrBuilder() { + return actualInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : actualInstallationDate_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(order_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, order_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hardwareGroup_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, hardwareGroup_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(site_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, site_); + } + if (state_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ciqUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ciqUri_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(11, getConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(12, getEstimatedInstallationDate()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(13, getPhysicalInfo()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(14, getInstallationInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, zone_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(16, getRequestedInstallationDate()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(17, getActualInstallationDate()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, 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(5, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(order_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, order_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hardwareGroup_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, hardwareGroup_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(site_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, site_); + } + if (state_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ciqUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, ciqUri_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, getEstimatedInstallationDate()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getPhysicalInfo()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getInstallationInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, zone_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 16, getRequestedInstallationDate()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(17, getActualInstallationDate()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.Hardware)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware other = + (com.google.cloud.gdchardwaremanagement.v1alpha.Hardware) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getOrder().equals(other.getOrder())) return false; + if (!getHardwareGroup().equals(other.getHardwareGroup())) return false; + if (!getSite().equals(other.getSite())) return false; + if (state_ != other.state_) return false; + if (!getCiqUri().equals(other.getCiqUri())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (hasEstimatedInstallationDate() != other.hasEstimatedInstallationDate()) return false; + if (hasEstimatedInstallationDate()) { + if (!getEstimatedInstallationDate().equals(other.getEstimatedInstallationDate())) + return false; + } + if (hasPhysicalInfo() != other.hasPhysicalInfo()) return false; + if (hasPhysicalInfo()) { + if (!getPhysicalInfo().equals(other.getPhysicalInfo())) return false; + } + if (hasInstallationInfo() != other.hasInstallationInfo()) return false; + if (hasInstallationInfo()) { + if (!getInstallationInfo().equals(other.getInstallationInfo())) return false; + } + if (!getZone().equals(other.getZone())) return false; + if (hasRequestedInstallationDate() != other.hasRequestedInstallationDate()) return false; + if (hasRequestedInstallationDate()) { + if (!getRequestedInstallationDate().equals(other.getRequestedInstallationDate())) + return false; + } + if (hasActualInstallationDate() != other.hasActualInstallationDate()) return false; + if (hasActualInstallationDate()) { + if (!getActualInstallationDate().equals(other.getActualInstallationDate())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + ORDER_FIELD_NUMBER; + hash = (53 * hash) + getOrder().hashCode(); + hash = (37 * hash) + HARDWARE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getHardwareGroup().hashCode(); + hash = (37 * hash) + SITE_FIELD_NUMBER; + hash = (53 * hash) + getSite().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + CIQ_URI_FIELD_NUMBER; + hash = (53 * hash) + getCiqUri().hashCode(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + if (hasEstimatedInstallationDate()) { + hash = (37 * hash) + ESTIMATED_INSTALLATION_DATE_FIELD_NUMBER; + hash = (53 * hash) + getEstimatedInstallationDate().hashCode(); + } + if (hasPhysicalInfo()) { + hash = (37 * hash) + PHYSICAL_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPhysicalInfo().hashCode(); + } + if (hasInstallationInfo()) { + hash = (37 * hash) + INSTALLATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getInstallationInfo().hashCode(); + } + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + if (hasRequestedInstallationDate()) { + hash = (37 * hash) + REQUESTED_INSTALLATION_DATE_FIELD_NUMBER; + hash = (53 * hash) + getRequestedInstallationDate().hashCode(); + } + if (hasActualInstallationDate()) { + hash = (37 * hash) + ACTUAL_INSTALLATION_DATE_FIELD_NUMBER; + hash = (53 * hash) + getActualInstallationDate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware 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.gdchardwaremanagement.v1alpha.Hardware parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware 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.gdchardwaremanagement.v1alpha.Hardware parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware 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.gdchardwaremanagement.v1alpha.Hardware prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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; + } + /** + * + * + *
+   * An instance of hardware installed at a site.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Hardware} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.Hardware) + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + 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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.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(); + getConfigFieldBuilder(); + getEstimatedInstallationDateFieldBuilder(); + getPhysicalInfoFieldBuilder(); + getInstallationInfoFieldBuilder(); + getRequestedInstallationDateFieldBuilder(); + getActualInstallationDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + order_ = ""; + hardwareGroup_ = ""; + site_ = ""; + state_ = 0; + ciqUri_ = ""; + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + estimatedInstallationDate_ = null; + if (estimatedInstallationDateBuilder_ != null) { + estimatedInstallationDateBuilder_.dispose(); + estimatedInstallationDateBuilder_ = null; + } + physicalInfo_ = null; + if (physicalInfoBuilder_ != null) { + physicalInfoBuilder_.dispose(); + physicalInfoBuilder_ = null; + } + installationInfo_ = null; + if (installationInfoBuilder_ != null) { + installationInfoBuilder_.dispose(); + installationInfoBuilder_ = null; + } + zone_ = ""; + requestedInstallationDate_ = null; + if (requestedInstallationDateBuilder_ != null) { + requestedInstallationDateBuilder_.dispose(); + requestedInstallationDateBuilder_ = null; + } + actualInstallationDate_ = null; + if (actualInstallationDateBuilder_ != null) { + actualInstallationDateBuilder_.dispose(); + actualInstallationDateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware build() { + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware result = + new com.google.cloud.gdchardwaremanagement.v1alpha.Hardware(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.Hardware result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.order_ = order_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.hardwareGroup_ = hardwareGroup_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.site_ = site_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.ciqUri_ = ciqUri_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.config_ = configBuilder_ == null ? config_ : configBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.estimatedInstallationDate_ = + estimatedInstallationDateBuilder_ == null + ? estimatedInstallationDate_ + : estimatedInstallationDateBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.physicalInfo_ = + physicalInfoBuilder_ == null ? physicalInfo_ : physicalInfoBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.installationInfo_ = + installationInfoBuilder_ == null ? installationInfo_ : installationInfoBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.zone_ = zone_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.requestedInstallationDate_ = + requestedInstallationDateBuilder_ == null + ? requestedInstallationDate_ + : requestedInstallationDateBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.actualInstallationDate_ = + actualInstallationDateBuilder_ == null + ? actualInstallationDate_ + : actualInstallationDateBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + 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.gdchardwaremanagement.v1alpha.Hardware) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.Hardware) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.Hardware other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.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.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (!other.getOrder().isEmpty()) { + order_ = other.order_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getHardwareGroup().isEmpty()) { + hardwareGroup_ = other.hardwareGroup_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getSite().isEmpty()) { + site_ = other.site_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getCiqUri().isEmpty()) { + ciqUri_ = other.ciqUri_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (other.hasEstimatedInstallationDate()) { + mergeEstimatedInstallationDate(other.getEstimatedInstallationDate()); + } + if (other.hasPhysicalInfo()) { + mergePhysicalInfo(other.getPhysicalInfo()); + } + if (other.hasInstallationInfo()) { + mergeInstallationInfo(other.getInstallationInfo()); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (other.hasRequestedInstallationDate()) { + mergeRequestedInstallationDate(other.getRequestedInstallationDate()); + } + if (other.hasActualInstallationDate()) { + mergeActualInstallationDate(other.getActualInstallationDate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + order_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + hardwareGroup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + site_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: + { + ciqUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + input.readMessage(getConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + input.readMessage( + getEstimatedInstallationDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: + { + input.readMessage(getPhysicalInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: + { + input.readMessage( + getInstallationInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: + { + input.readMessage( + getRequestedInstallationDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: + { + input.readMessage( + getActualInstallationDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 138 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + 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 this hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * 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 this hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * 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 this hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * 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 this hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * 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 this hardware.
+     * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. Display name for this hardware.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Display name for this hardware.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Display name for this hardware.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Display name for this hardware.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Display name for this hardware.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private 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. Time when this hardware was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Time when this hardware was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this hardware was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this hardware was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this hardware was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_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> + 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. Time when this hardware was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Time when this hardware was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this hardware was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this hardware was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when this hardware was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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_ |= 0x00000010; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels associated with this hardware as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 5 [(.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 associated with this hardware as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this hardware as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 5 [(.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 associated with this hardware as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 5 [(.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_ & ~0x00000010); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels associated with this hardware as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 5 [(.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_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this hardware as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 5 [(.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_ |= 0x00000010; + return this; + } + /** + * + * + *
+     * Optional. Labels associated with this hardware as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object order_ = ""; + /** + * + * + *
+     * Required. Name of the order that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string order = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The order. + */ + public java.lang.String getOrder() { + java.lang.Object ref = order_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + order_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the order that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string order = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for order. + */ + public com.google.protobuf.ByteString getOrderBytes() { + java.lang.Object ref = order_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + order_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the order that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string order = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The order to set. + * @return This builder for chaining. + */ + public Builder setOrder(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + order_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the order that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string order = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearOrder() { + order_ = getDefaultInstance().getOrder(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the order that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string order = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for order to set. + * @return This builder for chaining. + */ + public Builder setOrderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + order_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object hardwareGroup_ = ""; + /** + * + * + *
+     * Output only. Name for the hardware group that this hardware belongs to.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string hardware_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The hardwareGroup. + */ + public java.lang.String getHardwareGroup() { + java.lang.Object ref = hardwareGroup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hardwareGroup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name for the hardware group that this hardware belongs to.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string hardware_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for hardwareGroup. + */ + public com.google.protobuf.ByteString getHardwareGroupBytes() { + java.lang.Object ref = hardwareGroup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hardwareGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name for the hardware group that this hardware belongs to.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string hardware_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The hardwareGroup to set. + * @return This builder for chaining. + */ + public Builder setHardwareGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hardwareGroup_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name for the hardware group that this hardware belongs to.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string hardware_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearHardwareGroup() { + hardwareGroup_ = getDefaultInstance().getHardwareGroup(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name for the hardware group that this hardware belongs to.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * + * string hardware_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for hardwareGroup to set. + * @return This builder for chaining. + */ + public Builder setHardwareGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hardwareGroup_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object site_ = ""; + /** + * + * + *
+     * Required. Name for the site that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The site. + */ + public java.lang.String getSite() { + java.lang.Object ref = site_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + site_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name for the site that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for site. + */ + public com.google.protobuf.ByteString getSiteBytes() { + java.lang.Object ref = site_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + site_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name for the site that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The site to set. + * @return This builder for chaining. + */ + public Builder setSite(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + site_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name for the site that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSite() { + site_ = getDefaultInstance().getSite(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name for the site that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for site to set. + * @return This builder for chaining. + */ + public Builder setSiteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + site_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current state for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware.State state = 9 [(.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. Current state for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware.State state = 9 [(.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_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State getState() { + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State result = + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State.forNumber(state_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Current state for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000100); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object ciqUri_ = ""; + /** + * + * + *
+     * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+     * Hardware.
+     * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ciqUri. + */ + public java.lang.String getCiqUri() { + java.lang.Object ref = ciqUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ciqUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+     * Hardware.
+     * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ciqUri. + */ + public com.google.protobuf.ByteString getCiqUriBytes() { + java.lang.Object ref = ciqUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ciqUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+     * Hardware.
+     * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The ciqUri to set. + * @return This builder for chaining. + */ + public Builder setCiqUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ciqUri_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+     * Hardware.
+     * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCiqUri() { + ciqUri_ = getDefaultInstance().getCiqUri(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+     * Hardware.
+     * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for ciqUri to set. + * @return This builder for chaining. + */ + public Builder setCiqUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ciqUri_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * Required. Configuration for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Required. Configuration for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Configuration for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfig(com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + } else { + configBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Configuration for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfig( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Configuration for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConfig( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig value) { + if (configBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && config_ != null + && config_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig + .getDefaultInstance()) { + getConfigBuilder().mergeFrom(value); + } else { + config_ = value; + } + } else { + configBuilder_.mergeFrom(value); + } + if (config_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Configuration for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConfig() { + bitField0_ = (bitField0_ & ~0x00000400); + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Configuration for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder + getConfigBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Configuration for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder + getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.getDefaultInstance() + : config_; + } + } + /** + * + * + *
+     * Required. Configuration for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private com.google.type.Date estimatedInstallationDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + estimatedInstallationDateBuilder_; + /** + * + * + *
+     * Output only. Estimated installation date for this hardware.
+     * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the estimatedInstallationDate field is set. + */ + public boolean hasEstimatedInstallationDate() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Output only. Estimated installation date for this hardware.
+     * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The estimatedInstallationDate. + */ + public com.google.type.Date getEstimatedInstallationDate() { + if (estimatedInstallationDateBuilder_ == null) { + return estimatedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : estimatedInstallationDate_; + } else { + return estimatedInstallationDateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Estimated installation date for this hardware.
+     * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEstimatedInstallationDate(com.google.type.Date value) { + if (estimatedInstallationDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + estimatedInstallationDate_ = value; + } else { + estimatedInstallationDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Estimated installation date for this hardware.
+     * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEstimatedInstallationDate(com.google.type.Date.Builder builderForValue) { + if (estimatedInstallationDateBuilder_ == null) { + estimatedInstallationDate_ = builderForValue.build(); + } else { + estimatedInstallationDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Estimated installation date for this hardware.
+     * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEstimatedInstallationDate(com.google.type.Date value) { + if (estimatedInstallationDateBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && estimatedInstallationDate_ != null + && estimatedInstallationDate_ != com.google.type.Date.getDefaultInstance()) { + getEstimatedInstallationDateBuilder().mergeFrom(value); + } else { + estimatedInstallationDate_ = value; + } + } else { + estimatedInstallationDateBuilder_.mergeFrom(value); + } + if (estimatedInstallationDate_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Estimated installation date for this hardware.
+     * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEstimatedInstallationDate() { + bitField0_ = (bitField0_ & ~0x00000800); + estimatedInstallationDate_ = null; + if (estimatedInstallationDateBuilder_ != null) { + estimatedInstallationDateBuilder_.dispose(); + estimatedInstallationDateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Estimated installation date for this hardware.
+     * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.Date.Builder getEstimatedInstallationDateBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getEstimatedInstallationDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Estimated installation date for this hardware.
+     * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.DateOrBuilder getEstimatedInstallationDateOrBuilder() { + if (estimatedInstallationDateBuilder_ != null) { + return estimatedInstallationDateBuilder_.getMessageOrBuilder(); + } else { + return estimatedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : estimatedInstallationDate_; + } + } + /** + * + * + *
+     * Output only. Estimated installation date for this hardware.
+     * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getEstimatedInstallationDateFieldBuilder() { + if (estimatedInstallationDateBuilder_ == null) { + estimatedInstallationDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getEstimatedInstallationDate(), getParentForChildren(), isClean()); + estimatedInstallationDate_ = null; + } + return estimatedInstallationDateBuilder_; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physicalInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfoOrBuilder> + physicalInfoBuilder_; + /** + * + * + *
+     * Optional. Physical properties of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the physicalInfo field is set. + */ + public boolean hasPhysicalInfo() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Optional. Physical properties of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The physicalInfo. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo getPhysicalInfo() { + if (physicalInfoBuilder_ == null) { + return physicalInfo_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + .getDefaultInstance() + : physicalInfo_; + } else { + return physicalInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Physical properties of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPhysicalInfo( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo value) { + if (physicalInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + physicalInfo_ = value; + } else { + physicalInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Physical properties of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPhysicalInfo( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Builder + builderForValue) { + if (physicalInfoBuilder_ == null) { + physicalInfo_ = builderForValue.build(); + } else { + physicalInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Physical properties of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePhysicalInfo( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo value) { + if (physicalInfoBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && physicalInfo_ != null + && physicalInfo_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + .getDefaultInstance()) { + getPhysicalInfoBuilder().mergeFrom(value); + } else { + physicalInfo_ = value; + } + } else { + physicalInfoBuilder_.mergeFrom(value); + } + if (physicalInfo_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Physical properties of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPhysicalInfo() { + bitField0_ = (bitField0_ & ~0x00001000); + physicalInfo_ = null; + if (physicalInfoBuilder_ != null) { + physicalInfoBuilder_.dispose(); + physicalInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Physical properties of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Builder + getPhysicalInfoBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getPhysicalInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Physical properties of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfoOrBuilder + getPhysicalInfoOrBuilder() { + if (physicalInfoBuilder_ != null) { + return physicalInfoBuilder_.getMessageOrBuilder(); + } else { + return physicalInfo_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + .getDefaultInstance() + : physicalInfo_; + } + } + /** + * + * + *
+     * Optional. Physical properties of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfoOrBuilder> + getPhysicalInfoFieldBuilder() { + if (physicalInfoBuilder_ == null) { + physicalInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfoOrBuilder>( + getPhysicalInfo(), getParentForChildren(), isClean()); + physicalInfo_ = null; + } + return physicalInfoBuilder_; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + installationInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfoOrBuilder> + installationInfoBuilder_; + /** + * + * + *
+     * Optional. Information for installation of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the installationInfo field is set. + */ + public boolean hasInstallationInfo() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Optional. Information for installation of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The installationInfo. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + getInstallationInfo() { + if (installationInfoBuilder_ == null) { + return installationInfo_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + .getDefaultInstance() + : installationInfo_; + } else { + return installationInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Information for installation of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstallationInfo( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo value) { + if (installationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + installationInfo_ = value; + } else { + installationInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information for installation of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstallationInfo( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.Builder + builderForValue) { + if (installationInfoBuilder_ == null) { + installationInfo_ = builderForValue.build(); + } else { + installationInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information for installation of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInstallationInfo( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo value) { + if (installationInfoBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && installationInfo_ != null + && installationInfo_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + .getDefaultInstance()) { + getInstallationInfoBuilder().mergeFrom(value); + } else { + installationInfo_ = value; + } + } else { + installationInfoBuilder_.mergeFrom(value); + } + if (installationInfo_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Information for installation of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInstallationInfo() { + bitField0_ = (bitField0_ & ~0x00002000); + installationInfo_ = null; + if (installationInfoBuilder_ != null) { + installationInfoBuilder_.dispose(); + installationInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Information for installation of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.Builder + getInstallationInfoBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getInstallationInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Information for installation of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfoOrBuilder + getInstallationInfoOrBuilder() { + if (installationInfoBuilder_ != null) { + return installationInfoBuilder_.getMessageOrBuilder(); + } else { + return installationInfo_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + .getDefaultInstance() + : installationInfo_; + } + } + /** + * + * + *
+     * Optional. Information for installation of this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfoOrBuilder> + getInstallationInfoFieldBuilder() { + if (installationInfoBuilder_ == null) { + installationInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfoOrBuilder>( + getInstallationInfo(), getParentForChildren(), isClean()); + installationInfo_ = null; + } + return installationInfoBuilder_; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * Required. Name for the zone that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string zone = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name for the zone that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string zone = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name for the zone that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string zone = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name for the zone that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string zone = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name for the zone that this hardware belongs to.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string zone = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private com.google.type.Date requestedInstallationDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + requestedInstallationDateBuilder_; + /** + * + * + *
+     * Optional. Requested installation date for this hardware. This is
+     * auto-populated when the order is accepted, if the hardware's HardwareGroup
+     * specifies this. It can also be filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the requestedInstallationDate field is set. + */ + public boolean hasRequestedInstallationDate() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * Optional. Requested installation date for this hardware. This is
+     * auto-populated when the order is accepted, if the hardware's HardwareGroup
+     * specifies this. It can also be filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requestedInstallationDate. + */ + public com.google.type.Date getRequestedInstallationDate() { + if (requestedInstallationDateBuilder_ == null) { + return requestedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : requestedInstallationDate_; + } else { + return requestedInstallationDateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Requested installation date for this hardware. This is
+     * auto-populated when the order is accepted, if the hardware's HardwareGroup
+     * specifies this. It can also be filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRequestedInstallationDate(com.google.type.Date value) { + if (requestedInstallationDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestedInstallationDate_ = value; + } else { + requestedInstallationDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested installation date for this hardware. This is
+     * auto-populated when the order is accepted, if the hardware's HardwareGroup
+     * specifies this. It can also be filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRequestedInstallationDate(com.google.type.Date.Builder builderForValue) { + if (requestedInstallationDateBuilder_ == null) { + requestedInstallationDate_ = builderForValue.build(); + } else { + requestedInstallationDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested installation date for this hardware. This is
+     * auto-populated when the order is accepted, if the hardware's HardwareGroup
+     * specifies this. It can also be filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRequestedInstallationDate(com.google.type.Date value) { + if (requestedInstallationDateBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && requestedInstallationDate_ != null + && requestedInstallationDate_ != com.google.type.Date.getDefaultInstance()) { + getRequestedInstallationDateBuilder().mergeFrom(value); + } else { + requestedInstallationDate_ = value; + } + } else { + requestedInstallationDateBuilder_.mergeFrom(value); + } + if (requestedInstallationDate_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Requested installation date for this hardware. This is
+     * auto-populated when the order is accepted, if the hardware's HardwareGroup
+     * specifies this. It can also be filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRequestedInstallationDate() { + bitField0_ = (bitField0_ & ~0x00008000); + requestedInstallationDate_ = null; + if (requestedInstallationDateBuilder_ != null) { + requestedInstallationDateBuilder_.dispose(); + requestedInstallationDateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested installation date for this hardware. This is
+     * auto-populated when the order is accepted, if the hardware's HardwareGroup
+     * specifies this. It can also be filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.Date.Builder getRequestedInstallationDateBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getRequestedInstallationDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Requested installation date for this hardware. This is
+     * auto-populated when the order is accepted, if the hardware's HardwareGroup
+     * specifies this. It can also be filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.DateOrBuilder getRequestedInstallationDateOrBuilder() { + if (requestedInstallationDateBuilder_ != null) { + return requestedInstallationDateBuilder_.getMessageOrBuilder(); + } else { + return requestedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : requestedInstallationDate_; + } + } + /** + * + * + *
+     * Optional. Requested installation date for this hardware. This is
+     * auto-populated when the order is accepted, if the hardware's HardwareGroup
+     * specifies this. It can also be filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getRequestedInstallationDateFieldBuilder() { + if (requestedInstallationDateBuilder_ == null) { + requestedInstallationDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getRequestedInstallationDate(), getParentForChildren(), isClean()); + requestedInstallationDate_ = null; + } + return requestedInstallationDateBuilder_; + } + + private com.google.type.Date actualInstallationDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + actualInstallationDateBuilder_; + /** + * + * + *
+     * Output only. Actual installation date for this hardware. Filled in by
+     * Google.
+     * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the actualInstallationDate field is set. + */ + public boolean hasActualInstallationDate() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Output only. Actual installation date for this hardware. Filled in by
+     * Google.
+     * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The actualInstallationDate. + */ + public com.google.type.Date getActualInstallationDate() { + if (actualInstallationDateBuilder_ == null) { + return actualInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : actualInstallationDate_; + } else { + return actualInstallationDateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Actual installation date for this hardware. Filled in by
+     * Google.
+     * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setActualInstallationDate(com.google.type.Date value) { + if (actualInstallationDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + actualInstallationDate_ = value; + } else { + actualInstallationDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Actual installation date for this hardware. Filled in by
+     * Google.
+     * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setActualInstallationDate(com.google.type.Date.Builder builderForValue) { + if (actualInstallationDateBuilder_ == null) { + actualInstallationDate_ = builderForValue.build(); + } else { + actualInstallationDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Actual installation date for this hardware. Filled in by
+     * Google.
+     * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeActualInstallationDate(com.google.type.Date value) { + if (actualInstallationDateBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && actualInstallationDate_ != null + && actualInstallationDate_ != com.google.type.Date.getDefaultInstance()) { + getActualInstallationDateBuilder().mergeFrom(value); + } else { + actualInstallationDate_ = value; + } + } else { + actualInstallationDateBuilder_.mergeFrom(value); + } + if (actualInstallationDate_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Actual installation date for this hardware. Filled in by
+     * Google.
+     * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearActualInstallationDate() { + bitField0_ = (bitField0_ & ~0x00010000); + actualInstallationDate_ = null; + if (actualInstallationDateBuilder_ != null) { + actualInstallationDateBuilder_.dispose(); + actualInstallationDateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Actual installation date for this hardware. Filled in by
+     * Google.
+     * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.Date.Builder getActualInstallationDateBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getActualInstallationDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Actual installation date for this hardware. Filled in by
+     * Google.
+     * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.DateOrBuilder getActualInstallationDateOrBuilder() { + if (actualInstallationDateBuilder_ != null) { + return actualInstallationDateBuilder_.getMessageOrBuilder(); + } else { + return actualInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : actualInstallationDate_; + } + } + /** + * + * + *
+     * Output only. Actual installation date for this hardware. Filled in by
+     * Google.
+     * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getActualInstallationDateFieldBuilder() { + if (actualInstallationDateBuilder_ == null) { + actualInstallationDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getActualInstallationDate(), getParentForChildren(), isClean()); + actualInstallationDate_ = null; + } + return actualInstallationDateBuilder_; + } + + @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.gdchardwaremanagement.v1alpha.Hardware) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.Hardware) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.Hardware DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.Hardware(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Hardware parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareConfig.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareConfig.java new file mode 100644 index 000000000000..16ecf9d58d13 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareConfig.java @@ -0,0 +1,933 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Configuration for GDC hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig} + */ +public final class HardwareConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig) + HardwareConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use HardwareConfig.newBuilder() to construct. + private HardwareConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HardwareConfig() { + sku_ = ""; + powerSupply_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HardwareConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.class, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder.class); + } + + public static final int SKU_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object sku_ = ""; + /** + * + * + *
+   * Required. Reference to the SKU for this hardware. This can point to a
+   * specific SKU revision in the form of `resource_name@revision_id` as defined
+   * in [AIP-162](https://google.aip.dev/162). If no revision_id is specified,
+   * it refers to the latest revision.
+   * 
+ * + * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Reference to the SKU for this hardware. This can point to a
+   * specific SKU revision in the form of `resource_name@revision_id` as defined
+   * in [AIP-162](https://google.aip.dev/162). If no revision_id is specified,
+   * it refers to the latest revision.
+   * 
+ * + * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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 POWER_SUPPLY_FIELD_NUMBER = 2; + private int powerSupply_ = 0; + /** + * + * + *
+   * Required. Power supply type for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for powerSupply. + */ + @java.lang.Override + public int getPowerSupplyValue() { + return powerSupply_; + } + /** + * + * + *
+   * Required. Power supply type for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The powerSupply. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply getPowerSupply() { + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply result = + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.forNumber(powerSupply_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.UNRECOGNIZED + : result; + } + + public static final int SUBSCRIPTION_DURATION_MONTHS_FIELD_NUMBER = 3; + private int subscriptionDurationMonths_ = 0; + /** + * + * + *
+   * Optional. Subscription duration for the hardware in months.
+   * 
+ * + * int32 subscription_duration_months = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subscriptionDurationMonths. + */ + @java.lang.Override + public int getSubscriptionDurationMonths() { + return subscriptionDurationMonths_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(sku_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sku_); + } + if (powerSupply_ + != com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.POWER_SUPPLY_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, powerSupply_); + } + if (subscriptionDurationMonths_ != 0) { + output.writeInt32(3, subscriptionDurationMonths_); + } + 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(sku_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sku_); + } + if (powerSupply_ + != com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.POWER_SUPPLY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, powerSupply_); + } + if (subscriptionDurationMonths_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(3, subscriptionDurationMonths_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig other = + (com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig) obj; + + if (!getSku().equals(other.getSku())) return false; + if (powerSupply_ != other.powerSupply_) return false; + if (getSubscriptionDurationMonths() != other.getSubscriptionDurationMonths()) return false; + if (!getUnknownFields().equals(other.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) + SKU_FIELD_NUMBER; + hash = (53 * hash) + getSku().hashCode(); + hash = (37 * hash) + POWER_SUPPLY_FIELD_NUMBER; + hash = (53 * hash) + powerSupply_; + hash = (37 * hash) + SUBSCRIPTION_DURATION_MONTHS_FIELD_NUMBER; + hash = (53 * hash) + getSubscriptionDurationMonths(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig 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.gdchardwaremanagement.v1alpha.HardwareConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig 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.gdchardwaremanagement.v1alpha.HardwareConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig 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.gdchardwaremanagement.v1alpha.HardwareConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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 GDC hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig) + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.class, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sku_ = ""; + powerSupply_ = 0; + subscriptionDurationMonths_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig build() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig result = + new com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sku_ = sku_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.powerSupply_ = powerSupply_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subscriptionDurationMonths_ = subscriptionDurationMonths_; + } + } + + @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.gdchardwaremanagement.v1alpha.HardwareConfig) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.getDefaultInstance()) + return this; + if (!other.getSku().isEmpty()) { + sku_ = other.sku_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.powerSupply_ != 0) { + setPowerSupplyValue(other.getPowerSupplyValue()); + } + if (other.getSubscriptionDurationMonths() != 0) { + setSubscriptionDurationMonths(other.getSubscriptionDurationMonths()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + sku_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + powerSupply_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + subscriptionDurationMonths_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object sku_ = ""; + /** + * + * + *
+     * Required. Reference to the SKU for this hardware. This can point to a
+     * specific SKU revision in the form of `resource_name@revision_id` as defined
+     * in [AIP-162](https://google.aip.dev/162). If no revision_id is specified,
+     * it refers to the latest revision.
+     * 
+ * + * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Reference to the SKU for this hardware. This can point to a
+     * specific SKU revision in the form of `resource_name@revision_id` as defined
+     * in [AIP-162](https://google.aip.dev/162). If no revision_id is specified,
+     * it refers to the latest revision.
+     * 
+ * + * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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. Reference to the SKU for this hardware. This can point to a
+     * specific SKU revision in the form of `resource_name@revision_id` as defined
+     * in [AIP-162](https://google.aip.dev/162). If no revision_id is specified,
+     * it refers to the latest revision.
+     * 
+ * + * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Reference to the SKU for this hardware. This can point to a
+     * specific SKU revision in the form of `resource_name@revision_id` as defined
+     * in [AIP-162](https://google.aip.dev/162). If no revision_id is specified,
+     * it refers to the latest revision.
+     * 
+ * + * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSku() { + sku_ = getDefaultInstance().getSku(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Reference to the SKU for this hardware. This can point to a
+     * specific SKU revision in the form of `resource_name@revision_id` as defined
+     * in [AIP-162](https://google.aip.dev/162). If no revision_id is specified,
+     * it refers to the latest revision.
+     * 
+ * + * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + private int powerSupply_ = 0; + /** + * + * + *
+     * Required. Power supply type for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for powerSupply. + */ + @java.lang.Override + public int getPowerSupplyValue() { + return powerSupply_; + } + /** + * + * + *
+     * Required. Power supply type for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for powerSupply to set. + * @return This builder for chaining. + */ + public Builder setPowerSupplyValue(int value) { + powerSupply_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Power supply type for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The powerSupply. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply getPowerSupply() { + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply result = + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.forNumber(powerSupply_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Power supply type for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The powerSupply to set. + * @return This builder for chaining. + */ + public Builder setPowerSupply( + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + powerSupply_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Power supply type for this hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPowerSupply() { + bitField0_ = (bitField0_ & ~0x00000002); + powerSupply_ = 0; + onChanged(); + return this; + } + + private int subscriptionDurationMonths_; + /** + * + * + *
+     * Optional. Subscription duration for the hardware in months.
+     * 
+ * + * int32 subscription_duration_months = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subscriptionDurationMonths. + */ + @java.lang.Override + public int getSubscriptionDurationMonths() { + return subscriptionDurationMonths_; + } + /** + * + * + *
+     * Optional. Subscription duration for the hardware in months.
+     * 
+ * + * int32 subscription_duration_months = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The subscriptionDurationMonths to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionDurationMonths(int value) { + + subscriptionDurationMonths_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Subscription duration for the hardware in months.
+     * 
+ * + * int32 subscription_duration_months = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSubscriptionDurationMonths() { + bitField0_ = (bitField0_ & ~0x00000004); + subscriptionDurationMonths_ = 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.gdchardwaremanagement.v1alpha.HardwareConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HardwareConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareConfigOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareConfigOrBuilder.java new file mode 100644 index 000000000000..049965cbe1a7 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareConfigOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface HardwareConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Reference to the SKU for this hardware. This can point to a
+   * specific SKU revision in the form of `resource_name@revision_id` as defined
+   * in [AIP-162](https://google.aip.dev/162). If no revision_id is specified,
+   * it refers to the latest revision.
+   * 
+ * + * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The sku. + */ + java.lang.String getSku(); + /** + * + * + *
+   * Required. Reference to the SKU for this hardware. This can point to a
+   * specific SKU revision in the form of `resource_name@revision_id` as defined
+   * in [AIP-162](https://google.aip.dev/162). If no revision_id is specified,
+   * it refers to the latest revision.
+   * 
+ * + * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sku. + */ + com.google.protobuf.ByteString getSkuBytes(); + + /** + * + * + *
+   * Required. Power supply type for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for powerSupply. + */ + int getPowerSupplyValue(); + /** + * + * + *
+   * Required. Power supply type for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The powerSupply. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply getPowerSupply(); + + /** + * + * + *
+   * Optional. Subscription duration for the hardware in months.
+   * 
+ * + * int32 subscription_duration_months = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subscriptionDurationMonths. + */ + int getSubscriptionDurationMonths(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareGroup.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareGroup.java new file mode 100644 index 000000000000..995f83f08970 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareGroup.java @@ -0,0 +1,3134 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A group of hardware that is part of the same order, has the same SKU, and is
+ * delivered to the same site.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup} + */ +public final class HardwareGroup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup) + HardwareGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use HardwareGroup.newBuilder() to construct. + private HardwareGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HardwareGroup() { + name_ = ""; + site_ = ""; + state_ = 0; + zone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HardwareGroup(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.class, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder.class); + } + + /** + * + * + *
+   * Valid states of a HardwareGroup.
+   * 
+ * + * Protobuf enum {@code google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State of the HardwareGroup is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * More information is required from the customer to make progress.
+     * 
+ * + * ADDITIONAL_INFO_NEEDED = 1; + */ + ADDITIONAL_INFO_NEEDED(1), + /** + * + * + *
+     * Google has initiated building hardware for this HardwareGroup.
+     * 
+ * + * BUILDING = 2; + */ + BUILDING(2), + /** + * + * + *
+     * The hardware has been built and is being shipped.
+     * 
+ * + * SHIPPING = 3; + */ + SHIPPING(3), + /** + * + * + *
+     * The hardware is being installed.
+     * 
+ * + * INSTALLING = 4; + */ + INSTALLING(4), + /** + * + * + *
+     * Some hardware in the HardwareGroup have been installed.
+     * 
+ * + * PARTIALLY_INSTALLED = 5; + */ + PARTIALLY_INSTALLED(5), + /** + * + * + *
+     * All hardware in the HardwareGroup have been installed.
+     * 
+ * + * INSTALLED = 6; + */ + INSTALLED(6), + /** + * + * + *
+     * An error occurred and customer intervention is required.
+     * 
+ * + * FAILED = 7; + */ + FAILED(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State of the HardwareGroup is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * More information is required from the customer to make progress.
+     * 
+ * + * ADDITIONAL_INFO_NEEDED = 1; + */ + public static final int ADDITIONAL_INFO_NEEDED_VALUE = 1; + /** + * + * + *
+     * Google has initiated building hardware for this HardwareGroup.
+     * 
+ * + * BUILDING = 2; + */ + public static final int BUILDING_VALUE = 2; + /** + * + * + *
+     * The hardware has been built and is being shipped.
+     * 
+ * + * SHIPPING = 3; + */ + public static final int SHIPPING_VALUE = 3; + /** + * + * + *
+     * The hardware is being installed.
+     * 
+ * + * INSTALLING = 4; + */ + public static final int INSTALLING_VALUE = 4; + /** + * + * + *
+     * Some hardware in the HardwareGroup have been installed.
+     * 
+ * + * PARTIALLY_INSTALLED = 5; + */ + public static final int PARTIALLY_INSTALLED_VALUE = 5; + /** + * + * + *
+     * All hardware in the HardwareGroup have been installed.
+     * 
+ * + * INSTALLED = 6; + */ + public static final int INSTALLED_VALUE = 6; + /** + * + * + *
+     * An error occurred and customer intervention is required.
+     * 
+ * + * FAILED = 7; + */ + public static final int FAILED_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 ADDITIONAL_INFO_NEEDED; + case 2: + return BUILDING; + case 3: + return SHIPPING; + case 4: + return INSTALLING; + case 5: + return PARTIALLY_INSTALLED; + case 6: + return INSTALLED; + case 7: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public 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.gdchardwaremanagement.v1alpha.HardwareGroup.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.gdchardwaremanagement.v1alpha.HardwareGroup.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Name of this hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * 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 this hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * 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. Time when this hardware group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Time when this hardware group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this hardware group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when this hardware group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Time when this hardware group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when this hardware group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_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 associated with this hardware group as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this hardware group as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels associated with this hardware group as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this hardware group as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 HARDWARE_COUNT_FIELD_NUMBER = 5; + private int hardwareCount_ = 0; + /** + * + * + *
+   * Required. Number of hardware in this HardwareGroup.
+   * 
+ * + * int32 hardware_count = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The hardwareCount. + */ + @java.lang.Override + public int getHardwareCount() { + return hardwareCount_; + } + + public static final int CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config_; + /** + * + * + *
+   * Required. Configuration for hardware in this HardwareGroup.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Required. Configuration for hardware in this HardwareGroup.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig getConfig() { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.getDefaultInstance() + : config_; + } + /** + * + * + *
+   * Required. Configuration for hardware in this HardwareGroup.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder + getConfigOrBuilder() { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.getDefaultInstance() + : config_; + } + + public static final int SITE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object site_ = ""; + /** + * + * + *
+   * Required. Name of the site where the hardware in this HardwareGroup will be
+   * delivered.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The site. + */ + @java.lang.Override + public java.lang.String getSite() { + java.lang.Object ref = site_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + site_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the site where the hardware in this HardwareGroup will be
+   * delivered.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for site. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSiteBytes() { + java.lang.Object ref = site_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + site_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_ = 0; + /** + * + * + *
+   * Output only. Current state of this HardwareGroup.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State state = 8 [(.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. Current state of this HardwareGroup.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State getState() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State.forNumber(state_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State.UNRECOGNIZED + : result; + } + + public static final int ZONE_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + /** + * + * + *
+   * Optional. Name of the zone that the hardware in this HardwareGroup belongs
+   * to. Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string zone = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Name of the zone that the hardware in this HardwareGroup belongs
+   * to. Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string zone = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_INSTALLATION_DATE_FIELD_NUMBER = 10; + private com.google.type.Date requestedInstallationDate_; + /** + * + * + *
+   * Optional. Requested installation date for the hardware in this
+   * HardwareGroup. Filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the requestedInstallationDate field is set. + */ + @java.lang.Override + public boolean hasRequestedInstallationDate() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Optional. Requested installation date for the hardware in this
+   * HardwareGroup. Filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requestedInstallationDate. + */ + @java.lang.Override + public com.google.type.Date getRequestedInstallationDate() { + return requestedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : requestedInstallationDate_; + } + /** + * + * + *
+   * Optional. Requested installation date for the hardware in this
+   * HardwareGroup. Filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.type.DateOrBuilder getRequestedInstallationDateOrBuilder() { + return requestedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : requestedInstallationDate_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (hardwareCount_ != 0) { + output.writeInt32(5, hardwareCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(site_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, site_); + } + if (state_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, zone_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getRequestedInstallationDate()); + } + 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 (hardwareCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, hardwareCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(site_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, site_); + } + if (state_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, zone_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, getRequestedInstallationDate()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup other = + (com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup) 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 (getHardwareCount() != other.getHardwareCount()) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (!getSite().equals(other.getSite())) return false; + if (state_ != other.state_) return false; + if (!getZone().equals(other.getZone())) return false; + if (hasRequestedInstallationDate() != other.hasRequestedInstallationDate()) return false; + if (hasRequestedInstallationDate()) { + if (!getRequestedInstallationDate().equals(other.getRequestedInstallationDate())) + return false; + } + if (!getUnknownFields().equals(other.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) + HARDWARE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getHardwareCount(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + hash = (37 * hash) + SITE_FIELD_NUMBER; + hash = (53 * hash) + getSite().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + if (hasRequestedInstallationDate()) { + hash = (37 * hash) + REQUESTED_INSTALLATION_DATE_FIELD_NUMBER; + hash = (53 * hash) + getRequestedInstallationDate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup 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.gdchardwaremanagement.v1alpha.HardwareGroup parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup 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.gdchardwaremanagement.v1alpha.HardwareGroup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup 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.gdchardwaremanagement.v1alpha.HardwareGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A group of hardware that is part of the same order, has the same SKU, and is
+   * delivered to the same site.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup) + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.class, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.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(); + getConfigFieldBuilder(); + getRequestedInstallationDateFieldBuilder(); + } + } + + @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(); + hardwareCount_ = 0; + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + site_ = ""; + state_ = 0; + zone_ = ""; + requestedInstallationDate_ = null; + if (requestedInstallationDateBuilder_ != null) { + requestedInstallationDateBuilder_.dispose(); + requestedInstallationDateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup build() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup result = + new com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup 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.hardwareCount_ = hardwareCount_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.config_ = configBuilder_ == null ? config_ : configBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.site_ = site_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.zone_ = zone_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.requestedInstallationDate_ = + requestedInstallationDateBuilder_ == null + ? requestedInstallationDate_ + : requestedInstallationDateBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + 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.gdchardwaremanagement.v1alpha.HardwareGroup) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.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.getHardwareCount() != 0) { + setHardwareCount(other.getHardwareCount()); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (!other.getSite().isEmpty()) { + site_ = other.site_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasRequestedInstallationDate()) { + mergeRequestedInstallationDate(other.getRequestedInstallationDate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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: + { + hardwareCount_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + input.readMessage(getConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + site_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage( + getRequestedInstallationDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Identifier. Name of this hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * 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 this hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * 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 this hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * 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 this hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * 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 this hardware group.
+     * Format:
+     * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+     * 
+ * + * 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. Time when this hardware group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. Time when this hardware group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this hardware group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 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. Time when this hardware group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware group was created.
+     * 
+ * + * + * .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. Time when this hardware group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this hardware group was created.
+     * 
+ * + * + * .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. Time when this hardware group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Time when this hardware group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this hardware group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this hardware group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 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. Time when this hardware group was last updated.
+     * 
+ * + * + * .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. Time when this hardware group was last updated.
+     * 
+ * + * + * .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. Time when this hardware group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when this hardware group was last updated.
+     * 
+ * + * + * .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 associated with this hardware group as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this hardware group as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this hardware group as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this hardware group as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this hardware group as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this hardware group as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this hardware group as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 hardwareCount_; + /** + * + * + *
+     * Required. Number of hardware in this HardwareGroup.
+     * 
+ * + * int32 hardware_count = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The hardwareCount. + */ + @java.lang.Override + public int getHardwareCount() { + return hardwareCount_; + } + /** + * + * + *
+     * Required. Number of hardware in this HardwareGroup.
+     * 
+ * + * int32 hardware_count = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The hardwareCount to set. + * @return This builder for chaining. + */ + public Builder setHardwareCount(int value) { + + hardwareCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Number of hardware in this HardwareGroup.
+     * 
+ * + * int32 hardware_count = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearHardwareCount() { + bitField0_ = (bitField0_ & ~0x00000010); + hardwareCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * Required. Configuration for hardware in this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Required. Configuration for hardware in this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Configuration for hardware in this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfig(com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + } else { + configBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Configuration for hardware in this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfig( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Configuration for hardware in this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConfig( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig value) { + if (configBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && config_ != null + && config_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig + .getDefaultInstance()) { + getConfigBuilder().mergeFrom(value); + } else { + config_ = value; + } + } else { + configBuilder_.mergeFrom(value); + } + if (config_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Configuration for hardware in this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Configuration for hardware in this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder + getConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Configuration for hardware in this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder + getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.getDefaultInstance() + : config_; + } + } + /** + * + * + *
+     * Required. Configuration for hardware in this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private java.lang.Object site_ = ""; + /** + * + * + *
+     * Required. Name of the site where the hardware in this HardwareGroup will be
+     * delivered.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The site. + */ + public java.lang.String getSite() { + java.lang.Object ref = site_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + site_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the site where the hardware in this HardwareGroup will be
+     * delivered.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for site. + */ + public com.google.protobuf.ByteString getSiteBytes() { + java.lang.Object ref = site_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + site_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the site where the hardware in this HardwareGroup will be
+     * delivered.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The site to set. + * @return This builder for chaining. + */ + public Builder setSite(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + site_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the site where the hardware in this HardwareGroup will be
+     * delivered.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSite() { + site_ = getDefaultInstance().getSite(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the site where the hardware in this HardwareGroup will be
+     * delivered.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for site to set. + * @return This builder for chaining. + */ + public Builder setSiteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + site_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current state of this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State state = 8 [(.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. Current state of this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State state = 8 [(.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_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State getState() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State.forNumber(state_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Current state of this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of this HardwareGroup.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000080); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * Optional. Name of the zone that the hardware in this HardwareGroup belongs
+     * to. Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string zone = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Name of the zone that the hardware in this HardwareGroup belongs
+     * to. Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string zone = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Name of the zone that the hardware in this HardwareGroup belongs
+     * to. Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string zone = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the zone that the hardware in this HardwareGroup belongs
+     * to. Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string zone = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the zone that the hardware in this HardwareGroup belongs
+     * to. Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string zone = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.type.Date requestedInstallationDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + requestedInstallationDateBuilder_; + /** + * + * + *
+     * Optional. Requested installation date for the hardware in this
+     * HardwareGroup. Filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the requestedInstallationDate field is set. + */ + public boolean hasRequestedInstallationDate() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Optional. Requested installation date for the hardware in this
+     * HardwareGroup. Filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requestedInstallationDate. + */ + public com.google.type.Date getRequestedInstallationDate() { + if (requestedInstallationDateBuilder_ == null) { + return requestedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : requestedInstallationDate_; + } else { + return requestedInstallationDateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Requested installation date for the hardware in this
+     * HardwareGroup. Filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRequestedInstallationDate(com.google.type.Date value) { + if (requestedInstallationDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestedInstallationDate_ = value; + } else { + requestedInstallationDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested installation date for the hardware in this
+     * HardwareGroup. Filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRequestedInstallationDate(com.google.type.Date.Builder builderForValue) { + if (requestedInstallationDateBuilder_ == null) { + requestedInstallationDate_ = builderForValue.build(); + } else { + requestedInstallationDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested installation date for the hardware in this
+     * HardwareGroup. Filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRequestedInstallationDate(com.google.type.Date value) { + if (requestedInstallationDateBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && requestedInstallationDate_ != null + && requestedInstallationDate_ != com.google.type.Date.getDefaultInstance()) { + getRequestedInstallationDateBuilder().mergeFrom(value); + } else { + requestedInstallationDate_ = value; + } + } else { + requestedInstallationDateBuilder_.mergeFrom(value); + } + if (requestedInstallationDate_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Requested installation date for the hardware in this
+     * HardwareGroup. Filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRequestedInstallationDate() { + bitField0_ = (bitField0_ & ~0x00000200); + requestedInstallationDate_ = null; + if (requestedInstallationDateBuilder_ != null) { + requestedInstallationDateBuilder_.dispose(); + requestedInstallationDateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested installation date for the hardware in this
+     * HardwareGroup. Filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.Date.Builder getRequestedInstallationDateBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getRequestedInstallationDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Requested installation date for the hardware in this
+     * HardwareGroup. Filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.type.DateOrBuilder getRequestedInstallationDateOrBuilder() { + if (requestedInstallationDateBuilder_ != null) { + return requestedInstallationDateBuilder_.getMessageOrBuilder(); + } else { + return requestedInstallationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : requestedInstallationDate_; + } + } + /** + * + * + *
+     * Optional. Requested installation date for the hardware in this
+     * HardwareGroup. Filled in by the customer.
+     * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getRequestedInstallationDateFieldBuilder() { + if (requestedInstallationDateBuilder_ == null) { + requestedInstallationDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getRequestedInstallationDate(), getParentForChildren(), isClean()); + requestedInstallationDate_ = null; + } + return requestedInstallationDateBuilder_; + } + + @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.gdchardwaremanagement.v1alpha.HardwareGroup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HardwareGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareGroupName.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareGroupName.java new file mode 100644 index 000000000000..97675d0d0cc6 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareGroupName.java @@ -0,0 +1,261 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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 HardwareGroupName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ORDER_HARDWARE_GROUP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String order; + private final String hardwareGroup; + + @Deprecated + protected HardwareGroupName() { + project = null; + location = null; + order = null; + hardwareGroup = null; + } + + private HardwareGroupName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + order = Preconditions.checkNotNull(builder.getOrder()); + hardwareGroup = Preconditions.checkNotNull(builder.getHardwareGroup()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOrder() { + return order; + } + + public String getHardwareGroup() { + return hardwareGroup; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static HardwareGroupName of( + String project, String location, String order, String hardwareGroup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setOrder(order) + .setHardwareGroup(hardwareGroup) + .build(); + } + + public static String format(String project, String location, String order, String hardwareGroup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setOrder(order) + .setHardwareGroup(hardwareGroup) + .build() + .toString(); + } + + public static HardwareGroupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ORDER_HARDWARE_GROUP.validatedMatch( + formattedString, "HardwareGroupName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("order"), + matchMap.get("hardware_group")); + } + + 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 (HardwareGroupName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ORDER_HARDWARE_GROUP.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 (order != null) { + fieldMapBuilder.put("order", order); + } + if (hardwareGroup != null) { + fieldMapBuilder.put("hardware_group", hardwareGroup); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ORDER_HARDWARE_GROUP.instantiate( + "project", project, "location", location, "order", order, "hardware_group", hardwareGroup); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + HardwareGroupName that = ((HardwareGroupName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.order, that.order) + && Objects.equals(this.hardwareGroup, that.hardwareGroup); + } + 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(order); + h *= 1000003; + h ^= Objects.hashCode(hardwareGroup); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}. + */ + public static class Builder { + private String project; + private String location; + private String order; + private String hardwareGroup; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOrder() { + return order; + } + + public String getHardwareGroup() { + return hardwareGroup; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setOrder(String order) { + this.order = order; + return this; + } + + public Builder setHardwareGroup(String hardwareGroup) { + this.hardwareGroup = hardwareGroup; + return this; + } + + private Builder(HardwareGroupName hardwareGroupName) { + this.project = hardwareGroupName.project; + this.location = hardwareGroupName.location; + this.order = hardwareGroupName.order; + this.hardwareGroup = hardwareGroupName.hardwareGroup; + } + + public HardwareGroupName build() { + return new HardwareGroupName(this); + } + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareGroupOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareGroupOrBuilder.java new file mode 100644 index 000000000000..c2bbc1b522a2 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareGroupOrBuilder.java @@ -0,0 +1,390 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface HardwareGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of this hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Name of this hardware group.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when this hardware group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this hardware group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this hardware group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when this hardware group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when this hardware group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when this hardware group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels associated with this hardware group as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels associated with this hardware group as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this hardware group as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels associated with this hardware group as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this hardware group as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Number of hardware in this HardwareGroup.
+   * 
+ * + * int32 hardware_count = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The hardwareCount. + */ + int getHardwareCount(); + + /** + * + * + *
+   * Required. Configuration for hardware in this HardwareGroup.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * Required. Configuration for hardware in this HardwareGroup.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig getConfig(); + /** + * + * + *
+   * Required. Configuration for hardware in this HardwareGroup.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Required. Name of the site where the hardware in this HardwareGroup will be
+   * delivered.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The site. + */ + java.lang.String getSite(); + /** + * + * + *
+   * Required. Name of the site where the hardware in this HardwareGroup will be
+   * delivered.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for site. + */ + com.google.protobuf.ByteString getSiteBytes(); + + /** + * + * + *
+   * Output only. Current state of this HardwareGroup.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current state of this HardwareGroup.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State getState(); + + /** + * + * + *
+   * Optional. Name of the zone that the hardware in this HardwareGroup belongs
+   * to. Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string zone = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * Optional. Name of the zone that the hardware in this HardwareGroup belongs
+   * to. Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string zone = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Optional. Requested installation date for the hardware in this
+   * HardwareGroup. Filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the requestedInstallationDate field is set. + */ + boolean hasRequestedInstallationDate(); + /** + * + * + *
+   * Optional. Requested installation date for the hardware in this
+   * HardwareGroup. Filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requestedInstallationDate. + */ + com.google.type.Date getRequestedInstallationDate(); + /** + * + * + *
+   * Optional. Requested installation date for the hardware in this
+   * HardwareGroup. Filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.type.DateOrBuilder getRequestedInstallationDateOrBuilder(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareInstallationInfo.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareInstallationInfo.java new file mode 100644 index 000000000000..f457267b9e03 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareInstallationInfo.java @@ -0,0 +1,1782 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Information for installation of a Hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo} + */ +public final class HardwareInstallationInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo) + HardwareInstallationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use HardwareInstallationInfo.newBuilder() to construct. + private HardwareInstallationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HardwareInstallationInfo() { + rackLocation_ = ""; + rackType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HardwareInstallationInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareInstallationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareInstallationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.class, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.Builder.class); + } + + /** + * + * + *
+   * Valid rack types.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType} + */ + public enum RackType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Rack type is unspecified.
+     * 
+ * + * RACK_TYPE_UNSPECIFIED = 0; + */ + RACK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Two post rack.
+     * 
+ * + * TWO_POST = 1; + */ + TWO_POST(1), + /** + * + * + *
+     * Four post rack.
+     * 
+ * + * FOUR_POST = 2; + */ + FOUR_POST(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Rack type is unspecified.
+     * 
+ * + * RACK_TYPE_UNSPECIFIED = 0; + */ + public static final int RACK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Two post rack.
+     * 
+ * + * TWO_POST = 1; + */ + public static final int TWO_POST_VALUE = 1; + /** + * + * + *
+     * Four post rack.
+     * 
+ * + * FOUR_POST = 2; + */ + public static final int FOUR_POST_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 RackType 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 RackType forNumber(int value) { + switch (value) { + case 0: + return RACK_TYPE_UNSPECIFIED; + case 1: + return TWO_POST; + case 2: + return FOUR_POST; + 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 RackType findValueByNumber(int number) { + return RackType.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.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RackType[] VALUES = values(); + + public static RackType 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 RackType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType) + } + + private int bitField0_; + public static final int RACK_LOCATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object rackLocation_ = ""; + /** + * + * + *
+   * Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+   * Rack 3.
+   * 
+ * + * string rack_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rackLocation. + */ + @java.lang.Override + public java.lang.String getRackLocation() { + java.lang.Object ref = rackLocation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rackLocation_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+   * Rack 3.
+   * 
+ * + * string rack_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rackLocation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRackLocationBytes() { + java.lang.Object ref = rackLocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rackLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POWER_DISTANCE_METERS_FIELD_NUMBER = 2; + private int powerDistanceMeters_ = 0; + /** + * + * + *
+   * Required. Distance from the power outlet in meters.
+   * 
+ * + * int32 power_distance_meters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The powerDistanceMeters. + */ + @java.lang.Override + public int getPowerDistanceMeters() { + return powerDistanceMeters_; + } + + public static final int SWITCH_DISTANCE_METERS_FIELD_NUMBER = 3; + private int switchDistanceMeters_ = 0; + /** + * + * + *
+   * Required. Distance from the network switch in meters.
+   * 
+ * + * int32 switch_distance_meters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The switchDistanceMeters. + */ + @java.lang.Override + public int getSwitchDistanceMeters() { + return switchDistanceMeters_; + } + + public static final int RACK_UNIT_DIMENSIONS_FIELD_NUMBER = 4; + private com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions rackUnitDimensions_; + /** + * + * + *
+   * Required. Dimensions of the rack unit.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rackUnitDimensions field is set. + */ + @java.lang.Override + public boolean hasRackUnitDimensions() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Dimensions of the rack unit.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rackUnitDimensions. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions getRackUnitDimensions() { + return rackUnitDimensions_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.getDefaultInstance() + : rackUnitDimensions_; + } + /** + * + * + *
+   * Required. Dimensions of the rack unit.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.DimensionsOrBuilder + getRackUnitDimensionsOrBuilder() { + return rackUnitDimensions_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.getDefaultInstance() + : rackUnitDimensions_; + } + + public static final int RACK_SPACE_FIELD_NUMBER = 5; + private com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace rackSpace_; + /** + * + * + *
+   * Required. Rack space allocated for the hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rackSpace field is set. + */ + @java.lang.Override + public boolean hasRackSpace() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. Rack space allocated for the hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rackSpace. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace getRackSpace() { + return rackSpace_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.getDefaultInstance() + : rackSpace_; + } + /** + * + * + *
+   * Required. Rack space allocated for the hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder getRackSpaceOrBuilder() { + return rackSpace_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.getDefaultInstance() + : rackSpace_; + } + + public static final int RACK_TYPE_FIELD_NUMBER = 6; + private int rackType_ = 0; + /** + * + * + *
+   * Required. Type of the rack.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType rack_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for rackType. + */ + @java.lang.Override + public int getRackTypeValue() { + return rackType_; + } + /** + * + * + *
+   * Required. Type of the rack.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType rack_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rackType. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType + getRackType() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType.forNumber( + rackType_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType + .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(rackLocation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rackLocation_); + } + if (powerDistanceMeters_ != 0) { + output.writeInt32(2, powerDistanceMeters_); + } + if (switchDistanceMeters_ != 0) { + output.writeInt32(3, switchDistanceMeters_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getRackUnitDimensions()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getRackSpace()); + } + if (rackType_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType + .RACK_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, rackType_); + } + 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(rackLocation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rackLocation_); + } + if (powerDistanceMeters_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, powerDistanceMeters_); + } + if (switchDistanceMeters_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, switchDistanceMeters_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRackUnitDimensions()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRackSpace()); + } + if (rackType_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType + .RACK_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, rackType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo other = + (com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo) obj; + + if (!getRackLocation().equals(other.getRackLocation())) return false; + if (getPowerDistanceMeters() != other.getPowerDistanceMeters()) return false; + if (getSwitchDistanceMeters() != other.getSwitchDistanceMeters()) return false; + if (hasRackUnitDimensions() != other.hasRackUnitDimensions()) return false; + if (hasRackUnitDimensions()) { + if (!getRackUnitDimensions().equals(other.getRackUnitDimensions())) return false; + } + if (hasRackSpace() != other.hasRackSpace()) return false; + if (hasRackSpace()) { + if (!getRackSpace().equals(other.getRackSpace())) return false; + } + if (rackType_ != other.rackType_) return false; + if (!getUnknownFields().equals(other.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) + RACK_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getRackLocation().hashCode(); + hash = (37 * hash) + POWER_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getPowerDistanceMeters(); + hash = (37 * hash) + SWITCH_DISTANCE_METERS_FIELD_NUMBER; + hash = (53 * hash) + getSwitchDistanceMeters(); + if (hasRackUnitDimensions()) { + hash = (37 * hash) + RACK_UNIT_DIMENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getRackUnitDimensions().hashCode(); + } + if (hasRackSpace()) { + hash = (37 * hash) + RACK_SPACE_FIELD_NUMBER; + hash = (53 * hash) + getRackSpace().hashCode(); + } + hash = (37 * hash) + RACK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + rackType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo 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.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + 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.gdchardwaremanagement.v1alpha.HardwareInstallationInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo 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.gdchardwaremanagement.v1alpha.HardwareInstallationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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; + } + /** + * + * + *
+   * Information for installation of a Hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo) + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareInstallationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareInstallationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.class, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.Builder + .class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRackUnitDimensionsFieldBuilder(); + getRackSpaceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rackLocation_ = ""; + powerDistanceMeters_ = 0; + switchDistanceMeters_ = 0; + rackUnitDimensions_ = null; + if (rackUnitDimensionsBuilder_ != null) { + rackUnitDimensionsBuilder_.dispose(); + rackUnitDimensionsBuilder_ = null; + } + rackSpace_ = null; + if (rackSpaceBuilder_ != null) { + rackSpaceBuilder_.dispose(); + rackSpaceBuilder_ = null; + } + rackType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareInstallationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo build() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo result = + new com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rackLocation_ = rackLocation_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.powerDistanceMeters_ = powerDistanceMeters_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.switchDistanceMeters_ = switchDistanceMeters_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rackUnitDimensions_ = + rackUnitDimensionsBuilder_ == null + ? rackUnitDimensions_ + : rackUnitDimensionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rackSpace_ = rackSpaceBuilder_ == null ? rackSpace_ : rackSpaceBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.rackType_ = rackType_; + } + 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.gdchardwaremanagement.v1alpha.HardwareInstallationInfo) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + .getDefaultInstance()) return this; + if (!other.getRackLocation().isEmpty()) { + rackLocation_ = other.rackLocation_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPowerDistanceMeters() != 0) { + setPowerDistanceMeters(other.getPowerDistanceMeters()); + } + if (other.getSwitchDistanceMeters() != 0) { + setSwitchDistanceMeters(other.getSwitchDistanceMeters()); + } + if (other.hasRackUnitDimensions()) { + mergeRackUnitDimensions(other.getRackUnitDimensions()); + } + if (other.hasRackSpace()) { + mergeRackSpace(other.getRackSpace()); + } + if (other.rackType_ != 0) { + setRackTypeValue(other.getRackTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + rackLocation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + powerDistanceMeters_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + switchDistanceMeters_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage( + getRackUnitDimensionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getRackSpaceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + rackType_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object rackLocation_ = ""; + /** + * + * + *
+     * Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+     * Rack 3.
+     * 
+ * + * string rack_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rackLocation. + */ + public java.lang.String getRackLocation() { + java.lang.Object ref = rackLocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rackLocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+     * Rack 3.
+     * 
+ * + * string rack_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rackLocation. + */ + public com.google.protobuf.ByteString getRackLocationBytes() { + java.lang.Object ref = rackLocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rackLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+     * Rack 3.
+     * 
+ * + * string rack_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rackLocation to set. + * @return This builder for chaining. + */ + public Builder setRackLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rackLocation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+     * Rack 3.
+     * 
+ * + * string rack_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRackLocation() { + rackLocation_ = getDefaultInstance().getRackLocation(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+     * Rack 3.
+     * 
+ * + * string rack_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for rackLocation to set. + * @return This builder for chaining. + */ + public Builder setRackLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rackLocation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int powerDistanceMeters_; + /** + * + * + *
+     * Required. Distance from the power outlet in meters.
+     * 
+ * + * int32 power_distance_meters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The powerDistanceMeters. + */ + @java.lang.Override + public int getPowerDistanceMeters() { + return powerDistanceMeters_; + } + /** + * + * + *
+     * Required. Distance from the power outlet in meters.
+     * 
+ * + * int32 power_distance_meters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The powerDistanceMeters to set. + * @return This builder for chaining. + */ + public Builder setPowerDistanceMeters(int value) { + + powerDistanceMeters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Distance from the power outlet in meters.
+     * 
+ * + * int32 power_distance_meters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPowerDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000002); + powerDistanceMeters_ = 0; + onChanged(); + return this; + } + + private int switchDistanceMeters_; + /** + * + * + *
+     * Required. Distance from the network switch in meters.
+     * 
+ * + * int32 switch_distance_meters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The switchDistanceMeters. + */ + @java.lang.Override + public int getSwitchDistanceMeters() { + return switchDistanceMeters_; + } + /** + * + * + *
+     * Required. Distance from the network switch in meters.
+     * 
+ * + * int32 switch_distance_meters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The switchDistanceMeters to set. + * @return This builder for chaining. + */ + public Builder setSwitchDistanceMeters(int value) { + + switchDistanceMeters_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Distance from the network switch in meters.
+     * 
+ * + * int32 switch_distance_meters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSwitchDistanceMeters() { + bitField0_ = (bitField0_ & ~0x00000004); + switchDistanceMeters_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions rackUnitDimensions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions, + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.DimensionsOrBuilder> + rackUnitDimensionsBuilder_; + /** + * + * + *
+     * Required. Dimensions of the rack unit.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rackUnitDimensions field is set. + */ + public boolean hasRackUnitDimensions() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. Dimensions of the rack unit.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rackUnitDimensions. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions getRackUnitDimensions() { + if (rackUnitDimensionsBuilder_ == null) { + return rackUnitDimensions_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.getDefaultInstance() + : rackUnitDimensions_; + } else { + return rackUnitDimensionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Dimensions of the rack unit.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRackUnitDimensions( + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions value) { + if (rackUnitDimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rackUnitDimensions_ = value; + } else { + rackUnitDimensionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dimensions of the rack unit.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRackUnitDimensions( + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.Builder builderForValue) { + if (rackUnitDimensionsBuilder_ == null) { + rackUnitDimensions_ = builderForValue.build(); + } else { + rackUnitDimensionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dimensions of the rack unit.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRackUnitDimensions( + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions value) { + if (rackUnitDimensionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && rackUnitDimensions_ != null + && rackUnitDimensions_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.getDefaultInstance()) { + getRackUnitDimensionsBuilder().mergeFrom(value); + } else { + rackUnitDimensions_ = value; + } + } else { + rackUnitDimensionsBuilder_.mergeFrom(value); + } + if (rackUnitDimensions_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Dimensions of the rack unit.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRackUnitDimensions() { + bitField0_ = (bitField0_ & ~0x00000008); + rackUnitDimensions_ = null; + if (rackUnitDimensionsBuilder_ != null) { + rackUnitDimensionsBuilder_.dispose(); + rackUnitDimensionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dimensions of the rack unit.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.Builder + getRackUnitDimensionsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getRackUnitDimensionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Dimensions of the rack unit.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.DimensionsOrBuilder + getRackUnitDimensionsOrBuilder() { + if (rackUnitDimensionsBuilder_ != null) { + return rackUnitDimensionsBuilder_.getMessageOrBuilder(); + } else { + return rackUnitDimensions_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.getDefaultInstance() + : rackUnitDimensions_; + } + } + /** + * + * + *
+     * Required. Dimensions of the rack unit.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions, + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.DimensionsOrBuilder> + getRackUnitDimensionsFieldBuilder() { + if (rackUnitDimensionsBuilder_ == null) { + rackUnitDimensionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions, + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.DimensionsOrBuilder>( + getRackUnitDimensions(), getParentForChildren(), isClean()); + rackUnitDimensions_ = null; + } + return rackUnitDimensionsBuilder_; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace rackSpace_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder> + rackSpaceBuilder_; + /** + * + * + *
+     * Required. Rack space allocated for the hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rackSpace field is set. + */ + public boolean hasRackSpace() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Required. Rack space allocated for the hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rackSpace. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace getRackSpace() { + if (rackSpaceBuilder_ == null) { + return rackSpace_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.getDefaultInstance() + : rackSpace_; + } else { + return rackSpaceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Rack space allocated for the hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRackSpace(com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace value) { + if (rackSpaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rackSpace_ = value; + } else { + rackSpaceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Rack space allocated for the hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRackSpace( + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder builderForValue) { + if (rackSpaceBuilder_ == null) { + rackSpace_ = builderForValue.build(); + } else { + rackSpaceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Rack space allocated for the hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRackSpace(com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace value) { + if (rackSpaceBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && rackSpace_ != null + && rackSpace_ + != com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.getDefaultInstance()) { + getRackSpaceBuilder().mergeFrom(value); + } else { + rackSpace_ = value; + } + } else { + rackSpaceBuilder_.mergeFrom(value); + } + if (rackSpace_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Rack space allocated for the hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRackSpace() { + bitField0_ = (bitField0_ & ~0x00000010); + rackSpace_ = null; + if (rackSpaceBuilder_ != null) { + rackSpaceBuilder_.dispose(); + rackSpaceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Rack space allocated for the hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder getRackSpaceBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getRackSpaceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Rack space allocated for the hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder + getRackSpaceOrBuilder() { + if (rackSpaceBuilder_ != null) { + return rackSpaceBuilder_.getMessageOrBuilder(); + } else { + return rackSpace_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.getDefaultInstance() + : rackSpace_; + } + } + /** + * + * + *
+     * Required. Rack space allocated for the hardware.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder> + getRackSpaceFieldBuilder() { + if (rackSpaceBuilder_ == null) { + rackSpaceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder>( + getRackSpace(), getParentForChildren(), isClean()); + rackSpace_ = null; + } + return rackSpaceBuilder_; + } + + private int rackType_ = 0; + /** + * + * + *
+     * Required. Type of the rack.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType rack_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for rackType. + */ + @java.lang.Override + public int getRackTypeValue() { + return rackType_; + } + /** + * + * + *
+     * Required. Type of the rack.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType rack_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for rackType to set. + * @return This builder for chaining. + */ + public Builder setRackTypeValue(int value) { + rackType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of the rack.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType rack_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rackType. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType + getRackType() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType + .forNumber(rackType_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Type of the rack.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType rack_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The rackType to set. + * @return This builder for chaining. + */ + public Builder setRackType( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + rackType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of the rack.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType rack_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearRackType() { + bitField0_ = (bitField0_ & ~0x00000020); + rackType_ = 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.gdchardwaremanagement.v1alpha.HardwareInstallationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HardwareInstallationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareInstallationInfoOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareInstallationInfoOrBuilder.java new file mode 100644 index 000000000000..276fcdb9b8f6 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareInstallationInfoOrBuilder.java @@ -0,0 +1,191 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface HardwareInstallationInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+   * Rack 3.
+   * 
+ * + * string rack_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rackLocation. + */ + java.lang.String getRackLocation(); + /** + * + * + *
+   * Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+   * Rack 3.
+   * 
+ * + * string rack_location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rackLocation. + */ + com.google.protobuf.ByteString getRackLocationBytes(); + + /** + * + * + *
+   * Required. Distance from the power outlet in meters.
+   * 
+ * + * int32 power_distance_meters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The powerDistanceMeters. + */ + int getPowerDistanceMeters(); + + /** + * + * + *
+   * Required. Distance from the network switch in meters.
+   * 
+ * + * int32 switch_distance_meters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The switchDistanceMeters. + */ + int getSwitchDistanceMeters(); + + /** + * + * + *
+   * Required. Dimensions of the rack unit.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rackUnitDimensions field is set. + */ + boolean hasRackUnitDimensions(); + /** + * + * + *
+   * Required. Dimensions of the rack unit.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rackUnitDimensions. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Dimensions getRackUnitDimensions(); + /** + * + * + *
+   * Required. Dimensions of the rack unit.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Dimensions rack_unit_dimensions = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.DimensionsOrBuilder + getRackUnitDimensionsOrBuilder(); + + /** + * + * + *
+   * Required. Rack space allocated for the hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rackSpace field is set. + */ + boolean hasRackSpace(); + /** + * + * + *
+   * Required. Rack space allocated for the hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rackSpace. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace getRackSpace(); + /** + * + * + *
+   * Required. Rack space allocated for the hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder getRackSpaceOrBuilder(); + + /** + * + * + *
+   * Required. Type of the rack.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType rack_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for rackType. + */ + int getRackTypeValue(); + /** + * + * + *
+   * Required. Type of the rack.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType rack_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rackType. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType getRackType(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareLocation.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareLocation.java new file mode 100644 index 000000000000..0b54ae5c1498 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareLocation.java @@ -0,0 +1,1423 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Represents the location of one or many hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation} + */ +public final class HardwareLocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation) + HardwareLocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use HardwareLocation.newBuilder() to construct. + private HardwareLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HardwareLocation() { + site_ = ""; + rackLocation_ = ""; + rackSpace_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HardwareLocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.class, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder.class); + } + + public static final int SITE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object site_ = ""; + /** + * + * + *
+   * Required. Name of the site where the hardware are present.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The site. + */ + @java.lang.Override + public java.lang.String getSite() { + java.lang.Object ref = site_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + site_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the site where the hardware are present.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for site. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSiteBytes() { + java.lang.Object ref = site_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + site_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RACK_LOCATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object rackLocation_ = ""; + /** + * + * + *
+   * Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+   * Rack 3.
+   * 
+ * + * string rack_location = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rackLocation. + */ + @java.lang.Override + public java.lang.String getRackLocation() { + java.lang.Object ref = rackLocation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rackLocation_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+   * Rack 3.
+   * 
+ * + * string rack_location = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rackLocation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRackLocationBytes() { + java.lang.Object ref = rackLocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rackLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RACK_SPACE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List rackSpace_; + /** + * + * + *
+   * Optional. Spaces occupied by the hardware in the rack.
+   * If unset, this location is assumed to be the entire rack.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getRackSpaceList() { + return rackSpace_; + } + /** + * + * + *
+   * Optional. Spaces occupied by the hardware in the rack.
+   * If unset, this location is assumed to be the entire rack.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getRackSpaceOrBuilderList() { + return rackSpace_; + } + /** + * + * + *
+   * Optional. Spaces occupied by the hardware in the rack.
+   * If unset, this location is assumed to be the entire rack.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getRackSpaceCount() { + return rackSpace_.size(); + } + /** + * + * + *
+   * Optional. Spaces occupied by the hardware in the rack.
+   * If unset, this location is assumed to be the entire rack.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace getRackSpace(int index) { + return rackSpace_.get(index); + } + /** + * + * + *
+   * Optional. Spaces occupied by the hardware in the rack.
+   * If unset, this location is assumed to be the entire rack.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder getRackSpaceOrBuilder( + int index) { + return rackSpace_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(site_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, site_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rackLocation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rackLocation_); + } + for (int i = 0; i < rackSpace_.size(); i++) { + output.writeMessage(3, rackSpace_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(site_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, site_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rackLocation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rackLocation_); + } + for (int i = 0; i < rackSpace_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, rackSpace_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation other = + (com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation) obj; + + if (!getSite().equals(other.getSite())) return false; + if (!getRackLocation().equals(other.getRackLocation())) return false; + if (!getRackSpaceList().equals(other.getRackSpaceList())) return false; + if (!getUnknownFields().equals(other.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) + SITE_FIELD_NUMBER; + hash = (53 * hash) + getSite().hashCode(); + hash = (37 * hash) + RACK_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getRackLocation().hashCode(); + if (getRackSpaceCount() > 0) { + hash = (37 * hash) + RACK_SPACE_FIELD_NUMBER; + hash = (53 * hash) + getRackSpaceList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation 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.gdchardwaremanagement.v1alpha.HardwareLocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation 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.gdchardwaremanagement.v1alpha.HardwareLocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation 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.gdchardwaremanagement.v1alpha.HardwareLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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 location of one or many hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation) + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.class, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + site_ = ""; + rackLocation_ = ""; + if (rackSpaceBuilder_ == null) { + rackSpace_ = java.util.Collections.emptyList(); + } else { + rackSpace_ = null; + rackSpaceBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareLocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation build() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation result = + new com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation result) { + if (rackSpaceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + rackSpace_ = java.util.Collections.unmodifiableList(rackSpace_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.rackSpace_ = rackSpace_; + } else { + result.rackSpace_ = rackSpaceBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.site_ = site_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rackLocation_ = rackLocation_; + } + } + + @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.gdchardwaremanagement.v1alpha.HardwareLocation) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.getDefaultInstance()) + return this; + if (!other.getSite().isEmpty()) { + site_ = other.site_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRackLocation().isEmpty()) { + rackLocation_ = other.rackLocation_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (rackSpaceBuilder_ == null) { + if (!other.rackSpace_.isEmpty()) { + if (rackSpace_.isEmpty()) { + rackSpace_ = other.rackSpace_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRackSpaceIsMutable(); + rackSpace_.addAll(other.rackSpace_); + } + onChanged(); + } + } else { + if (!other.rackSpace_.isEmpty()) { + if (rackSpaceBuilder_.isEmpty()) { + rackSpaceBuilder_.dispose(); + rackSpaceBuilder_ = null; + rackSpace_ = other.rackSpace_; + bitField0_ = (bitField0_ & ~0x00000004); + rackSpaceBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRackSpaceFieldBuilder() + : null; + } else { + rackSpaceBuilder_.addAllMessages(other.rackSpace_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + site_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + rackLocation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.parser(), + extensionRegistry); + if (rackSpaceBuilder_ == null) { + ensureRackSpaceIsMutable(); + rackSpace_.add(m); + } else { + rackSpaceBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object site_ = ""; + /** + * + * + *
+     * Required. Name of the site where the hardware are present.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The site. + */ + public java.lang.String getSite() { + java.lang.Object ref = site_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + site_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the site where the hardware are present.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for site. + */ + public com.google.protobuf.ByteString getSiteBytes() { + java.lang.Object ref = site_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + site_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the site where the hardware are present.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The site to set. + * @return This builder for chaining. + */ + public Builder setSite(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + site_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the site where the hardware are present.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSite() { + site_ = getDefaultInstance().getSite(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the site where the hardware are present.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * + * string site = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for site to set. + * @return This builder for chaining. + */ + public Builder setSiteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + site_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object rackLocation_ = ""; + /** + * + * + *
+     * Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+     * Rack 3.
+     * 
+ * + * string rack_location = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rackLocation. + */ + public java.lang.String getRackLocation() { + java.lang.Object ref = rackLocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rackLocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+     * Rack 3.
+     * 
+ * + * string rack_location = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rackLocation. + */ + public com.google.protobuf.ByteString getRackLocationBytes() { + java.lang.Object ref = rackLocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rackLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+     * Rack 3.
+     * 
+ * + * string rack_location = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The rackLocation to set. + * @return This builder for chaining. + */ + public Builder setRackLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rackLocation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+     * Rack 3.
+     * 
+ * + * string rack_location = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRackLocation() { + rackLocation_ = getDefaultInstance().getRackLocation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+     * Rack 3.
+     * 
+ * + * string rack_location = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for rackLocation to set. + * @return This builder for chaining. + */ + public Builder setRackLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rackLocation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List rackSpace_ = + java.util.Collections.emptyList(); + + private void ensureRackSpaceIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + rackSpace_ = + new java.util.ArrayList( + rackSpace_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder> + rackSpaceBuilder_; + + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getRackSpaceList() { + if (rackSpaceBuilder_ == null) { + return java.util.Collections.unmodifiableList(rackSpace_); + } else { + return rackSpaceBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getRackSpaceCount() { + if (rackSpaceBuilder_ == null) { + return rackSpace_.size(); + } else { + return rackSpaceBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace getRackSpace(int index) { + if (rackSpaceBuilder_ == null) { + return rackSpace_.get(index); + } else { + return rackSpaceBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRackSpace( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace value) { + if (rackSpaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRackSpaceIsMutable(); + rackSpace_.set(index, value); + onChanged(); + } else { + rackSpaceBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRackSpace( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder builderForValue) { + if (rackSpaceBuilder_ == null) { + ensureRackSpaceIsMutable(); + rackSpace_.set(index, builderForValue.build()); + onChanged(); + } else { + rackSpaceBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRackSpace(com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace value) { + if (rackSpaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRackSpaceIsMutable(); + rackSpace_.add(value); + onChanged(); + } else { + rackSpaceBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRackSpace( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace value) { + if (rackSpaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRackSpaceIsMutable(); + rackSpace_.add(index, value); + onChanged(); + } else { + rackSpaceBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRackSpace( + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder builderForValue) { + if (rackSpaceBuilder_ == null) { + ensureRackSpaceIsMutable(); + rackSpace_.add(builderForValue.build()); + onChanged(); + } else { + rackSpaceBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRackSpace( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder builderForValue) { + if (rackSpaceBuilder_ == null) { + ensureRackSpaceIsMutable(); + rackSpace_.add(index, builderForValue.build()); + onChanged(); + } else { + rackSpaceBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllRackSpace( + java.lang.Iterable + values) { + if (rackSpaceBuilder_ == null) { + ensureRackSpaceIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rackSpace_); + onChanged(); + } else { + rackSpaceBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRackSpace() { + if (rackSpaceBuilder_ == null) { + rackSpace_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + rackSpaceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeRackSpace(int index) { + if (rackSpaceBuilder_ == null) { + ensureRackSpaceIsMutable(); + rackSpace_.remove(index); + onChanged(); + } else { + rackSpaceBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder getRackSpaceBuilder( + int index) { + return getRackSpaceFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder getRackSpaceOrBuilder( + int index) { + if (rackSpaceBuilder_ == null) { + return rackSpace_.get(index); + } else { + return rackSpaceBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder> + getRackSpaceOrBuilderList() { + if (rackSpaceBuilder_ != null) { + return rackSpaceBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rackSpace_); + } + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder addRackSpaceBuilder() { + return getRackSpaceFieldBuilder() + .addBuilder( + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder addRackSpaceBuilder( + int index) { + return getRackSpaceFieldBuilder() + .addBuilder( + index, com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Spaces occupied by the hardware in the rack.
+     * If unset, this location is assumed to be the entire rack.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getRackSpaceBuilderList() { + return getRackSpaceFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder> + getRackSpaceFieldBuilder() { + if (rackSpaceBuilder_ == null) { + rackSpaceBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder>( + rackSpace_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + rackSpace_ = null; + } + return rackSpaceBuilder_; + } + + @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.gdchardwaremanagement.v1alpha.HardwareLocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HardwareLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareLocationOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareLocationOrBuilder.java new file mode 100644 index 000000000000..d5292d5db852 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareLocationOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface HardwareLocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the site where the hardware are present.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The site. + */ + java.lang.String getSite(); + /** + * + * + *
+   * Required. Name of the site where the hardware are present.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for site. + */ + com.google.protobuf.ByteString getSiteBytes(); + + /** + * + * + *
+   * Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+   * Rack 3.
+   * 
+ * + * string rack_location = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rackLocation. + */ + java.lang.String getRackLocation(); + /** + * + * + *
+   * Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7,
+   * Rack 3.
+   * 
+ * + * string rack_location = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rackLocation. + */ + com.google.protobuf.ByteString getRackLocationBytes(); + + /** + * + * + *
+   * Optional. Spaces occupied by the hardware in the rack.
+   * If unset, this location is assumed to be the entire rack.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getRackSpaceList(); + /** + * + * + *
+   * Optional. Spaces occupied by the hardware in the rack.
+   * If unset, this location is assumed to be the entire rack.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace getRackSpace(int index); + /** + * + * + *
+   * Optional. Spaces occupied by the hardware in the rack.
+   * If unset, this location is assumed to be the entire rack.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getRackSpaceCount(); + /** + * + * + *
+   * Optional. Spaces occupied by the hardware in the rack.
+   * If unset, this location is assumed to be the entire rack.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getRackSpaceOrBuilderList(); + /** + * + * + *
+   * Optional. Spaces occupied by the hardware in the rack.
+   * If unset, this location is assumed to be the entire rack.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.RackSpace rack_space = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder getRackSpaceOrBuilder( + int index); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareName.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareName.java new file mode 100644 index 000000000000..e2ef0fa702aa --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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 HardwareName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_HARDWARE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/hardware/{hardware}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String hardware; + + @Deprecated + protected HardwareName() { + project = null; + location = null; + hardware = null; + } + + private HardwareName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + hardware = Preconditions.checkNotNull(builder.getHardware()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getHardware() { + return hardware; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static HardwareName of(String project, String location, String hardware) { + return newBuilder().setProject(project).setLocation(location).setHardware(hardware).build(); + } + + public static String format(String project, String location, String hardware) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setHardware(hardware) + .build() + .toString(); + } + + public static HardwareName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_HARDWARE.validatedMatch( + formattedString, "HardwareName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("hardware")); + } + + 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 (HardwareName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_HARDWARE.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 (hardware != null) { + fieldMapBuilder.put("hardware", hardware); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_HARDWARE.instantiate( + "project", project, "location", location, "hardware", hardware); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + HardwareName that = ((HardwareName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.hardware, that.hardware); + } + 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(hardware); + return h; + } + + /** Builder for projects/{project}/locations/{location}/hardware/{hardware}. */ + public static class Builder { + private String project; + private String location; + private String hardware; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getHardware() { + return hardware; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setHardware(String hardware) { + this.hardware = hardware; + return this; + } + + private Builder(HardwareName hardwareName) { + this.project = hardwareName.project; + this.location = hardwareName.location; + this.hardware = hardwareName.hardware; + } + + public HardwareName build() { + return new HardwareName(this); + } + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareOrBuilder.java new file mode 100644 index 000000000000..38566f909321 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwareOrBuilder.java @@ -0,0 +1,661 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface HardwareOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.Hardware) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of this hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Name of this hardware.
+   * Format: `projects/{project}/locations/{location}/hardware/{hardware}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Display name for this hardware.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. Display name for this hardware.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. Time when this hardware was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this hardware was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this hardware was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when this hardware was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when this hardware was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when this hardware was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels associated with this hardware as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels associated with this hardware as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels associated with this hardware as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels associated with this hardware as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels associated with this hardware as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Name of the order that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string order = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The order. + */ + java.lang.String getOrder(); + /** + * + * + *
+   * Required. Name of the order that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string order = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for order. + */ + com.google.protobuf.ByteString getOrderBytes(); + + /** + * + * + *
+   * Output only. Name for the hardware group that this hardware belongs to.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * string hardware_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The hardwareGroup. + */ + java.lang.String getHardwareGroup(); + /** + * + * + *
+   * Output only. Name for the hardware group that this hardware belongs to.
+   * Format:
+   * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+   * 
+ * + * + * string hardware_group = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for hardwareGroup. + */ + com.google.protobuf.ByteString getHardwareGroupBytes(); + + /** + * + * + *
+   * Required. Name for the site that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The site. + */ + java.lang.String getSite(); + /** + * + * + *
+   * Required. Name for the site that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * + * string site = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for site. + */ + com.google.protobuf.ByteString getSiteBytes(); + + /** + * + * + *
+   * Output only. Current state for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current state for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.State getState(); + + /** + * + * + *
+   * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+   * Hardware.
+   * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ciqUri. + */ + java.lang.String getCiqUri(); + /** + * + * + *
+   * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+   * Hardware.
+   * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ciqUri. + */ + com.google.protobuf.ByteString getCiqUriBytes(); + + /** + * + * + *
+   * Required. Configuration for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * Required. Configuration for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig getConfig(); + /** + * + * + *
+   * Required. Configuration for this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig config = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Output only. Estimated installation date for this hardware.
+   * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the estimatedInstallationDate field is set. + */ + boolean hasEstimatedInstallationDate(); + /** + * + * + *
+   * Output only. Estimated installation date for this hardware.
+   * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The estimatedInstallationDate. + */ + com.google.type.Date getEstimatedInstallationDate(); + /** + * + * + *
+   * Output only. Estimated installation date for this hardware.
+   * 
+ * + * + * .google.type.Date estimated_installation_date = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.type.DateOrBuilder getEstimatedInstallationDateOrBuilder(); + + /** + * + * + *
+   * Optional. Physical properties of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the physicalInfo field is set. + */ + boolean hasPhysicalInfo(); + /** + * + * + *
+   * Optional. Physical properties of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The physicalInfo. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo getPhysicalInfo(); + /** + * + * + *
+   * Optional. Physical properties of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo physical_info = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfoOrBuilder + getPhysicalInfoOrBuilder(); + + /** + * + * + *
+   * Optional. Information for installation of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the installationInfo field is set. + */ + boolean hasInstallationInfo(); + /** + * + * + *
+   * Optional. Information for installation of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The installationInfo. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo getInstallationInfo(); + /** + * + * + *
+   * Optional. Information for installation of this hardware.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo installation_info = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfoOrBuilder + getInstallationInfoOrBuilder(); + + /** + * + * + *
+   * Required. Name for the zone that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string zone = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * Required. Name for the zone that this hardware belongs to.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string zone = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Optional. Requested installation date for this hardware. This is
+   * auto-populated when the order is accepted, if the hardware's HardwareGroup
+   * specifies this. It can also be filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the requestedInstallationDate field is set. + */ + boolean hasRequestedInstallationDate(); + /** + * + * + *
+   * Optional. Requested installation date for this hardware. This is
+   * auto-populated when the order is accepted, if the hardware's HardwareGroup
+   * specifies this. It can also be filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requestedInstallationDate. + */ + com.google.type.Date getRequestedInstallationDate(); + /** + * + * + *
+   * Optional. Requested installation date for this hardware. This is
+   * auto-populated when the order is accepted, if the hardware's HardwareGroup
+   * specifies this. It can also be filled in by the customer.
+   * 
+ * + * + * .google.type.Date requested_installation_date = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.type.DateOrBuilder getRequestedInstallationDateOrBuilder(); + + /** + * + * + *
+   * Output only. Actual installation date for this hardware. Filled in by
+   * Google.
+   * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the actualInstallationDate field is set. + */ + boolean hasActualInstallationDate(); + /** + * + * + *
+   * Output only. Actual installation date for this hardware. Filled in by
+   * Google.
+   * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The actualInstallationDate. + */ + com.google.type.Date getActualInstallationDate(); + /** + * + * + *
+   * Output only. Actual installation date for this hardware. Filled in by
+   * Google.
+   * 
+ * + * + * .google.type.Date actual_installation_date = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.type.DateOrBuilder getActualInstallationDateOrBuilder(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwarePhysicalInfo.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwarePhysicalInfo.java new file mode 100644 index 000000000000..1046b112705d --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwarePhysicalInfo.java @@ -0,0 +1,1790 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Physical properties of a hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo} + */ +public final class HardwarePhysicalInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo) + HardwarePhysicalInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use HardwarePhysicalInfo.newBuilder() to construct. + private HardwarePhysicalInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HardwarePhysicalInfo() { + powerReceptacle_ = 0; + networkUplink_ = 0; + voltage_ = 0; + amperes_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HardwarePhysicalInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwarePhysicalInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwarePhysicalInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.class, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Builder.class); + } + + /** + * + * + *
+   * Valid power receptacle types.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType} + */ + public enum PowerReceptacleType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Facility plug type is unspecified.
+     * 
+ * + * POWER_RECEPTACLE_TYPE_UNSPECIFIED = 0; + */ + POWER_RECEPTACLE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * NEMA 5-15.
+     * 
+ * + * NEMA_5_15 = 1; + */ + NEMA_5_15(1), + /** + * + * + *
+     * C13.
+     * 
+ * + * C_13 = 2; + */ + C_13(2), + /** + * + * + *
+     * Standard european receptacle.
+     * 
+ * + * STANDARD_EU = 3; + */ + STANDARD_EU(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Facility plug type is unspecified.
+     * 
+ * + * POWER_RECEPTACLE_TYPE_UNSPECIFIED = 0; + */ + public static final int POWER_RECEPTACLE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * NEMA 5-15.
+     * 
+ * + * NEMA_5_15 = 1; + */ + public static final int NEMA_5_15_VALUE = 1; + /** + * + * + *
+     * C13.
+     * 
+ * + * C_13 = 2; + */ + public static final int C_13_VALUE = 2; + /** + * + * + *
+     * Standard european receptacle.
+     * 
+ * + * STANDARD_EU = 3; + */ + public static final int STANDARD_EU_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 PowerReceptacleType 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 PowerReceptacleType forNumber(int value) { + switch (value) { + case 0: + return POWER_RECEPTACLE_TYPE_UNSPECIFIED; + case 1: + return NEMA_5_15; + case 2: + return C_13; + case 3: + return STANDARD_EU; + 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 PowerReceptacleType findValueByNumber(int number) { + return PowerReceptacleType.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.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PowerReceptacleType[] VALUES = values(); + + public static PowerReceptacleType 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 PowerReceptacleType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType) + } + + /** + * + * + *
+   * Valid network uplink types.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType} + */ + public enum NetworkUplinkType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Network uplink type is unspecified.
+     * 
+ * + * NETWORK_UPLINK_TYPE_UNSPECIFIED = 0; + */ + NETWORK_UPLINK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * RJ-45.
+     * 
+ * + * RJ_45 = 1; + */ + RJ_45(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Network uplink type is unspecified.
+     * 
+ * + * NETWORK_UPLINK_TYPE_UNSPECIFIED = 0; + */ + public static final int NETWORK_UPLINK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * RJ-45.
+     * 
+ * + * RJ_45 = 1; + */ + public static final int RJ_45_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NetworkUplinkType 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 NetworkUplinkType forNumber(int value) { + switch (value) { + case 0: + return NETWORK_UPLINK_TYPE_UNSPECIFIED; + case 1: + return RJ_45; + 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 NetworkUplinkType findValueByNumber(int number) { + return NetworkUplinkType.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.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final NetworkUplinkType[] VALUES = values(); + + public static NetworkUplinkType 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 NetworkUplinkType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType) + } + + /** + * + * + *
+   * Valid voltage values.
+   * 
+ * + * Protobuf enum {@code google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage} + */ + public enum Voltage implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Voltage is unspecified.
+     * 
+ * + * VOLTAGE_UNSPECIFIED = 0; + */ + VOLTAGE_UNSPECIFIED(0), + /** + * + * + *
+     * 120V.
+     * 
+ * + * VOLTAGE_110 = 1; + */ + VOLTAGE_110(1), + /** + * + * + *
+     * 220V.
+     * 
+ * + * VOLTAGE_220 = 3; + */ + VOLTAGE_220(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Voltage is unspecified.
+     * 
+ * + * VOLTAGE_UNSPECIFIED = 0; + */ + public static final int VOLTAGE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * 120V.
+     * 
+ * + * VOLTAGE_110 = 1; + */ + public static final int VOLTAGE_110_VALUE = 1; + /** + * + * + *
+     * 220V.
+     * 
+ * + * VOLTAGE_220 = 3; + */ + public static final int VOLTAGE_220_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 Voltage 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 Voltage forNumber(int value) { + switch (value) { + case 0: + return VOLTAGE_UNSPECIFIED; + case 1: + return VOLTAGE_110; + case 3: + return VOLTAGE_220; + 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 Voltage findValueByNumber(int number) { + return Voltage.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.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final Voltage[] VALUES = values(); + + public static Voltage 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 Voltage(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage) + } + + /** + * + * + *
+   * Valid amperes values.
+   * 
+ * + * Protobuf enum {@code google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes} + */ + public enum Amperes implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Amperes is unspecified.
+     * 
+ * + * AMPERES_UNSPECIFIED = 0; + */ + AMPERES_UNSPECIFIED(0), + /** + * + * + *
+     * 15A.
+     * 
+ * + * AMPERES_15 = 1; + */ + AMPERES_15(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Amperes is unspecified.
+     * 
+ * + * AMPERES_UNSPECIFIED = 0; + */ + public static final int AMPERES_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * 15A.
+     * 
+ * + * AMPERES_15 = 1; + */ + public static final int AMPERES_15_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Amperes 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 Amperes forNumber(int value) { + switch (value) { + case 0: + return AMPERES_UNSPECIFIED; + case 1: + return AMPERES_15; + 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 Amperes findValueByNumber(int number) { + return Amperes.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.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.getDescriptor() + .getEnumTypes() + .get(3); + } + + private static final Amperes[] VALUES = values(); + + public static Amperes 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 Amperes(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes) + } + + public static final int POWER_RECEPTACLE_FIELD_NUMBER = 1; + private int powerReceptacle_ = 0; + /** + * + * + *
+   * Required. The power receptacle type.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType power_receptacle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for powerReceptacle. + */ + @java.lang.Override + public int getPowerReceptacleValue() { + return powerReceptacle_; + } + /** + * + * + *
+   * Required. The power receptacle type.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType power_receptacle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The powerReceptacle. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType + getPowerReceptacle() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType + .forNumber(powerReceptacle_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType + .UNRECOGNIZED + : result; + } + + public static final int NETWORK_UPLINK_FIELD_NUMBER = 2; + private int networkUplink_ = 0; + /** + * + * + *
+   * Required. Type of the uplink network connection.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType network_uplink = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for networkUplink. + */ + @java.lang.Override + public int getNetworkUplinkValue() { + return networkUplink_; + } + /** + * + * + *
+   * Required. Type of the uplink network connection.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType network_uplink = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The networkUplink. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType + getNetworkUplink() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType + .forNumber(networkUplink_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType + .UNRECOGNIZED + : result; + } + + public static final int VOLTAGE_FIELD_NUMBER = 3; + private int voltage_ = 0; + /** + * + * + *
+   * Required. Voltage of the power supply.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage voltage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for voltage. + */ + @java.lang.Override + public int getVoltageValue() { + return voltage_; + } + /** + * + * + *
+   * Required. Voltage of the power supply.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage voltage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The voltage. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage getVoltage() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage.forNumber( + voltage_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage.UNRECOGNIZED + : result; + } + + public static final int AMPERES_FIELD_NUMBER = 4; + private int amperes_ = 0; + /** + * + * + *
+   * Required. Amperes of the power supply.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes amperes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for amperes. + */ + @java.lang.Override + public int getAmperesValue() { + return amperes_; + } + /** + * + * + *
+   * Required. Amperes of the power supply.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes amperes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The amperes. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes getAmperes() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes.forNumber( + amperes_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes.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 (powerReceptacle_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType + .POWER_RECEPTACLE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, powerReceptacle_); + } + if (networkUplink_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType + .NETWORK_UPLINK_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, networkUplink_); + } + if (voltage_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage + .VOLTAGE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, voltage_); + } + if (amperes_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes + .AMPERES_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, amperes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (powerReceptacle_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType + .POWER_RECEPTACLE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, powerReceptacle_); + } + if (networkUplink_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType + .NETWORK_UPLINK_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, networkUplink_); + } + if (voltage_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage + .VOLTAGE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, voltage_); + } + if (amperes_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes + .AMPERES_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, amperes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo other = + (com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo) obj; + + if (powerReceptacle_ != other.powerReceptacle_) return false; + if (networkUplink_ != other.networkUplink_) return false; + if (voltage_ != other.voltage_) return false; + if (amperes_ != other.amperes_) return false; + if (!getUnknownFields().equals(other.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) + POWER_RECEPTACLE_FIELD_NUMBER; + hash = (53 * hash) + powerReceptacle_; + hash = (37 * hash) + NETWORK_UPLINK_FIELD_NUMBER; + hash = (53 * hash) + networkUplink_; + hash = (37 * hash) + VOLTAGE_FIELD_NUMBER; + hash = (53 * hash) + voltage_; + hash = (37 * hash) + AMPERES_FIELD_NUMBER; + hash = (53 * hash) + amperes_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo 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.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + 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.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo 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.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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; + } + /** + * + * + *
+   * Physical properties of a hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo) + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwarePhysicalInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwarePhysicalInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.class, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + powerReceptacle_ = 0; + networkUplink_ = 0; + voltage_ = 0; + amperes_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwarePhysicalInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo build() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo result = + new com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.powerReceptacle_ = powerReceptacle_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.networkUplink_ = networkUplink_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.voltage_ = voltage_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.amperes_ = amperes_; + } + } + + @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.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + .getDefaultInstance()) return this; + if (other.powerReceptacle_ != 0) { + setPowerReceptacleValue(other.getPowerReceptacleValue()); + } + if (other.networkUplink_ != 0) { + setNetworkUplinkValue(other.getNetworkUplinkValue()); + } + if (other.voltage_ != 0) { + setVoltageValue(other.getVoltageValue()); + } + if (other.amperes_ != 0) { + setAmperesValue(other.getAmperesValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + powerReceptacle_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + networkUplink_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + voltage_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + amperes_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int powerReceptacle_ = 0; + /** + * + * + *
+     * Required. The power receptacle type.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType power_receptacle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for powerReceptacle. + */ + @java.lang.Override + public int getPowerReceptacleValue() { + return powerReceptacle_; + } + /** + * + * + *
+     * Required. The power receptacle type.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType power_receptacle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for powerReceptacle to set. + * @return This builder for chaining. + */ + public Builder setPowerReceptacleValue(int value) { + powerReceptacle_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The power receptacle type.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType power_receptacle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The powerReceptacle. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType + getPowerReceptacle() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType + result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + .PowerReceptacleType.forNumber(powerReceptacle_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The power receptacle type.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType power_receptacle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The powerReceptacle to set. + * @return This builder for chaining. + */ + public Builder setPowerReceptacle( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + powerReceptacle_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The power receptacle type.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType power_receptacle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPowerReceptacle() { + bitField0_ = (bitField0_ & ~0x00000001); + powerReceptacle_ = 0; + onChanged(); + return this; + } + + private int networkUplink_ = 0; + /** + * + * + *
+     * Required. Type of the uplink network connection.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType network_uplink = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for networkUplink. + */ + @java.lang.Override + public int getNetworkUplinkValue() { + return networkUplink_; + } + /** + * + * + *
+     * Required. Type of the uplink network connection.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType network_uplink = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for networkUplink to set. + * @return This builder for chaining. + */ + public Builder setNetworkUplinkValue(int value) { + networkUplink_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of the uplink network connection.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType network_uplink = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The networkUplink. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType + getNetworkUplink() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType + .forNumber(networkUplink_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Type of the uplink network connection.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType network_uplink = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The networkUplink to set. + * @return This builder for chaining. + */ + public Builder setNetworkUplink( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + networkUplink_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of the uplink network connection.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType network_uplink = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearNetworkUplink() { + bitField0_ = (bitField0_ & ~0x00000002); + networkUplink_ = 0; + onChanged(); + return this; + } + + private int voltage_ = 0; + /** + * + * + *
+     * Required. Voltage of the power supply.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage voltage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for voltage. + */ + @java.lang.Override + public int getVoltageValue() { + return voltage_; + } + /** + * + * + *
+     * Required. Voltage of the power supply.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage voltage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for voltage to set. + * @return This builder for chaining. + */ + public Builder setVoltageValue(int value) { + voltage_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Voltage of the power supply.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage voltage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The voltage. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage + getVoltage() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage.forNumber( + voltage_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Voltage of the power supply.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage voltage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The voltage to set. + * @return This builder for chaining. + */ + public Builder setVoltage( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + voltage_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Voltage of the power supply.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage voltage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearVoltage() { + bitField0_ = (bitField0_ & ~0x00000004); + voltage_ = 0; + onChanged(); + return this; + } + + private int amperes_ = 0; + /** + * + * + *
+     * Required. Amperes of the power supply.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes amperes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for amperes. + */ + @java.lang.Override + public int getAmperesValue() { + return amperes_; + } + /** + * + * + *
+     * Required. Amperes of the power supply.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes amperes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for amperes to set. + * @return This builder for chaining. + */ + public Builder setAmperesValue(int value) { + amperes_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Amperes of the power supply.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes amperes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The amperes. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes + getAmperes() { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes result = + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes.forNumber( + amperes_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Amperes of the power supply.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes amperes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The amperes to set. + * @return This builder for chaining. + */ + public Builder setAmperes( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + amperes_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Amperes of the power supply.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes amperes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearAmperes() { + bitField0_ = (bitField0_ & ~0x00000008); + amperes_ = 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.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HardwarePhysicalInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwarePhysicalInfoOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwarePhysicalInfoOrBuilder.java new file mode 100644 index 000000000000..036bb73d2711 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/HardwarePhysicalInfoOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface HardwarePhysicalInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The power receptacle type.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType power_receptacle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for powerReceptacle. + */ + int getPowerReceptacleValue(); + /** + * + * + *
+   * Required. The power receptacle type.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType power_receptacle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The powerReceptacle. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType + getPowerReceptacle(); + + /** + * + * + *
+   * Required. Type of the uplink network connection.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType network_uplink = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for networkUplink. + */ + int getNetworkUplinkValue(); + /** + * + * + *
+   * Required. Type of the uplink network connection.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType network_uplink = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The networkUplink. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType + getNetworkUplink(); + + /** + * + * + *
+   * Required. Voltage of the power supply.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage voltage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for voltage. + */ + int getVoltageValue(); + /** + * + * + *
+   * Required. Voltage of the power supply.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage voltage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The voltage. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage getVoltage(); + + /** + * + * + *
+   * Required. Amperes of the power supply.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes amperes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for amperes. + */ + int getAmperesValue(); + /** + * + * + *
+   * Required. Amperes of the power supply.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes amperes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The amperes. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes getAmperes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesRequest.java new file mode 100644 index 000000000000..ca454a286603 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesRequest.java @@ -0,0 +1,1313 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to list change log entries.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest} + */ +public final class ListChangeLogEntriesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest) + ListChangeLogEntriesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListChangeLogEntriesRequest.newBuilder() to construct. + private ListChangeLogEntriesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListChangeLogEntriesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListChangeLogEntriesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The order to list change log entries for.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The order to list change log entries for.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest) 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list change log entries.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The order to list change log entries for.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The order to list change log entries for.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The order to list change log entries for.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to list change log entries for.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to list change log entries for.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListChangeLogEntriesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesRequestOrBuilder.java new file mode 100644 index 000000000000..5a49c2ad079c --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListChangeLogEntriesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The order to list change log entries for.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The order to list change log entries for.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesResponse.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesResponse.java new file mode 100644 index 000000000000..e5da8d25add5 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesResponse.java @@ -0,0 +1,1493 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A list of change log entries.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse} + */ +public final class ListChangeLogEntriesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse) + ListChangeLogEntriesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListChangeLogEntriesResponse.newBuilder() to construct. + private ListChangeLogEntriesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListChangeLogEntriesResponse() { + changeLogEntries_ = 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 ListChangeLogEntriesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse.Builder + .class); + } + + public static final int CHANGE_LOG_ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + changeLogEntries_; + /** + * + * + *
+   * The list of change log entries.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + @java.lang.Override + public java.util.List + getChangeLogEntriesList() { + return changeLogEntries_; + } + /** + * + * + *
+   * The list of change log entries.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryOrBuilder> + getChangeLogEntriesOrBuilderList() { + return changeLogEntries_; + } + /** + * + * + *
+   * The list of change log entries.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + @java.lang.Override + public int getChangeLogEntriesCount() { + return changeLogEntries_.size(); + } + /** + * + * + *
+   * The list of change log entries.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry getChangeLogEntries( + int index) { + return changeLogEntries_.get(index); + } + /** + * + * + *
+   * The list of change log entries.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryOrBuilder + getChangeLogEntriesOrBuilder(int index) { + return changeLogEntries_.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 < changeLogEntries_.size(); i++) { + output.writeMessage(1, changeLogEntries_.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 < changeLogEntries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, changeLogEntries_.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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse) obj; + + if (!getChangeLogEntriesList().equals(other.getChangeLogEntriesList())) 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 (getChangeLogEntriesCount() > 0) { + hash = (37 * hash) + CHANGE_LOG_ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getChangeLogEntriesList().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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of change log entries.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse) + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (changeLogEntriesBuilder_ == null) { + changeLogEntries_ = java.util.Collections.emptyList(); + } else { + changeLogEntries_ = null; + changeLogEntriesBuilder_.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse result) { + if (changeLogEntriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + changeLogEntries_ = java.util.Collections.unmodifiableList(changeLogEntries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.changeLogEntries_ = changeLogEntries_; + } else { + result.changeLogEntries_ = changeLogEntriesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + .getDefaultInstance()) return this; + if (changeLogEntriesBuilder_ == null) { + if (!other.changeLogEntries_.isEmpty()) { + if (changeLogEntries_.isEmpty()) { + changeLogEntries_ = other.changeLogEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChangeLogEntriesIsMutable(); + changeLogEntries_.addAll(other.changeLogEntries_); + } + onChanged(); + } + } else { + if (!other.changeLogEntries_.isEmpty()) { + if (changeLogEntriesBuilder_.isEmpty()) { + changeLogEntriesBuilder_.dispose(); + changeLogEntriesBuilder_ = null; + changeLogEntries_ = other.changeLogEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + changeLogEntriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChangeLogEntriesFieldBuilder() + : null; + } else { + changeLogEntriesBuilder_.addAllMessages(other.changeLogEntries_); + } + } + } + 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.gdchardwaremanagement.v1alpha.ChangeLogEntry m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.parser(), + extensionRegistry); + if (changeLogEntriesBuilder_ == null) { + ensureChangeLogEntriesIsMutable(); + changeLogEntries_.add(m); + } else { + changeLogEntriesBuilder_.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 + changeLogEntries_ = java.util.Collections.emptyList(); + + private void ensureChangeLogEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + changeLogEntries_ = + new java.util.ArrayList( + changeLogEntries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryOrBuilder> + changeLogEntriesBuilder_; + + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public java.util.List + getChangeLogEntriesList() { + if (changeLogEntriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(changeLogEntries_); + } else { + return changeLogEntriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public int getChangeLogEntriesCount() { + if (changeLogEntriesBuilder_ == null) { + return changeLogEntries_.size(); + } else { + return changeLogEntriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry getChangeLogEntries( + int index) { + if (changeLogEntriesBuilder_ == null) { + return changeLogEntries_.get(index); + } else { + return changeLogEntriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public Builder setChangeLogEntries( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry value) { + if (changeLogEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeLogEntriesIsMutable(); + changeLogEntries_.set(index, value); + onChanged(); + } else { + changeLogEntriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public Builder setChangeLogEntries( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder builderForValue) { + if (changeLogEntriesBuilder_ == null) { + ensureChangeLogEntriesIsMutable(); + changeLogEntries_.set(index, builderForValue.build()); + onChanged(); + } else { + changeLogEntriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public Builder addChangeLogEntries( + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry value) { + if (changeLogEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeLogEntriesIsMutable(); + changeLogEntries_.add(value); + onChanged(); + } else { + changeLogEntriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public Builder addChangeLogEntries( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry value) { + if (changeLogEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeLogEntriesIsMutable(); + changeLogEntries_.add(index, value); + onChanged(); + } else { + changeLogEntriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public Builder addChangeLogEntries( + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder builderForValue) { + if (changeLogEntriesBuilder_ == null) { + ensureChangeLogEntriesIsMutable(); + changeLogEntries_.add(builderForValue.build()); + onChanged(); + } else { + changeLogEntriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public Builder addChangeLogEntries( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder builderForValue) { + if (changeLogEntriesBuilder_ == null) { + ensureChangeLogEntriesIsMutable(); + changeLogEntries_.add(index, builderForValue.build()); + onChanged(); + } else { + changeLogEntriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public Builder addAllChangeLogEntries( + java.lang.Iterable + values) { + if (changeLogEntriesBuilder_ == null) { + ensureChangeLogEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, changeLogEntries_); + onChanged(); + } else { + changeLogEntriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public Builder clearChangeLogEntries() { + if (changeLogEntriesBuilder_ == null) { + changeLogEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + changeLogEntriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public Builder removeChangeLogEntries(int index) { + if (changeLogEntriesBuilder_ == null) { + ensureChangeLogEntriesIsMutable(); + changeLogEntries_.remove(index); + onChanged(); + } else { + changeLogEntriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder + getChangeLogEntriesBuilder(int index) { + return getChangeLogEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryOrBuilder + getChangeLogEntriesOrBuilder(int index) { + if (changeLogEntriesBuilder_ == null) { + return changeLogEntries_.get(index); + } else { + return changeLogEntriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryOrBuilder> + getChangeLogEntriesOrBuilderList() { + if (changeLogEntriesBuilder_ != null) { + return changeLogEntriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(changeLogEntries_); + } + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder + addChangeLogEntriesBuilder() { + return getChangeLogEntriesFieldBuilder() + .addBuilder( + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.getDefaultInstance()); + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder + addChangeLogEntriesBuilder(int index) { + return getChangeLogEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.getDefaultInstance()); + } + /** + * + * + *
+     * The list of change log entries.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + public java.util.List + getChangeLogEntriesBuilderList() { + return getChangeLogEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryOrBuilder> + getChangeLogEntriesFieldBuilder() { + if (changeLogEntriesBuilder_ == null) { + changeLogEntriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryOrBuilder>( + changeLogEntries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + changeLogEntries_ = null; + } + return changeLogEntriesBuilder_; + } + + 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.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListChangeLogEntriesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesResponseOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesResponseOrBuilder.java new file mode 100644 index 000000000000..0a4b8f4cdd4d --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListChangeLogEntriesResponseOrBuilder.java @@ -0,0 +1,166 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListChangeLogEntriesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of change log entries.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + java.util.List + getChangeLogEntriesList(); + /** + * + * + *
+   * The list of change log entries.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry getChangeLogEntries(int index); + /** + * + * + *
+   * The list of change log entries.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + int getChangeLogEntriesCount(); + /** + * + * + *
+   * The list of change log entries.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + java.util.List + getChangeLogEntriesOrBuilderList(); + /** + * + * + *
+   * The list of change log entries.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry change_log_entries = 1; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryOrBuilder + getChangeLogEntriesOrBuilder(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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsRequest.java new file mode 100644 index 000000000000..01f37eb6e593 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsRequest.java @@ -0,0 +1,1301 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to list comments.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest} + */ +public final class ListCommentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest) + ListCommentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCommentsRequest.newBuilder() to construct. + private ListCommentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCommentsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCommentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The order to list comments on.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The order to list comments on.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListCommentsRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest) 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.gdchardwaremanagement.v1alpha.ListCommentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest 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.gdchardwaremanagement.v1alpha.ListCommentsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest + 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.gdchardwaremanagement.v1alpha.ListCommentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest 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.gdchardwaremanagement.v1alpha.ListCommentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list comments.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest 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.gdchardwaremanagement.v1alpha.ListCommentsRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The order to list comments on.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The order to list comments on.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The order to list comments on.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to list comments on.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to list comments on.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListCommentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCommentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsRequestOrBuilder.java new file mode 100644 index 000000000000..56162cf0af6b --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListCommentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The order to list comments on.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The order to list comments on.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsResponse.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsResponse.java new file mode 100644 index 000000000000..0ba1af7df5f1 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsResponse.java @@ -0,0 +1,1420 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to list comments.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse} + */ +public final class ListCommentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse) + ListCommentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCommentsResponse.newBuilder() to construct. + private ListCommentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCommentsResponse() { + comments_ = 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 ListCommentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse.Builder.class); + } + + public static final int COMMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List comments_; + /** + * + * + *
+   * The list of comments.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + @java.lang.Override + public java.util.List getCommentsList() { + return comments_; + } + /** + * + * + *
+   * The list of comments.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + @java.lang.Override + public java.util.List + getCommentsOrBuilderList() { + return comments_; + } + /** + * + * + *
+   * The list of comments.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + @java.lang.Override + public int getCommentsCount() { + return comments_.size(); + } + /** + * + * + *
+   * The list of comments.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment getComments(int index) { + return comments_.get(index); + } + /** + * + * + *
+   * The list of comments.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder getCommentsOrBuilder( + int index) { + return comments_.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 < comments_.size(); i++) { + output.writeMessage(1, comments_.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 < comments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, comments_.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.gdchardwaremanagement.v1alpha.ListCommentsResponse)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse) obj; + + if (!getCommentsList().equals(other.getCommentsList())) 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 (getCommentsCount() > 0) { + hash = (37 * hash) + COMMENTS_FIELD_NUMBER; + hash = (53 * hash) + getCommentsList().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.gdchardwaremanagement.v1alpha.ListCommentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse 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.gdchardwaremanagement.v1alpha.ListCommentsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse + 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.gdchardwaremanagement.v1alpha.ListCommentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse 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.gdchardwaremanagement.v1alpha.ListCommentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list comments.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse) + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (commentsBuilder_ == null) { + comments_ = java.util.Collections.emptyList(); + } else { + comments_ = null; + commentsBuilder_.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse result) { + if (commentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + comments_ = java.util.Collections.unmodifiableList(comments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.comments_ = comments_; + } else { + result.comments_ = commentsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse 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.gdchardwaremanagement.v1alpha.ListCommentsResponse) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse + .getDefaultInstance()) return this; + if (commentsBuilder_ == null) { + if (!other.comments_.isEmpty()) { + if (comments_.isEmpty()) { + comments_ = other.comments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCommentsIsMutable(); + comments_.addAll(other.comments_); + } + onChanged(); + } + } else { + if (!other.comments_.isEmpty()) { + if (commentsBuilder_.isEmpty()) { + commentsBuilder_.dispose(); + commentsBuilder_ = null; + comments_ = other.comments_; + bitField0_ = (bitField0_ & ~0x00000001); + commentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCommentsFieldBuilder() + : null; + } else { + commentsBuilder_.addAllMessages(other.comments_); + } + } + } + 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.gdchardwaremanagement.v1alpha.Comment m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.parser(), + extensionRegistry); + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + comments_.add(m); + } else { + commentsBuilder_.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 comments_ = + java.util.Collections.emptyList(); + + private void ensureCommentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + comments_ = + new java.util.ArrayList( + comments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Comment, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder> + commentsBuilder_; + + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public java.util.List + getCommentsList() { + if (commentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(comments_); + } else { + return commentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public int getCommentsCount() { + if (commentsBuilder_ == null) { + return comments_.size(); + } else { + return commentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment getComments(int index) { + if (commentsBuilder_ == null) { + return comments_.get(index); + } else { + return commentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public Builder setComments( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Comment value) { + if (commentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentsIsMutable(); + comments_.set(index, value); + onChanged(); + } else { + commentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public Builder setComments( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder builderForValue) { + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + comments_.set(index, builderForValue.build()); + onChanged(); + } else { + commentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public Builder addComments(com.google.cloud.gdchardwaremanagement.v1alpha.Comment value) { + if (commentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentsIsMutable(); + comments_.add(value); + onChanged(); + } else { + commentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public Builder addComments( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Comment value) { + if (commentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentsIsMutable(); + comments_.add(index, value); + onChanged(); + } else { + commentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public Builder addComments( + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder builderForValue) { + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + comments_.add(builderForValue.build()); + onChanged(); + } else { + commentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public Builder addComments( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder builderForValue) { + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + comments_.add(index, builderForValue.build()); + onChanged(); + } else { + commentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public Builder addAllComments( + java.lang.Iterable + values) { + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, comments_); + onChanged(); + } else { + commentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public Builder clearComments() { + if (commentsBuilder_ == null) { + comments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + commentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public Builder removeComments(int index) { + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + comments_.remove(index); + onChanged(); + } else { + commentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder getCommentsBuilder( + int index) { + return getCommentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder getCommentsOrBuilder( + int index) { + if (commentsBuilder_ == null) { + return comments_.get(index); + } else { + return commentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public java.util.List + getCommentsOrBuilderList() { + if (commentsBuilder_ != null) { + return commentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(comments_); + } + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder addCommentsBuilder() { + return getCommentsFieldBuilder() + .addBuilder(com.google.cloud.gdchardwaremanagement.v1alpha.Comment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder addCommentsBuilder( + int index) { + return getCommentsFieldBuilder() + .addBuilder( + index, com.google.cloud.gdchardwaremanagement.v1alpha.Comment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of comments.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + public java.util.List + getCommentsBuilderList() { + return getCommentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Comment, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder> + getCommentsFieldBuilder() { + if (commentsBuilder_ == null) { + commentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Comment, + com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder>( + comments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + comments_ = null; + } + return commentsBuilder_; + } + + 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.gdchardwaremanagement.v1alpha.ListCommentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCommentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsResponseOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsResponseOrBuilder.java new file mode 100644 index 000000000000..db8d2d7232da --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListCommentsResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListCommentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of comments.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + java.util.List getCommentsList(); + /** + * + * + *
+   * The list of comments.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Comment getComments(int index); + /** + * + * + *
+   * The list of comments.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + int getCommentsCount(); + /** + * + * + *
+   * The list of comments.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + java.util.List + getCommentsOrBuilderList(); + /** + * + * + *
+   * The list of comments.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Comment comments = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.CommentOrBuilder getCommentsOrBuilder(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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsRequest.java new file mode 100644 index 000000000000..c1190bda4a77 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsRequest.java @@ -0,0 +1,1306 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to list hardware groups.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest} + */ +public final class ListHardwareGroupsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest) + ListHardwareGroupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListHardwareGroupsRequest.newBuilder() to construct. + private ListHardwareGroupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListHardwareGroupsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListHardwareGroupsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The order to list hardware groups in.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The order to list hardware groups in.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest) 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest + 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list hardware groups.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The order to list hardware groups in.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The order to list hardware groups in.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The order to list hardware groups in.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to list hardware groups in.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to list hardware groups in.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHardwareGroupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsRequestOrBuilder.java new file mode 100644 index 000000000000..8a7739b9f498 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListHardwareGroupsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The order to list hardware groups in.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The order to list hardware groups in.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsResponse.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsResponse.java new file mode 100644 index 000000000000..0b6469c982b8 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsResponse.java @@ -0,0 +1,1464 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A list of hardware groups.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse} + */ +public final class ListHardwareGroupsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse) + ListHardwareGroupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListHardwareGroupsResponse.newBuilder() to construct. + private ListHardwareGroupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListHardwareGroupsResponse() { + hardwareGroups_ = 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 ListHardwareGroupsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse.Builder + .class); + } + + public static final int HARDWARE_GROUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + hardwareGroups_; + /** + * + * + *
+   * The list of hardware groups.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + @java.lang.Override + public java.util.List + getHardwareGroupsList() { + return hardwareGroups_; + } + /** + * + * + *
+   * The list of hardware groups.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder> + getHardwareGroupsOrBuilderList() { + return hardwareGroups_; + } + /** + * + * + *
+   * The list of hardware groups.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + @java.lang.Override + public int getHardwareGroupsCount() { + return hardwareGroups_.size(); + } + /** + * + * + *
+   * The list of hardware groups.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getHardwareGroups(int index) { + return hardwareGroups_.get(index); + } + /** + * + * + *
+   * The list of hardware groups.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder + getHardwareGroupsOrBuilder(int index) { + return hardwareGroups_.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 < hardwareGroups_.size(); i++) { + output.writeMessage(1, hardwareGroups_.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 < hardwareGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, hardwareGroups_.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.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse) obj; + + if (!getHardwareGroupsList().equals(other.getHardwareGroupsList())) 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 (getHardwareGroupsCount() > 0) { + hash = (37 * hash) + HARDWARE_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getHardwareGroupsList().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.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse + 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of hardware groups.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse) + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (hardwareGroupsBuilder_ == null) { + hardwareGroups_ = java.util.Collections.emptyList(); + } else { + hardwareGroups_ = null; + hardwareGroupsBuilder_.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse + buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse result) { + if (hardwareGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + hardwareGroups_ = java.util.Collections.unmodifiableList(hardwareGroups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.hardwareGroups_ = hardwareGroups_; + } else { + result.hardwareGroups_ = hardwareGroupsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse + .getDefaultInstance()) return this; + if (hardwareGroupsBuilder_ == null) { + if (!other.hardwareGroups_.isEmpty()) { + if (hardwareGroups_.isEmpty()) { + hardwareGroups_ = other.hardwareGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHardwareGroupsIsMutable(); + hardwareGroups_.addAll(other.hardwareGroups_); + } + onChanged(); + } + } else { + if (!other.hardwareGroups_.isEmpty()) { + if (hardwareGroupsBuilder_.isEmpty()) { + hardwareGroupsBuilder_.dispose(); + hardwareGroupsBuilder_ = null; + hardwareGroups_ = other.hardwareGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + hardwareGroupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHardwareGroupsFieldBuilder() + : null; + } else { + hardwareGroupsBuilder_.addAllMessages(other.hardwareGroups_); + } + } + } + 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.gdchardwaremanagement.v1alpha.HardwareGroup m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.parser(), + extensionRegistry); + if (hardwareGroupsBuilder_ == null) { + ensureHardwareGroupsIsMutable(); + hardwareGroups_.add(m); + } else { + hardwareGroupsBuilder_.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 + hardwareGroups_ = java.util.Collections.emptyList(); + + private void ensureHardwareGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + hardwareGroups_ = + new java.util.ArrayList( + hardwareGroups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder> + hardwareGroupsBuilder_; + + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public java.util.List + getHardwareGroupsList() { + if (hardwareGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(hardwareGroups_); + } else { + return hardwareGroupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public int getHardwareGroupsCount() { + if (hardwareGroupsBuilder_ == null) { + return hardwareGroups_.size(); + } else { + return hardwareGroupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getHardwareGroups( + int index) { + if (hardwareGroupsBuilder_ == null) { + return hardwareGroups_.get(index); + } else { + return hardwareGroupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public Builder setHardwareGroups( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup value) { + if (hardwareGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHardwareGroupsIsMutable(); + hardwareGroups_.set(index, value); + onChanged(); + } else { + hardwareGroupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public Builder setHardwareGroups( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder builderForValue) { + if (hardwareGroupsBuilder_ == null) { + ensureHardwareGroupsIsMutable(); + hardwareGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + hardwareGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public Builder addHardwareGroups( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup value) { + if (hardwareGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHardwareGroupsIsMutable(); + hardwareGroups_.add(value); + onChanged(); + } else { + hardwareGroupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public Builder addHardwareGroups( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup value) { + if (hardwareGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHardwareGroupsIsMutable(); + hardwareGroups_.add(index, value); + onChanged(); + } else { + hardwareGroupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public Builder addHardwareGroups( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder builderForValue) { + if (hardwareGroupsBuilder_ == null) { + ensureHardwareGroupsIsMutable(); + hardwareGroups_.add(builderForValue.build()); + onChanged(); + } else { + hardwareGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public Builder addHardwareGroups( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder builderForValue) { + if (hardwareGroupsBuilder_ == null) { + ensureHardwareGroupsIsMutable(); + hardwareGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + hardwareGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public Builder addAllHardwareGroups( + java.lang.Iterable + values) { + if (hardwareGroupsBuilder_ == null) { + ensureHardwareGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, hardwareGroups_); + onChanged(); + } else { + hardwareGroupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public Builder clearHardwareGroups() { + if (hardwareGroupsBuilder_ == null) { + hardwareGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + hardwareGroupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public Builder removeHardwareGroups(int index) { + if (hardwareGroupsBuilder_ == null) { + ensureHardwareGroupsIsMutable(); + hardwareGroups_.remove(index); + onChanged(); + } else { + hardwareGroupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder + getHardwareGroupsBuilder(int index) { + return getHardwareGroupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder + getHardwareGroupsOrBuilder(int index) { + if (hardwareGroupsBuilder_ == null) { + return hardwareGroups_.get(index); + } else { + return hardwareGroupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder> + getHardwareGroupsOrBuilderList() { + if (hardwareGroupsBuilder_ != null) { + return hardwareGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(hardwareGroups_); + } + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder + addHardwareGroupsBuilder() { + return getHardwareGroupsFieldBuilder() + .addBuilder( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance()); + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder + addHardwareGroupsBuilder(int index) { + return getHardwareGroupsFieldBuilder() + .addBuilder( + index, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance()); + } + /** + * + * + *
+     * The list of hardware groups.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + public java.util.List + getHardwareGroupsBuilderList() { + return getHardwareGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder> + getHardwareGroupsFieldBuilder() { + if (hardwareGroupsBuilder_ == null) { + hardwareGroupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder>( + hardwareGroups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + hardwareGroups_ = null; + } + return hardwareGroupsBuilder_; + } + + 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.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHardwareGroupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsResponseOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsResponseOrBuilder.java new file mode 100644 index 000000000000..5cc2c05821c7 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareGroupsResponseOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListHardwareGroupsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of hardware groups.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + java.util.List + getHardwareGroupsList(); + /** + * + * + *
+   * The list of hardware groups.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getHardwareGroups(int index); + /** + * + * + *
+   * The list of hardware groups.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + int getHardwareGroupsCount(); + /** + * + * + *
+   * The list of hardware groups.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + java.util.List + getHardwareGroupsOrBuilderList(); + /** + * + * + *
+   * The list of hardware groups.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_groups = 1; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder getHardwareGroupsOrBuilder( + 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareRequest.java new file mode 100644 index 000000000000..9f0b76c9475c --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareRequest.java @@ -0,0 +1,1301 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to list hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest} + */ +public final class ListHardwareRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest) + ListHardwareRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListHardwareRequest.newBuilder() to construct. + private ListHardwareRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListHardwareRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListHardwareRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The project and location to list hardware in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location to list hardware in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListHardwareRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest) 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.gdchardwaremanagement.v1alpha.ListHardwareRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest 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.gdchardwaremanagement.v1alpha.ListHardwareRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest + 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.gdchardwaremanagement.v1alpha.ListHardwareRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest 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.gdchardwaremanagement.v1alpha.ListHardwareRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest 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.gdchardwaremanagement.v1alpha.ListHardwareRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location to list hardware in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location to list hardware in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location to list hardware in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to list hardware in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to list hardware in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListHardwareRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHardwareRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareRequestOrBuilder.java new file mode 100644 index 000000000000..22dc358a38ba --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListHardwareRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to list hardware in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location to list hardware in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareResponse.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareResponse.java new file mode 100644 index 000000000000..a91b1624358a --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareResponse.java @@ -0,0 +1,1423 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A list of hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse} + */ +public final class ListHardwareResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse) + ListHardwareResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListHardwareResponse.newBuilder() to construct. + private ListHardwareResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListHardwareResponse() { + hardware_ = 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 ListHardwareResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse.Builder.class); + } + + public static final int HARDWARE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List hardware_; + /** + * + * + *
+   * The list of hardware.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + @java.lang.Override + public java.util.List getHardwareList() { + return hardware_; + } + /** + * + * + *
+   * The list of hardware.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + @java.lang.Override + public java.util.List + getHardwareOrBuilderList() { + return hardware_; + } + /** + * + * + *
+   * The list of hardware.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + @java.lang.Override + public int getHardwareCount() { + return hardware_.size(); + } + /** + * + * + *
+   * The list of hardware.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getHardware(int index) { + return hardware_.get(index); + } + /** + * + * + *
+   * The list of hardware.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder getHardwareOrBuilder( + int index) { + return hardware_.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 < hardware_.size(); i++) { + output.writeMessage(1, hardware_.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 < hardware_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, hardware_.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.gdchardwaremanagement.v1alpha.ListHardwareResponse)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse) obj; + + if (!getHardwareList().equals(other.getHardwareList())) 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 (getHardwareCount() > 0) { + hash = (37 * hash) + HARDWARE_FIELD_NUMBER; + hash = (53 * hash) + getHardwareList().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.gdchardwaremanagement.v1alpha.ListHardwareResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse 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.gdchardwaremanagement.v1alpha.ListHardwareResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse + 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.gdchardwaremanagement.v1alpha.ListHardwareResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse 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.gdchardwaremanagement.v1alpha.ListHardwareResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse) + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (hardwareBuilder_ == null) { + hardware_ = java.util.Collections.emptyList(); + } else { + hardware_ = null; + hardwareBuilder_.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse result) { + if (hardwareBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + hardware_ = java.util.Collections.unmodifiableList(hardware_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.hardware_ = hardware_; + } else { + result.hardware_ = hardwareBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse 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.gdchardwaremanagement.v1alpha.ListHardwareResponse) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse + .getDefaultInstance()) return this; + if (hardwareBuilder_ == null) { + if (!other.hardware_.isEmpty()) { + if (hardware_.isEmpty()) { + hardware_ = other.hardware_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHardwareIsMutable(); + hardware_.addAll(other.hardware_); + } + onChanged(); + } + } else { + if (!other.hardware_.isEmpty()) { + if (hardwareBuilder_.isEmpty()) { + hardwareBuilder_.dispose(); + hardwareBuilder_ = null; + hardware_ = other.hardware_; + bitField0_ = (bitField0_ & ~0x00000001); + hardwareBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHardwareFieldBuilder() + : null; + } else { + hardwareBuilder_.addAllMessages(other.hardware_); + } + } + } + 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.gdchardwaremanagement.v1alpha.Hardware m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.parser(), + extensionRegistry); + if (hardwareBuilder_ == null) { + ensureHardwareIsMutable(); + hardware_.add(m); + } else { + hardwareBuilder_.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 hardware_ = + java.util.Collections.emptyList(); + + private void ensureHardwareIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + hardware_ = + new java.util.ArrayList( + hardware_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder> + hardwareBuilder_; + + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public java.util.List + getHardwareList() { + if (hardwareBuilder_ == null) { + return java.util.Collections.unmodifiableList(hardware_); + } else { + return hardwareBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public int getHardwareCount() { + if (hardwareBuilder_ == null) { + return hardware_.size(); + } else { + return hardwareBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getHardware(int index) { + if (hardwareBuilder_ == null) { + return hardware_.get(index); + } else { + return hardwareBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public Builder setHardware( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Hardware value) { + if (hardwareBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHardwareIsMutable(); + hardware_.set(index, value); + onChanged(); + } else { + hardwareBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public Builder setHardware( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder builderForValue) { + if (hardwareBuilder_ == null) { + ensureHardwareIsMutable(); + hardware_.set(index, builderForValue.build()); + onChanged(); + } else { + hardwareBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public Builder addHardware(com.google.cloud.gdchardwaremanagement.v1alpha.Hardware value) { + if (hardwareBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHardwareIsMutable(); + hardware_.add(value); + onChanged(); + } else { + hardwareBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public Builder addHardware( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Hardware value) { + if (hardwareBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHardwareIsMutable(); + hardware_.add(index, value); + onChanged(); + } else { + hardwareBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public Builder addHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder builderForValue) { + if (hardwareBuilder_ == null) { + ensureHardwareIsMutable(); + hardware_.add(builderForValue.build()); + onChanged(); + } else { + hardwareBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public Builder addHardware( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder builderForValue) { + if (hardwareBuilder_ == null) { + ensureHardwareIsMutable(); + hardware_.add(index, builderForValue.build()); + onChanged(); + } else { + hardwareBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public Builder addAllHardware( + java.lang.Iterable + values) { + if (hardwareBuilder_ == null) { + ensureHardwareIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, hardware_); + onChanged(); + } else { + hardwareBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public Builder clearHardware() { + if (hardwareBuilder_ == null) { + hardware_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + hardwareBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public Builder removeHardware(int index) { + if (hardwareBuilder_ == null) { + ensureHardwareIsMutable(); + hardware_.remove(index); + onChanged(); + } else { + hardwareBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder getHardwareBuilder( + int index) { + return getHardwareFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder getHardwareOrBuilder( + int index) { + if (hardwareBuilder_ == null) { + return hardware_.get(index); + } else { + return hardwareBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder> + getHardwareOrBuilderList() { + if (hardwareBuilder_ != null) { + return hardwareBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(hardware_); + } + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder addHardwareBuilder() { + return getHardwareFieldBuilder() + .addBuilder(com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance()); + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder addHardwareBuilder( + int index) { + return getHardwareFieldBuilder() + .addBuilder( + index, com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance()); + } + /** + * + * + *
+     * The list of hardware.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + public java.util.List + getHardwareBuilderList() { + return getHardwareFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder> + getHardwareFieldBuilder() { + if (hardwareBuilder_ == null) { + hardwareBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder>( + hardware_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + hardware_ = null; + } + return hardwareBuilder_; + } + + 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.gdchardwaremanagement.v1alpha.ListHardwareResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHardwareResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareResponseOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareResponseOrBuilder.java new file mode 100644 index 000000000000..668babafa82b --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListHardwareResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListHardwareResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of hardware.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + java.util.List getHardwareList(); + /** + * + * + *
+   * The list of hardware.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getHardware(int index); + /** + * + * + *
+   * The list of hardware.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + int getHardwareCount(); + /** + * + * + *
+   * The list of hardware.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + java.util.List + getHardwareOrBuilderList(); + /** + * + * + *
+   * The list of hardware.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder getHardwareOrBuilder(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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersRequest.java new file mode 100644 index 000000000000..cd26b9408e37 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersRequest.java @@ -0,0 +1,1297 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to list orders.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest} + */ +public final class ListOrdersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest) + ListOrdersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOrdersRequest.newBuilder() to construct. + private ListOrdersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOrdersRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOrdersRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The project and location to list orders in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location to list orders in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListOrdersRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest) 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.gdchardwaremanagement.v1alpha.ListOrdersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest 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.gdchardwaremanagement.v1alpha.ListOrdersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest 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.gdchardwaremanagement.v1alpha.ListOrdersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest 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.gdchardwaremanagement.v1alpha.ListOrdersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list orders.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest 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.gdchardwaremanagement.v1alpha.ListOrdersRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location to list orders in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location to list orders in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location to list orders in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to list orders in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to list orders in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListOrdersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOrdersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersRequestOrBuilder.java new file mode 100644 index 000000000000..f61f856ed094 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListOrdersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to list orders in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location to list orders in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersResponse.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersResponse.java new file mode 100644 index 000000000000..39f3c9d41753 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersResponse.java @@ -0,0 +1,1415 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A list of orders.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse} + */ +public final class ListOrdersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse) + ListOrdersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOrdersResponse.newBuilder() to construct. + private ListOrdersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOrdersResponse() { + orders_ = 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 ListOrdersResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse.Builder.class); + } + + public static final int ORDERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List orders_; + /** + * + * + *
+   * The list of orders.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + @java.lang.Override + public java.util.List getOrdersList() { + return orders_; + } + /** + * + * + *
+   * The list of orders.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + @java.lang.Override + public java.util.List + getOrdersOrBuilderList() { + return orders_; + } + /** + * + * + *
+   * The list of orders.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + @java.lang.Override + public int getOrdersCount() { + return orders_.size(); + } + /** + * + * + *
+   * The list of orders.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order getOrders(int index) { + return orders_.get(index); + } + /** + * + * + *
+   * The list of orders.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder getOrdersOrBuilder( + int index) { + return orders_.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 < orders_.size(); i++) { + output.writeMessage(1, orders_.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 < orders_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, orders_.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.gdchardwaremanagement.v1alpha.ListOrdersResponse)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse) obj; + + if (!getOrdersList().equals(other.getOrdersList())) 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 (getOrdersCount() > 0) { + hash = (37 * hash) + ORDERS_FIELD_NUMBER; + hash = (53 * hash) + getOrdersList().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.gdchardwaremanagement.v1alpha.ListOrdersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse 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.gdchardwaremanagement.v1alpha.ListOrdersResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse + 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.gdchardwaremanagement.v1alpha.ListOrdersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse 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.gdchardwaremanagement.v1alpha.ListOrdersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of orders.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse) + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (ordersBuilder_ == null) { + orders_ = java.util.Collections.emptyList(); + } else { + orders_ = null; + ordersBuilder_.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse result) { + if (ordersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + orders_ = java.util.Collections.unmodifiableList(orders_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.orders_ = orders_; + } else { + result.orders_ = ordersBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse 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.gdchardwaremanagement.v1alpha.ListOrdersResponse) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse.getDefaultInstance()) + return this; + if (ordersBuilder_ == null) { + if (!other.orders_.isEmpty()) { + if (orders_.isEmpty()) { + orders_ = other.orders_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOrdersIsMutable(); + orders_.addAll(other.orders_); + } + onChanged(); + } + } else { + if (!other.orders_.isEmpty()) { + if (ordersBuilder_.isEmpty()) { + ordersBuilder_.dispose(); + ordersBuilder_ = null; + orders_ = other.orders_; + bitField0_ = (bitField0_ & ~0x00000001); + ordersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOrdersFieldBuilder() + : null; + } else { + ordersBuilder_.addAllMessages(other.orders_); + } + } + } + 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.gdchardwaremanagement.v1alpha.Order m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.Order.parser(), + extensionRegistry); + if (ordersBuilder_ == null) { + ensureOrdersIsMutable(); + orders_.add(m); + } else { + ordersBuilder_.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 orders_ = + java.util.Collections.emptyList(); + + private void ensureOrdersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + orders_ = + new java.util.ArrayList(orders_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Order, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder> + ordersBuilder_; + + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public java.util.List getOrdersList() { + if (ordersBuilder_ == null) { + return java.util.Collections.unmodifiableList(orders_); + } else { + return ordersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public int getOrdersCount() { + if (ordersBuilder_ == null) { + return orders_.size(); + } else { + return ordersBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Order getOrders(int index) { + if (ordersBuilder_ == null) { + return orders_.get(index); + } else { + return ordersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public Builder setOrders( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Order value) { + if (ordersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrdersIsMutable(); + orders_.set(index, value); + onChanged(); + } else { + ordersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public Builder setOrders( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder builderForValue) { + if (ordersBuilder_ == null) { + ensureOrdersIsMutable(); + orders_.set(index, builderForValue.build()); + onChanged(); + } else { + ordersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public Builder addOrders(com.google.cloud.gdchardwaremanagement.v1alpha.Order value) { + if (ordersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrdersIsMutable(); + orders_.add(value); + onChanged(); + } else { + ordersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public Builder addOrders( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Order value) { + if (ordersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrdersIsMutable(); + orders_.add(index, value); + onChanged(); + } else { + ordersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public Builder addOrders( + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder builderForValue) { + if (ordersBuilder_ == null) { + ensureOrdersIsMutable(); + orders_.add(builderForValue.build()); + onChanged(); + } else { + ordersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public Builder addOrders( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder builderForValue) { + if (ordersBuilder_ == null) { + ensureOrdersIsMutable(); + orders_.add(index, builderForValue.build()); + onChanged(); + } else { + ordersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public Builder addAllOrders( + java.lang.Iterable values) { + if (ordersBuilder_ == null) { + ensureOrdersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, orders_); + onChanged(); + } else { + ordersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public Builder clearOrders() { + if (ordersBuilder_ == null) { + orders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ordersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public Builder removeOrders(int index) { + if (ordersBuilder_ == null) { + ensureOrdersIsMutable(); + orders_.remove(index); + onChanged(); + } else { + ordersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder getOrdersBuilder( + int index) { + return getOrdersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder getOrdersOrBuilder( + int index) { + if (ordersBuilder_ == null) { + return orders_.get(index); + } else { + return ordersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public java.util.List + getOrdersOrBuilderList() { + if (ordersBuilder_ != null) { + return ordersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(orders_); + } + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder addOrdersBuilder() { + return getOrdersFieldBuilder() + .addBuilder(com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance()); + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder addOrdersBuilder( + int index) { + return getOrdersFieldBuilder() + .addBuilder( + index, com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance()); + } + /** + * + * + *
+     * The list of orders.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + public java.util.List + getOrdersBuilderList() { + return getOrdersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Order, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder> + getOrdersFieldBuilder() { + if (ordersBuilder_ == null) { + ordersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Order, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder>( + orders_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + orders_ = null; + } + return ordersBuilder_; + } + + 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.gdchardwaremanagement.v1alpha.ListOrdersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOrdersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersResponseOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersResponseOrBuilder.java new file mode 100644 index 000000000000..3da6c346a6fc --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListOrdersResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListOrdersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of orders.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + java.util.List getOrdersList(); + /** + * + * + *
+   * The list of orders.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Order getOrders(int index); + /** + * + * + *
+   * The list of orders.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + int getOrdersCount(); + /** + * + * + *
+   * The list of orders.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + java.util.List + getOrdersOrBuilderList(); + /** + * + * + *
+   * The list of orders.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Order orders = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder getOrdersOrBuilder(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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesRequest.java new file mode 100644 index 000000000000..59d484f086c2 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesRequest.java @@ -0,0 +1,1297 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to list sites.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest} + */ +public final class ListSitesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest) + ListSitesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSitesRequest.newBuilder() to construct. + private ListSitesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSitesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSitesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The project and location to list sites in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location to list sites in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListSitesRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest) 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.gdchardwaremanagement.v1alpha.ListSitesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest 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.gdchardwaremanagement.v1alpha.ListSitesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest 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.gdchardwaremanagement.v1alpha.ListSitesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest 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.gdchardwaremanagement.v1alpha.ListSitesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list sites.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest 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.gdchardwaremanagement.v1alpha.ListSitesRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location to list sites in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location to list sites in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location to list sites in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to list sites in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to list sites in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListSitesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSitesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesRequestOrBuilder.java new file mode 100644 index 000000000000..8128a32a0f0e --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListSitesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to list sites in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location to list sites in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesResponse.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesResponse.java new file mode 100644 index 000000000000..90616d96b4b1 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesResponse.java @@ -0,0 +1,1408 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A list of sites.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse} + */ +public final class ListSitesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse) + ListSitesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSitesResponse.newBuilder() to construct. + private ListSitesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSitesResponse() { + sites_ = 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 ListSitesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse.Builder.class); + } + + public static final int SITES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List sites_; + /** + * + * + *
+   * The list of sites.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + @java.lang.Override + public java.util.List getSitesList() { + return sites_; + } + /** + * + * + *
+   * The list of sites.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + @java.lang.Override + public java.util.List + getSitesOrBuilderList() { + return sites_; + } + /** + * + * + *
+   * The list of sites.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + @java.lang.Override + public int getSitesCount() { + return sites_.size(); + } + /** + * + * + *
+   * The list of sites.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Site getSites(int index) { + return sites_.get(index); + } + /** + * + * + *
+   * The list of sites.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder getSitesOrBuilder(int index) { + return sites_.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 < sites_.size(); i++) { + output.writeMessage(1, sites_.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 < sites_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sites_.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.gdchardwaremanagement.v1alpha.ListSitesResponse)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse) obj; + + if (!getSitesList().equals(other.getSitesList())) 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 (getSitesCount() > 0) { + hash = (37 * hash) + SITES_FIELD_NUMBER; + hash = (53 * hash) + getSitesList().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.gdchardwaremanagement.v1alpha.ListSitesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse 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.gdchardwaremanagement.v1alpha.ListSitesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse 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.gdchardwaremanagement.v1alpha.ListSitesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse 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.gdchardwaremanagement.v1alpha.ListSitesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of sites.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse) + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (sitesBuilder_ == null) { + sites_ = java.util.Collections.emptyList(); + } else { + sites_ = null; + sitesBuilder_.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse result) { + if (sitesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sites_ = java.util.Collections.unmodifiableList(sites_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sites_ = sites_; + } else { + result.sites_ = sitesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse 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.gdchardwaremanagement.v1alpha.ListSitesResponse) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse.getDefaultInstance()) + return this; + if (sitesBuilder_ == null) { + if (!other.sites_.isEmpty()) { + if (sites_.isEmpty()) { + sites_ = other.sites_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSitesIsMutable(); + sites_.addAll(other.sites_); + } + onChanged(); + } + } else { + if (!other.sites_.isEmpty()) { + if (sitesBuilder_.isEmpty()) { + sitesBuilder_.dispose(); + sitesBuilder_ = null; + sites_ = other.sites_; + bitField0_ = (bitField0_ & ~0x00000001); + sitesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSitesFieldBuilder() + : null; + } else { + sitesBuilder_.addAllMessages(other.sites_); + } + } + } + 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.gdchardwaremanagement.v1alpha.Site m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.Site.parser(), + extensionRegistry); + if (sitesBuilder_ == null) { + ensureSitesIsMutable(); + sites_.add(m); + } else { + sitesBuilder_.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 sites_ = + java.util.Collections.emptyList(); + + private void ensureSitesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sites_ = + new java.util.ArrayList(sites_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Site, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder> + sitesBuilder_; + + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public java.util.List getSitesList() { + if (sitesBuilder_ == null) { + return java.util.Collections.unmodifiableList(sites_); + } else { + return sitesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public int getSitesCount() { + if (sitesBuilder_ == null) { + return sites_.size(); + } else { + return sitesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Site getSites(int index) { + if (sitesBuilder_ == null) { + return sites_.get(index); + } else { + return sitesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public Builder setSites(int index, com.google.cloud.gdchardwaremanagement.v1alpha.Site value) { + if (sitesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSitesIsMutable(); + sites_.set(index, value); + onChanged(); + } else { + sitesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public Builder setSites( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder builderForValue) { + if (sitesBuilder_ == null) { + ensureSitesIsMutable(); + sites_.set(index, builderForValue.build()); + onChanged(); + } else { + sitesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public Builder addSites(com.google.cloud.gdchardwaremanagement.v1alpha.Site value) { + if (sitesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSitesIsMutable(); + sites_.add(value); + onChanged(); + } else { + sitesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public Builder addSites(int index, com.google.cloud.gdchardwaremanagement.v1alpha.Site value) { + if (sitesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSitesIsMutable(); + sites_.add(index, value); + onChanged(); + } else { + sitesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public Builder addSites( + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder builderForValue) { + if (sitesBuilder_ == null) { + ensureSitesIsMutable(); + sites_.add(builderForValue.build()); + onChanged(); + } else { + sitesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public Builder addSites( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder builderForValue) { + if (sitesBuilder_ == null) { + ensureSitesIsMutable(); + sites_.add(index, builderForValue.build()); + onChanged(); + } else { + sitesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public Builder addAllSites( + java.lang.Iterable values) { + if (sitesBuilder_ == null) { + ensureSitesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sites_); + onChanged(); + } else { + sitesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public Builder clearSites() { + if (sitesBuilder_ == null) { + sites_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sitesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public Builder removeSites(int index) { + if (sitesBuilder_ == null) { + ensureSitesIsMutable(); + sites_.remove(index); + onChanged(); + } else { + sitesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder getSitesBuilder(int index) { + return getSitesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder getSitesOrBuilder( + int index) { + if (sitesBuilder_ == null) { + return sites_.get(index); + } else { + return sitesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public java.util.List + getSitesOrBuilderList() { + if (sitesBuilder_ != null) { + return sitesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sites_); + } + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder addSitesBuilder() { + return getSitesFieldBuilder() + .addBuilder(com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance()); + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder addSitesBuilder(int index) { + return getSitesFieldBuilder() + .addBuilder( + index, com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance()); + } + /** + * + * + *
+     * The list of sites.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + public java.util.List + getSitesBuilderList() { + return getSitesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Site, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder> + getSitesFieldBuilder() { + if (sitesBuilder_ == null) { + sitesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Site, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder>( + sites_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sites_ = null; + } + return sitesBuilder_; + } + + 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.gdchardwaremanagement.v1alpha.ListSitesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSitesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesResponseOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesResponseOrBuilder.java new file mode 100644 index 000000000000..e965a957ff1e --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSitesResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListSitesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of sites.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + java.util.List getSitesList(); + /** + * + * + *
+   * The list of sites.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Site getSites(int index); + /** + * + * + *
+   * The list of sites.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + int getSitesCount(); + /** + * + * + *
+   * The list of sites.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + java.util.List + getSitesOrBuilderList(); + /** + * + * + *
+   * The list of sites.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Site sites = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder getSitesOrBuilder(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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusRequest.java new file mode 100644 index 000000000000..b0f03d3e991a --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusRequest.java @@ -0,0 +1,1296 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to list SKUs.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest} + */ +public final class ListSkusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest) + ListSkusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSkusRequest.newBuilder() to construct. + private ListSkusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSkusRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSkusRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The project and location to list SKUs in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location to list SKUs in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListSkusRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest) 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.gdchardwaremanagement.v1alpha.ListSkusRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest 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.gdchardwaremanagement.v1alpha.ListSkusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest 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.gdchardwaremanagement.v1alpha.ListSkusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest 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.gdchardwaremanagement.v1alpha.ListSkusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list SKUs.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest 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.gdchardwaremanagement.v1alpha.ListSkusRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location to list SKUs in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location to list SKUs in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location to list SKUs in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to list SKUs in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to list SKUs in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListSkusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSkusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusRequestOrBuilder.java new file mode 100644 index 000000000000..9cc0816c70e1 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListSkusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to list SKUs in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location to list SKUs in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusResponse.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusResponse.java new file mode 100644 index 000000000000..dda82a581792 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusResponse.java @@ -0,0 +1,1406 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A list of SKUs.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse} + */ +public final class ListSkusResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse) + ListSkusResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSkusResponse.newBuilder() to construct. + private ListSkusResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSkusResponse() { + skus_ = 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 ListSkusResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse.Builder.class); + } + + public static final int SKUS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List skus_; + /** + * + * + *
+   * The list of SKUs.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + @java.lang.Override + public java.util.List getSkusList() { + return skus_; + } + /** + * + * + *
+   * The list of SKUs.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + @java.lang.Override + public java.util.List + getSkusOrBuilderList() { + return skus_; + } + /** + * + * + *
+   * The list of SKUs.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + @java.lang.Override + public int getSkusCount() { + return skus_.size(); + } + /** + * + * + *
+   * The list of SKUs.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku getSkus(int index) { + return skus_.get(index); + } + /** + * + * + *
+   * The list of SKUs.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuOrBuilder getSkusOrBuilder(int index) { + return skus_.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 < skus_.size(); i++) { + output.writeMessage(1, skus_.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 < skus_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, skus_.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.gdchardwaremanagement.v1alpha.ListSkusResponse)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse) obj; + + if (!getSkusList().equals(other.getSkusList())) 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 (getSkusCount() > 0) { + hash = (37 * hash) + SKUS_FIELD_NUMBER; + hash = (53 * hash) + getSkusList().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.gdchardwaremanagement.v1alpha.ListSkusResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse 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.gdchardwaremanagement.v1alpha.ListSkusResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse 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.gdchardwaremanagement.v1alpha.ListSkusResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse 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.gdchardwaremanagement.v1alpha.ListSkusResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of SKUs.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse) + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (skusBuilder_ == null) { + skus_ = java.util.Collections.emptyList(); + } else { + skus_ = null; + skusBuilder_.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse result) { + if (skusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + skus_ = java.util.Collections.unmodifiableList(skus_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.skus_ = skus_; + } else { + result.skus_ = skusBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse 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.gdchardwaremanagement.v1alpha.ListSkusResponse) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse.getDefaultInstance()) + return this; + if (skusBuilder_ == null) { + if (!other.skus_.isEmpty()) { + if (skus_.isEmpty()) { + skus_ = other.skus_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSkusIsMutable(); + skus_.addAll(other.skus_); + } + onChanged(); + } + } else { + if (!other.skus_.isEmpty()) { + if (skusBuilder_.isEmpty()) { + skusBuilder_.dispose(); + skusBuilder_ = null; + skus_ = other.skus_; + bitField0_ = (bitField0_ & ~0x00000001); + skusBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSkusFieldBuilder() + : null; + } else { + skusBuilder_.addAllMessages(other.skus_); + } + } + } + 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.gdchardwaremanagement.v1alpha.Sku m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.parser(), + extensionRegistry); + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + skus_.add(m); + } else { + skusBuilder_.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 skus_ = + java.util.Collections.emptyList(); + + private void ensureSkusIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + skus_ = new java.util.ArrayList(skus_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Sku, + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuOrBuilder> + skusBuilder_; + + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public java.util.List getSkusList() { + if (skusBuilder_ == null) { + return java.util.Collections.unmodifiableList(skus_); + } else { + return skusBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public int getSkusCount() { + if (skusBuilder_ == null) { + return skus_.size(); + } else { + return skusBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku getSkus(int index) { + if (skusBuilder_ == null) { + return skus_.get(index); + } else { + return skusBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public Builder setSkus(int index, com.google.cloud.gdchardwaremanagement.v1alpha.Sku value) { + if (skusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkusIsMutable(); + skus_.set(index, value); + onChanged(); + } else { + skusBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public Builder setSkus( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder builderForValue) { + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + skus_.set(index, builderForValue.build()); + onChanged(); + } else { + skusBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public Builder addSkus(com.google.cloud.gdchardwaremanagement.v1alpha.Sku value) { + if (skusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkusIsMutable(); + skus_.add(value); + onChanged(); + } else { + skusBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public Builder addSkus(int index, com.google.cloud.gdchardwaremanagement.v1alpha.Sku value) { + if (skusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkusIsMutable(); + skus_.add(index, value); + onChanged(); + } else { + skusBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public Builder addSkus( + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder builderForValue) { + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + skus_.add(builderForValue.build()); + onChanged(); + } else { + skusBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public Builder addSkus( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder builderForValue) { + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + skus_.add(index, builderForValue.build()); + onChanged(); + } else { + skusBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public Builder addAllSkus( + java.lang.Iterable values) { + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, skus_); + onChanged(); + } else { + skusBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public Builder clearSkus() { + if (skusBuilder_ == null) { + skus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + skusBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public Builder removeSkus(int index) { + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + skus_.remove(index); + onChanged(); + } else { + skusBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder getSkusBuilder(int index) { + return getSkusFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuOrBuilder getSkusOrBuilder(int index) { + if (skusBuilder_ == null) { + return skus_.get(index); + } else { + return skusBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public java.util.List + getSkusOrBuilderList() { + if (skusBuilder_ != null) { + return skusBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(skus_); + } + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder addSkusBuilder() { + return getSkusFieldBuilder() + .addBuilder(com.google.cloud.gdchardwaremanagement.v1alpha.Sku.getDefaultInstance()); + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder addSkusBuilder(int index) { + return getSkusFieldBuilder() + .addBuilder( + index, com.google.cloud.gdchardwaremanagement.v1alpha.Sku.getDefaultInstance()); + } + /** + * + * + *
+     * The list of SKUs.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + public java.util.List + getSkusBuilderList() { + return getSkusFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Sku, + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuOrBuilder> + getSkusFieldBuilder() { + if (skusBuilder_ == null) { + skusBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Sku, + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuOrBuilder>( + skus_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + skus_ = null; + } + return skusBuilder_; + } + + 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.gdchardwaremanagement.v1alpha.ListSkusResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSkusResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusResponseOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusResponseOrBuilder.java new file mode 100644 index 000000000000..a268087080f6 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListSkusResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListSkusResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of SKUs.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + java.util.List getSkusList(); + /** + * + * + *
+   * The list of SKUs.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Sku getSkus(int index); + /** + * + * + *
+   * The list of SKUs.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + int getSkusCount(); + /** + * + * + *
+   * The list of SKUs.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + java.util.List + getSkusOrBuilderList(); + /** + * + * + *
+   * The list of SKUs.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Sku skus = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SkuOrBuilder getSkusOrBuilder(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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesRequest.java new file mode 100644 index 000000000000..88e4a9d8ae5d --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesRequest.java @@ -0,0 +1,1297 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to list zones.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest} + */ +public final class ListZonesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest) + ListZonesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListZonesRequest.newBuilder() to construct. + private ListZonesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListZonesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListZonesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The project and location to list zones in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The project and location to list zones in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListZonesRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest) 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.gdchardwaremanagement.v1alpha.ListZonesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest 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.gdchardwaremanagement.v1alpha.ListZonesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest 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.gdchardwaremanagement.v1alpha.ListZonesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest 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.gdchardwaremanagement.v1alpha.ListZonesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list zones.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest 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.gdchardwaremanagement.v1alpha.ListZonesRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The project and location to list zones in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The project and location to list zones in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The project and location to list zones in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to list zones in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The project and location to list zones in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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 condition. See [AIP-160](https://google.aip.dev/160).
+     * 
+ * + * 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.gdchardwaremanagement.v1alpha.ListZonesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListZonesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesRequestOrBuilder.java new file mode 100644 index 000000000000..4d208de00f9d --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListZonesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location to list zones in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The project and location to list zones in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * 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 condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160).
+   * 
+ * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesResponse.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesResponse.java new file mode 100644 index 000000000000..540913ba02be --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesResponse.java @@ -0,0 +1,1408 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A list of zones.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse} + */ +public final class ListZonesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse) + ListZonesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListZonesResponse.newBuilder() to construct. + private ListZonesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListZonesResponse() { + zones_ = 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 ListZonesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse.Builder.class); + } + + public static final int ZONES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List zones_; + /** + * + * + *
+   * The list of zones.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + @java.lang.Override + public java.util.List getZonesList() { + return zones_; + } + /** + * + * + *
+   * The list of zones.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + @java.lang.Override + public java.util.List + getZonesOrBuilderList() { + return zones_; + } + /** + * + * + *
+   * The list of zones.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + @java.lang.Override + public int getZonesCount() { + return zones_.size(); + } + /** + * + * + *
+   * The list of zones.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone getZones(int index) { + return zones_.get(index); + } + /** + * + * + *
+   * The list of zones.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder getZonesOrBuilder(int index) { + return zones_.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 < zones_.size(); i++) { + output.writeMessage(1, zones_.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 < zones_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, zones_.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.gdchardwaremanagement.v1alpha.ListZonesResponse)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse) obj; + + if (!getZonesList().equals(other.getZonesList())) 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 (getZonesCount() > 0) { + hash = (37 * hash) + ZONES_FIELD_NUMBER; + hash = (53 * hash) + getZonesList().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.gdchardwaremanagement.v1alpha.ListZonesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse 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.gdchardwaremanagement.v1alpha.ListZonesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse 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.gdchardwaremanagement.v1alpha.ListZonesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse 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.gdchardwaremanagement.v1alpha.ListZonesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of zones.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse) + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (zonesBuilder_ == null) { + zones_ = java.util.Collections.emptyList(); + } else { + zones_ = null; + zonesBuilder_.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse result) { + if (zonesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + zones_ = java.util.Collections.unmodifiableList(zones_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.zones_ = zones_; + } else { + result.zones_ = zonesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse 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.gdchardwaremanagement.v1alpha.ListZonesResponse) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse.getDefaultInstance()) + return this; + if (zonesBuilder_ == null) { + if (!other.zones_.isEmpty()) { + if (zones_.isEmpty()) { + zones_ = other.zones_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureZonesIsMutable(); + zones_.addAll(other.zones_); + } + onChanged(); + } + } else { + if (!other.zones_.isEmpty()) { + if (zonesBuilder_.isEmpty()) { + zonesBuilder_.dispose(); + zonesBuilder_ = null; + zones_ = other.zones_; + bitField0_ = (bitField0_ & ~0x00000001); + zonesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getZonesFieldBuilder() + : null; + } else { + zonesBuilder_.addAllMessages(other.zones_); + } + } + } + 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.gdchardwaremanagement.v1alpha.Zone m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.parser(), + extensionRegistry); + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.add(m); + } else { + zonesBuilder_.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 zones_ = + java.util.Collections.emptyList(); + + private void ensureZonesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + zones_ = + new java.util.ArrayList(zones_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Zone, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder> + zonesBuilder_; + + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public java.util.List getZonesList() { + if (zonesBuilder_ == null) { + return java.util.Collections.unmodifiableList(zones_); + } else { + return zonesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public int getZonesCount() { + if (zonesBuilder_ == null) { + return zones_.size(); + } else { + return zonesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone getZones(int index) { + if (zonesBuilder_ == null) { + return zones_.get(index); + } else { + return zonesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public Builder setZones(int index, com.google.cloud.gdchardwaremanagement.v1alpha.Zone value) { + if (zonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.set(index, value); + onChanged(); + } else { + zonesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public Builder setZones( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder builderForValue) { + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.set(index, builderForValue.build()); + onChanged(); + } else { + zonesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public Builder addZones(com.google.cloud.gdchardwaremanagement.v1alpha.Zone value) { + if (zonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.add(value); + onChanged(); + } else { + zonesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public Builder addZones(int index, com.google.cloud.gdchardwaremanagement.v1alpha.Zone value) { + if (zonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureZonesIsMutable(); + zones_.add(index, value); + onChanged(); + } else { + zonesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public Builder addZones( + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder builderForValue) { + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.add(builderForValue.build()); + onChanged(); + } else { + zonesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public Builder addZones( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder builderForValue) { + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.add(index, builderForValue.build()); + onChanged(); + } else { + zonesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public Builder addAllZones( + java.lang.Iterable values) { + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, zones_); + onChanged(); + } else { + zonesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public Builder clearZones() { + if (zonesBuilder_ == null) { + zones_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + zonesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public Builder removeZones(int index) { + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.remove(index); + onChanged(); + } else { + zonesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder getZonesBuilder(int index) { + return getZonesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder getZonesOrBuilder( + int index) { + if (zonesBuilder_ == null) { + return zones_.get(index); + } else { + return zonesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public java.util.List + getZonesOrBuilderList() { + if (zonesBuilder_ != null) { + return zonesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(zones_); + } + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder addZonesBuilder() { + return getZonesFieldBuilder() + .addBuilder(com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance()); + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder addZonesBuilder(int index) { + return getZonesFieldBuilder() + .addBuilder( + index, com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance()); + } + /** + * + * + *
+     * The list of zones.
+     * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + public java.util.List + getZonesBuilderList() { + return getZonesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Zone, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder> + getZonesFieldBuilder() { + if (zonesBuilder_ == null) { + zonesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Zone, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder>( + zones_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + zones_ = null; + } + return zonesBuilder_; + } + + 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.gdchardwaremanagement.v1alpha.ListZonesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListZonesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesResponseOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesResponseOrBuilder.java new file mode 100644 index 000000000000..6bbde7b6da55 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ListZonesResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ListZonesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of zones.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + java.util.List getZonesList(); + /** + * + * + *
+   * The list of zones.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Zone getZones(int index); + /** + * + * + *
+   * The list of zones.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + int getZonesCount(); + /** + * + * + *
+   * The list of zones.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + java.util.List + getZonesOrBuilderList(); + /** + * + * + *
+   * The list of zones.
+   * 
+ * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Zone zones = 1; + */ + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder getZonesOrBuilder(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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/LocationName.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/LocationName.java new file mode 100644 index 000000000000..5bcad270e26c --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OperationMetadata.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OperationMetadata.java new file mode 100644 index 000000000000..1a76e205595f --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OperationMetadata.java @@ -0,0 +1,1856 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Represents the metadata of a long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata.class, + com.google.cloud.gdchardwaremanagement.v1alpha.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. 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. 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 [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.gdchardwaremanagement.v1alpha.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata other = + (com.google.cloud.gdchardwaremanagement.v1alpha.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.gdchardwaremanagement.v1alpha.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.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.gdchardwaremanagement.v1alpha.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.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.gdchardwaremanagement.v1alpha.OperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.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.gdchardwaremanagement.v1alpha.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.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.gdchardwaremanagement.v1alpha.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.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.gdchardwaremanagement.v1alpha.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 a long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata) + com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata.class, + com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata build() { + com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata result = + new com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.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.gdchardwaremanagement.v1alpha.OperationMetadata) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.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. 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. 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. 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. 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. 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 [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 [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 [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.gdchardwaremanagement.v1alpha.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.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.gdchardwaremanagement.v1alpha.OperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OperationMetadataOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..fa904f8782d8 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OperationMetadataOrBuilder.java @@ -0,0 +1,219 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.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. The verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Output only. 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 [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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Order.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Order.java new file mode 100644 index 000000000000..73e2e28d43d7 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Order.java @@ -0,0 +1,5180 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * An order for GDC hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Order} + */ +public final class Order extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.Order) + OrderOrBuilder { + private static final long serialVersionUID = 0L; + // Use Order.newBuilder() to construct. + private Order(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Order() { + name_ = ""; + displayName_ = ""; + state_ = 0; + targetWorkloads_ = com.google.protobuf.LazyStringArrayList.emptyList(); + customerMotivation_ = ""; + regionCode_ = ""; + orderFormUri_ = ""; + type_ = 0; + billingId_ = ""; + existingHardware_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Order(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Order.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder.class); + } + + /** + * + * + *
+   * Valid states of an order.
+   * 
+ * + * Protobuf enum {@code google.cloud.gdchardwaremanagement.v1alpha.Order.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State of the order is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Order is being drafted by the customer and has not been submitted yet.
+     * 
+ * + * DRAFT = 1; + */ + DRAFT(1), + /** + * + * + *
+     * Order has been submitted to Google.
+     * 
+ * + * SUBMITTED = 2; + */ + SUBMITTED(2), + /** + * + * + *
+     * Order has been accepted by Google.
+     * 
+ * + * ACCEPTED = 3; + */ + ACCEPTED(3), + /** + * + * + *
+     * Order needs more information from the customer.
+     * 
+ * + * ADDITIONAL_INFO_NEEDED = 4; + */ + ADDITIONAL_INFO_NEEDED(4), + /** + * + * + *
+     * Google has initiated building hardware for the order.
+     * 
+ * + * BUILDING = 5; + */ + BUILDING(5), + /** + * + * + *
+     * The hardware has been built and is being shipped.
+     * 
+ * + * SHIPPING = 6; + */ + SHIPPING(6), + /** + * + * + *
+     * The hardware is being installed.
+     * 
+ * + * INSTALLING = 7; + */ + INSTALLING(7), + /** + * + * + *
+     * An error occurred in processing the order and customer intervention is
+     * required.
+     * 
+ * + * FAILED = 8; + */ + FAILED(8), + /** + * + * + *
+     * Order has been partially completed i.e., some hardware have been
+     * delivered and installed.
+     * 
+ * + * PARTIALLY_COMPLETED = 9; + */ + PARTIALLY_COMPLETED(9), + /** + * + * + *
+     * Order has been completed.
+     * 
+ * + * COMPLETED = 10; + */ + COMPLETED(10), + /** + * + * + *
+     * Order has been cancelled.
+     * 
+ * + * CANCELLED = 11; + */ + CANCELLED(11), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State of the order is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Order is being drafted by the customer and has not been submitted yet.
+     * 
+ * + * DRAFT = 1; + */ + public static final int DRAFT_VALUE = 1; + /** + * + * + *
+     * Order has been submitted to Google.
+     * 
+ * + * SUBMITTED = 2; + */ + public static final int SUBMITTED_VALUE = 2; + /** + * + * + *
+     * Order has been accepted by Google.
+     * 
+ * + * ACCEPTED = 3; + */ + public static final int ACCEPTED_VALUE = 3; + /** + * + * + *
+     * Order needs more information from the customer.
+     * 
+ * + * ADDITIONAL_INFO_NEEDED = 4; + */ + public static final int ADDITIONAL_INFO_NEEDED_VALUE = 4; + /** + * + * + *
+     * Google has initiated building hardware for the order.
+     * 
+ * + * BUILDING = 5; + */ + public static final int BUILDING_VALUE = 5; + /** + * + * + *
+     * The hardware has been built and is being shipped.
+     * 
+ * + * SHIPPING = 6; + */ + public static final int SHIPPING_VALUE = 6; + /** + * + * + *
+     * The hardware is being installed.
+     * 
+ * + * INSTALLING = 7; + */ + public static final int INSTALLING_VALUE = 7; + /** + * + * + *
+     * An error occurred in processing the order and customer intervention is
+     * required.
+     * 
+ * + * FAILED = 8; + */ + public static final int FAILED_VALUE = 8; + /** + * + * + *
+     * Order has been partially completed i.e., some hardware have been
+     * delivered and installed.
+     * 
+ * + * PARTIALLY_COMPLETED = 9; + */ + public static final int PARTIALLY_COMPLETED_VALUE = 9; + /** + * + * + *
+     * Order has been completed.
+     * 
+ * + * COMPLETED = 10; + */ + public static final int COMPLETED_VALUE = 10; + /** + * + * + *
+     * Order has been cancelled.
+     * 
+ * + * CANCELLED = 11; + */ + public static final int CANCELLED_VALUE = 11; + + 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 DRAFT; + case 2: + return SUBMITTED; + case 3: + return ACCEPTED; + case 4: + return ADDITIONAL_INFO_NEEDED; + case 5: + return BUILDING; + case 6: + return SHIPPING; + case 7: + return INSTALLING; + case 8: + return FAILED; + case 9: + return PARTIALLY_COMPLETED; + case 10: + return COMPLETED; + case 11: + return CANCELLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Order.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.gdchardwaremanagement.v1alpha.Order.State) + } + + /** + * + * + *
+   * Valid types of an Order.
+   * 
+ * + * Protobuf enum {@code google.cloud.gdchardwaremanagement.v1alpha.Order.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type of the order is unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Paid by the customer.
+     * 
+ * + * PAID = 1; + */ + PAID(1), + /** + * + * + *
+     * Proof of concept for the customer.
+     * 
+ * + * POC = 2; + */ + POC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Type of the order is unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Paid by the customer.
+     * 
+ * + * PAID = 1; + */ + public static final int PAID_VALUE = 1; + /** + * + * + *
+     * Proof of concept for the customer.
+     * 
+ * + * POC = 2; + */ + public static final int POC_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 Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return PAID; + case 2: + return POC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gdchardwaremanagement.v1alpha.Order.Type) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Name of this order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * 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 this order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * 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 = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. Display name of this order.
+   * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Display name of this order.
+   * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when this order was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Time when this order was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this order was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when this order was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Time when this order was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when this order was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_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 associated with this order as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this order as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels associated with this order as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this order as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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. State of this order. On order creation, state will be set to
+   * DRAFT.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.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. State of this order. On order creation, state will be set to
+   * DRAFT.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order.State getState() { + com.google.cloud.gdchardwaremanagement.v1alpha.Order.State result = + com.google.cloud.gdchardwaremanagement.v1alpha.Order.State.forNumber(state_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.State.UNRECOGNIZED + : result; + } + + public static final int ORGANIZATION_CONTACT_FIELD_NUMBER = 6; + private com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organizationContact_; + /** + * + * + *
+   * Required. Customer contact information.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the organizationContact field is set. + */ + @java.lang.Override + public boolean hasOrganizationContact() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Required. Customer contact information.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The organizationContact. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + getOrganizationContact() { + return organizationContact_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.getDefaultInstance() + : organizationContact_; + } + /** + * + * + *
+   * Required. Customer contact information.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder + getOrganizationContactOrBuilder() { + return organizationContact_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.getDefaultInstance() + : organizationContact_; + } + + public static final int TARGET_WORKLOADS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList targetWorkloads_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Customer specified workloads of interest targeted by this order.
+   * This must contain <= 20 elements and the length of each element must be <=
+   * 50 characters.
+   * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the targetWorkloads. + */ + public com.google.protobuf.ProtocolStringList getTargetWorkloadsList() { + return targetWorkloads_; + } + /** + * + * + *
+   * Optional. Customer specified workloads of interest targeted by this order.
+   * This must contain <= 20 elements and the length of each element must be <=
+   * 50 characters.
+   * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of targetWorkloads. + */ + public int getTargetWorkloadsCount() { + return targetWorkloads_.size(); + } + /** + * + * + *
+   * Optional. Customer specified workloads of interest targeted by this order.
+   * This must contain <= 20 elements and the length of each element must be <=
+   * 50 characters.
+   * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The targetWorkloads at the given index. + */ + public java.lang.String getTargetWorkloads(int index) { + return targetWorkloads_.get(index); + } + /** + * + * + *
+   * Optional. Customer specified workloads of interest targeted by this order.
+   * This must contain <= 20 elements and the length of each element must be <=
+   * 50 characters.
+   * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the targetWorkloads at the given index. + */ + public com.google.protobuf.ByteString getTargetWorkloadsBytes(int index) { + return targetWorkloads_.getByteString(index); + } + + public static final int CUSTOMER_MOTIVATION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object customerMotivation_ = ""; + /** + * + * + *
+   * Required. Information about the customer's motivation for this order. The
+   * length of this field must be <= 1000 characters.
+   * 
+ * + * string customer_motivation = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The customerMotivation. + */ + @java.lang.Override + public java.lang.String getCustomerMotivation() { + java.lang.Object ref = customerMotivation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerMotivation_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Information about the customer's motivation for this order. The
+   * length of this field must be <= 1000 characters.
+   * 
+ * + * string customer_motivation = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for customerMotivation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomerMotivationBytes() { + java.lang.Object ref = customerMotivation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerMotivation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULFILLMENT_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp fulfillmentTime_; + /** + * + * + *
+   * Required. Customer specified deadline by when this order should be
+   * fulfilled.
+   * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fulfillmentTime field is set. + */ + @java.lang.Override + public boolean hasFulfillmentTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Required. Customer specified deadline by when this order should be
+   * fulfilled.
+   * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fulfillmentTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getFulfillmentTime() { + return fulfillmentTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : fulfillmentTime_; + } + /** + * + * + *
+   * Required. Customer specified deadline by when this order should be
+   * fulfilled.
+   * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getFulfillmentTimeOrBuilder() { + return fulfillmentTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : fulfillmentTime_; + } + + public static final int REGION_CODE_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + /** + * + * + *
+   * Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this
+   * order will be deployed. For a list of valid CLDR region codes, see the
+   * [Language Subtag
+   * Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
+   * 
+ * + * string region_code = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + /** + * + * + *
+   * Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this
+   * order will be deployed. For a list of valid CLDR region codes, see the
+   * [Language Subtag
+   * Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
+   * 
+ * + * string region_code = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_FORM_URI_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderFormUri_ = ""; + /** + * + * + *
+   * Output only. Link to the order form.
+   * 
+ * + * string order_form_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The orderFormUri. + */ + @java.lang.Override + public java.lang.String getOrderFormUri() { + java.lang.Object ref = orderFormUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderFormUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Link to the order form.
+   * 
+ * + * string order_form_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for orderFormUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderFormUriBytes() { + java.lang.Object ref = orderFormUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderFormUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 12; + private int type_ = 0; + /** + * + * + *
+   * Output only. Type of this Order.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.Type type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Output only. Type of this Order.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.Type type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type getType() { + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type result = + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type.forNumber(type_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type.UNRECOGNIZED + : result; + } + + public static final int SUBMIT_TIME_FIELD_NUMBER = 14; + private com.google.protobuf.Timestamp submitTime_; + /** + * + * + *
+   * Output only. Time when the order was submitted. Is auto-populated to the
+   * current time when an order is submitted.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the submitTime field is set. + */ + @java.lang.Override + public boolean hasSubmitTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Output only. Time when the order was submitted. Is auto-populated to the
+   * current time when an order is submitted.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The submitTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSubmitTime() { + return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } + /** + * + * + *
+   * Output only. Time when the order was submitted. Is auto-populated to the
+   * current time when an order is submitted.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { + return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_; + } + + public static final int BILLING_ID_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object billingId_ = ""; + /** + * + * + *
+   * Required. The Google Cloud Billing ID to be charged for this order.
+   * 
+ * + * string billing_id = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The billingId. + */ + @java.lang.Override + public java.lang.String getBillingId() { + java.lang.Object ref = billingId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + billingId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Google Cloud Billing ID to be charged for this order.
+   * 
+ * + * string billing_id = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for billingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBillingIdBytes() { + java.lang.Object ref = billingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + billingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXISTING_HARDWARE_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private java.util.List + existingHardware_; + /** + * + * + *
+   * Optional. Existing hardware to be removed as part of this order.
+   * Note: any hardware removed will be recycled unless otherwise agreed.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getExistingHardwareList() { + return existingHardware_; + } + /** + * + * + *
+   * Optional. Existing hardware to be removed as part of this order.
+   * Note: any hardware removed will be recycled unless otherwise agreed.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationOrBuilder> + getExistingHardwareOrBuilderList() { + return existingHardware_; + } + /** + * + * + *
+   * Optional. Existing hardware to be removed as part of this order.
+   * Note: any hardware removed will be recycled unless otherwise agreed.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getExistingHardwareCount() { + return existingHardware_.size(); + } + /** + * + * + *
+   * Optional. Existing hardware to be removed as part of this order.
+   * Note: any hardware removed will be recycled unless otherwise agreed.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation getExistingHardware( + int index) { + return existingHardware_.get(index); + } + /** + * + * + *
+   * Optional. Existing hardware to be removed as part of this order.
+   * Note: any hardware removed will be recycled unless otherwise agreed.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationOrBuilder + getExistingHardwareOrBuilder(int index) { + return existingHardware_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (state_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Order.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getOrganizationContact()); + } + for (int i = 0; i < targetWorkloads_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, targetWorkloads_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customerMotivation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, customerMotivation_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(9, getFulfillmentTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, regionCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderFormUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, orderFormUri_); + } + if (type_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(12, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, displayName_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(14, getSubmitTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(billingId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, billingId_); + } + for (int i = 0; i < existingHardware_.size(); i++) { + output.writeMessage(16, existingHardware_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, 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.gdchardwaremanagement.v1alpha.Order.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOrganizationContact()); + } + { + int dataSize = 0; + for (int i = 0; i < targetWorkloads_.size(); i++) { + dataSize += computeStringSizeNoTag(targetWorkloads_.getRaw(i)); + } + size += dataSize; + size += 1 * getTargetWorkloadsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customerMotivation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, customerMotivation_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getFulfillmentTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, regionCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderFormUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, orderFormUri_); + } + if (type_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, displayName_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getSubmitTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(billingId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, billingId_); + } + for (int i = 0; i < existingHardware_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(16, existingHardware_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.Order)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.Order other = + (com.google.cloud.gdchardwaremanagement.v1alpha.Order) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (state_ != other.state_) return false; + if (hasOrganizationContact() != other.hasOrganizationContact()) return false; + if (hasOrganizationContact()) { + if (!getOrganizationContact().equals(other.getOrganizationContact())) return false; + } + if (!getTargetWorkloadsList().equals(other.getTargetWorkloadsList())) return false; + if (!getCustomerMotivation().equals(other.getCustomerMotivation())) return false; + if (hasFulfillmentTime() != other.hasFulfillmentTime()) return false; + if (hasFulfillmentTime()) { + if (!getFulfillmentTime().equals(other.getFulfillmentTime())) return false; + } + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (!getOrderFormUri().equals(other.getOrderFormUri())) return false; + if (type_ != other.type_) return false; + if (hasSubmitTime() != other.hasSubmitTime()) return false; + if (hasSubmitTime()) { + if (!getSubmitTime().equals(other.getSubmitTime())) return false; + } + if (!getBillingId().equals(other.getBillingId())) return false; + if (!getExistingHardwareList().equals(other.getExistingHardwareList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasOrganizationContact()) { + hash = (37 * hash) + ORGANIZATION_CONTACT_FIELD_NUMBER; + hash = (53 * hash) + getOrganizationContact().hashCode(); + } + if (getTargetWorkloadsCount() > 0) { + hash = (37 * hash) + TARGET_WORKLOADS_FIELD_NUMBER; + hash = (53 * hash) + getTargetWorkloadsList().hashCode(); + } + hash = (37 * hash) + CUSTOMER_MOTIVATION_FIELD_NUMBER; + hash = (53 * hash) + getCustomerMotivation().hashCode(); + if (hasFulfillmentTime()) { + hash = (37 * hash) + FULFILLMENT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getFulfillmentTime().hashCode(); + } + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + hash = (37 * hash) + ORDER_FORM_URI_FIELD_NUMBER; + hash = (53 * hash) + getOrderFormUri().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasSubmitTime()) { + hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSubmitTime().hashCode(); + } + hash = (37 * hash) + BILLING_ID_FIELD_NUMBER; + hash = (53 * hash) + getBillingId().hashCode(); + if (getExistingHardwareCount() > 0) { + hash = (37 * hash) + EXISTING_HARDWARE_FIELD_NUMBER; + hash = (53 * hash) + getExistingHardwareList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order 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.gdchardwaremanagement.v1alpha.Order parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order 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.gdchardwaremanagement.v1alpha.Order parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order 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.gdchardwaremanagement.v1alpha.Order prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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; + } + /** + * + * + *
+   * An order for GDC hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Order} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.Order) + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Order.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.Order.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(); + getOrganizationContactFieldBuilder(); + getFulfillmentTimeFieldBuilder(); + getSubmitTimeFieldBuilder(); + getExistingHardwareFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + state_ = 0; + organizationContact_ = null; + if (organizationContactBuilder_ != null) { + organizationContactBuilder_.dispose(); + organizationContactBuilder_ = null; + } + targetWorkloads_ = com.google.protobuf.LazyStringArrayList.emptyList(); + customerMotivation_ = ""; + fulfillmentTime_ = null; + if (fulfillmentTimeBuilder_ != null) { + fulfillmentTimeBuilder_.dispose(); + fulfillmentTimeBuilder_ = null; + } + regionCode_ = ""; + orderFormUri_ = ""; + type_ = 0; + submitTime_ = null; + if (submitTimeBuilder_ != null) { + submitTimeBuilder_.dispose(); + submitTimeBuilder_ = null; + } + billingId_ = ""; + if (existingHardwareBuilder_ == null) { + existingHardware_ = java.util.Collections.emptyList(); + } else { + existingHardware_ = null; + existingHardwareBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00008000); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order build() { + com.google.cloud.gdchardwaremanagement.v1alpha.Order result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.Order result = + new com.google.cloud.gdchardwaremanagement.v1alpha.Order(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.Order result) { + if (existingHardwareBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0)) { + existingHardware_ = java.util.Collections.unmodifiableList(existingHardware_); + bitField0_ = (bitField0_ & ~0x00008000); + } + result.existingHardware_ = existingHardware_; + } else { + result.existingHardware_ = existingHardwareBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.Order result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.organizationContact_ = + organizationContactBuilder_ == null + ? organizationContact_ + : organizationContactBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + targetWorkloads_.makeImmutable(); + result.targetWorkloads_ = targetWorkloads_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.customerMotivation_ = customerMotivation_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.fulfillmentTime_ = + fulfillmentTimeBuilder_ == null ? fulfillmentTime_ : fulfillmentTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.regionCode_ = regionCode_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.orderFormUri_ = orderFormUri_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.submitTime_ = submitTimeBuilder_ == null ? submitTime_ : submitTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.billingId_ = billingId_; + } + 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.gdchardwaremanagement.v1alpha.Order) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.Order) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.Order other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.Order.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.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasOrganizationContact()) { + mergeOrganizationContact(other.getOrganizationContact()); + } + if (!other.targetWorkloads_.isEmpty()) { + if (targetWorkloads_.isEmpty()) { + targetWorkloads_ = other.targetWorkloads_; + bitField0_ |= 0x00000080; + } else { + ensureTargetWorkloadsIsMutable(); + targetWorkloads_.addAll(other.targetWorkloads_); + } + onChanged(); + } + if (!other.getCustomerMotivation().isEmpty()) { + customerMotivation_ = other.customerMotivation_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasFulfillmentTime()) { + mergeFulfillmentTime(other.getFulfillmentTime()); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getOrderFormUri().isEmpty()) { + orderFormUri_ = other.orderFormUri_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasSubmitTime()) { + mergeSubmitTime(other.getSubmitTime()); + } + if (!other.getBillingId().isEmpty()) { + billingId_ = other.billingId_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (existingHardwareBuilder_ == null) { + if (!other.existingHardware_.isEmpty()) { + if (existingHardware_.isEmpty()) { + existingHardware_ = other.existingHardware_; + bitField0_ = (bitField0_ & ~0x00008000); + } else { + ensureExistingHardwareIsMutable(); + existingHardware_.addAll(other.existingHardware_); + } + onChanged(); + } + } else { + if (!other.existingHardware_.isEmpty()) { + if (existingHardwareBuilder_.isEmpty()) { + existingHardwareBuilder_.dispose(); + existingHardwareBuilder_ = null; + existingHardware_ = other.existingHardware_; + bitField0_ = (bitField0_ & ~0x00008000); + existingHardwareBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExistingHardwareFieldBuilder() + : null; + } else { + existingHardwareBuilder_.addAllMessages(other.existingHardware_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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_ |= 0x00000004; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 40: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 40 + case 50: + { + input.readMessage( + getOrganizationContactFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetWorkloadsIsMutable(); + targetWorkloads_.add(s); + break; + } // case 58 + case 66: + { + customerMotivation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 66 + case 74: + { + input.readMessage(getFulfillmentTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 74 + case 82: + { + regionCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 82 + case 90: + { + orderFormUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 90 + case 96: + { + type_ = input.readEnum(); + bitField0_ |= 0x00001000; + break; + } // case 96 + case 106: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 106 + case 114: + { + input.readMessage(getSubmitTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: + { + billingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: + { + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.parser(), + extensionRegistry); + if (existingHardwareBuilder_ == null) { + ensureExistingHardwareIsMutable(); + existingHardware_.add(m); + } else { + existingHardwareBuilder_.addMessage(m); + } + break; + } // case 130 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + 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 this order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * 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 this order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * 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 this order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * 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 this order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * 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 this order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. Display name of this order.
+     * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Display name of this order.
+     * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Display name of this order.
+     * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Display name of this order.
+     * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Display name of this order.
+     * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private 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. Time when this order was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Time when this order was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this order was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this order was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this order was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when this order was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this order was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this order was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this order was created.
+     * 
+ * + * + * .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. Time when this order was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Time when this order was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this order was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this order was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this order was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when this order was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this order was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this order was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when this order was last updated.
+     * 
+ * + * + * .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_ |= 0x00000010; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels associated with this order as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this order as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this order as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this order as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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_ & ~0x00000010); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels associated with this order as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this order as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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_ |= 0x00000010; + return this; + } + /** + * + * + *
+     * Optional. Labels associated with this order as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. State of this order. On order creation, state will be set to
+     * DRAFT.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.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. State of this order. On order creation, state will be set to
+     * DRAFT.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.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_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of this order. On order creation, state will be set to
+     * DRAFT.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order.State getState() { + com.google.cloud.gdchardwaremanagement.v1alpha.Order.State result = + com.google.cloud.gdchardwaremanagement.v1alpha.Order.State.forNumber(state_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. State of this order. On order creation, state will be set to
+     * DRAFT.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.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.gdchardwaremanagement.v1alpha.Order.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of this order. On order creation, state will be set to
+     * DRAFT.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organizationContact_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder> + organizationContactBuilder_; + /** + * + * + *
+     * Required. Customer contact information.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the organizationContact field is set. + */ + public boolean hasOrganizationContact() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Required. Customer contact information.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The organizationContact. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + getOrganizationContact() { + if (organizationContactBuilder_ == null) { + return organizationContact_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + .getDefaultInstance() + : organizationContact_; + } else { + return organizationContactBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Customer contact information.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOrganizationContact( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact value) { + if (organizationContactBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + organizationContact_ = value; + } else { + organizationContactBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Customer contact information.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOrganizationContact( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder + builderForValue) { + if (organizationContactBuilder_ == null) { + organizationContact_ = builderForValue.build(); + } else { + organizationContactBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Customer contact information.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOrganizationContact( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact value) { + if (organizationContactBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && organizationContact_ != null + && organizationContact_ + != com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + .getDefaultInstance()) { + getOrganizationContactBuilder().mergeFrom(value); + } else { + organizationContact_ = value; + } + } else { + organizationContactBuilder_.mergeFrom(value); + } + if (organizationContact_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Customer contact information.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOrganizationContact() { + bitField0_ = (bitField0_ & ~0x00000040); + organizationContact_ = null; + if (organizationContactBuilder_ != null) { + organizationContactBuilder_.dispose(); + organizationContactBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Customer contact information.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder + getOrganizationContactBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getOrganizationContactFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Customer contact information.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder + getOrganizationContactOrBuilder() { + if (organizationContactBuilder_ != null) { + return organizationContactBuilder_.getMessageOrBuilder(); + } else { + return organizationContact_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + .getDefaultInstance() + : organizationContact_; + } + } + /** + * + * + *
+     * Required. Customer contact information.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder> + getOrganizationContactFieldBuilder() { + if (organizationContactBuilder_ == null) { + organizationContactBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder>( + getOrganizationContact(), getParentForChildren(), isClean()); + organizationContact_ = null; + } + return organizationContactBuilder_; + } + + private com.google.protobuf.LazyStringArrayList targetWorkloads_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTargetWorkloadsIsMutable() { + if (!targetWorkloads_.isModifiable()) { + targetWorkloads_ = new com.google.protobuf.LazyStringArrayList(targetWorkloads_); + } + bitField0_ |= 0x00000080; + } + /** + * + * + *
+     * Optional. Customer specified workloads of interest targeted by this order.
+     * This must contain <= 20 elements and the length of each element must be <=
+     * 50 characters.
+     * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the targetWorkloads. + */ + public com.google.protobuf.ProtocolStringList getTargetWorkloadsList() { + targetWorkloads_.makeImmutable(); + return targetWorkloads_; + } + /** + * + * + *
+     * Optional. Customer specified workloads of interest targeted by this order.
+     * This must contain <= 20 elements and the length of each element must be <=
+     * 50 characters.
+     * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of targetWorkloads. + */ + public int getTargetWorkloadsCount() { + return targetWorkloads_.size(); + } + /** + * + * + *
+     * Optional. Customer specified workloads of interest targeted by this order.
+     * This must contain <= 20 elements and the length of each element must be <=
+     * 50 characters.
+     * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The targetWorkloads at the given index. + */ + public java.lang.String getTargetWorkloads(int index) { + return targetWorkloads_.get(index); + } + /** + * + * + *
+     * Optional. Customer specified workloads of interest targeted by this order.
+     * This must contain <= 20 elements and the length of each element must be <=
+     * 50 characters.
+     * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the targetWorkloads at the given index. + */ + public com.google.protobuf.ByteString getTargetWorkloadsBytes(int index) { + return targetWorkloads_.getByteString(index); + } + /** + * + * + *
+     * Optional. Customer specified workloads of interest targeted by this order.
+     * This must contain <= 20 elements and the length of each element must be <=
+     * 50 characters.
+     * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The targetWorkloads to set. + * @return This builder for chaining. + */ + public Builder setTargetWorkloads(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetWorkloadsIsMutable(); + targetWorkloads_.set(index, value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer specified workloads of interest targeted by this order.
+     * This must contain <= 20 elements and the length of each element must be <=
+     * 50 characters.
+     * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The targetWorkloads to add. + * @return This builder for chaining. + */ + public Builder addTargetWorkloads(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetWorkloadsIsMutable(); + targetWorkloads_.add(value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer specified workloads of interest targeted by this order.
+     * This must contain <= 20 elements and the length of each element must be <=
+     * 50 characters.
+     * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The targetWorkloads to add. + * @return This builder for chaining. + */ + public Builder addAllTargetWorkloads(java.lang.Iterable values) { + ensureTargetWorkloadsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetWorkloads_); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer specified workloads of interest targeted by this order.
+     * This must contain <= 20 elements and the length of each element must be <=
+     * 50 characters.
+     * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTargetWorkloads() { + targetWorkloads_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer specified workloads of interest targeted by this order.
+     * This must contain <= 20 elements and the length of each element must be <=
+     * 50 characters.
+     * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the targetWorkloads to add. + * @return This builder for chaining. + */ + public Builder addTargetWorkloadsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTargetWorkloadsIsMutable(); + targetWorkloads_.add(value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object customerMotivation_ = ""; + /** + * + * + *
+     * Required. Information about the customer's motivation for this order. The
+     * length of this field must be <= 1000 characters.
+     * 
+ * + * string customer_motivation = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The customerMotivation. + */ + public java.lang.String getCustomerMotivation() { + java.lang.Object ref = customerMotivation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerMotivation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Information about the customer's motivation for this order. The
+     * length of this field must be <= 1000 characters.
+     * 
+ * + * string customer_motivation = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for customerMotivation. + */ + public com.google.protobuf.ByteString getCustomerMotivationBytes() { + java.lang.Object ref = customerMotivation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerMotivation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Information about the customer's motivation for this order. The
+     * length of this field must be <= 1000 characters.
+     * 
+ * + * string customer_motivation = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The customerMotivation to set. + * @return This builder for chaining. + */ + public Builder setCustomerMotivation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + customerMotivation_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Information about the customer's motivation for this order. The
+     * length of this field must be <= 1000 characters.
+     * 
+ * + * string customer_motivation = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCustomerMotivation() { + customerMotivation_ = getDefaultInstance().getCustomerMotivation(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Information about the customer's motivation for this order. The
+     * length of this field must be <= 1000 characters.
+     * 
+ * + * string customer_motivation = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for customerMotivation to set. + * @return This builder for chaining. + */ + public Builder setCustomerMotivationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + customerMotivation_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp fulfillmentTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + fulfillmentTimeBuilder_; + /** + * + * + *
+     * Required. Customer specified deadline by when this order should be
+     * fulfilled.
+     * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fulfillmentTime field is set. + */ + public boolean hasFulfillmentTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Required. Customer specified deadline by when this order should be
+     * fulfilled.
+     * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fulfillmentTime. + */ + public com.google.protobuf.Timestamp getFulfillmentTime() { + if (fulfillmentTimeBuilder_ == null) { + return fulfillmentTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : fulfillmentTime_; + } else { + return fulfillmentTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Customer specified deadline by when this order should be
+     * fulfilled.
+     * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFulfillmentTime(com.google.protobuf.Timestamp value) { + if (fulfillmentTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fulfillmentTime_ = value; + } else { + fulfillmentTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Customer specified deadline by when this order should be
+     * fulfilled.
+     * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFulfillmentTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (fulfillmentTimeBuilder_ == null) { + fulfillmentTime_ = builderForValue.build(); + } else { + fulfillmentTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Customer specified deadline by when this order should be
+     * fulfilled.
+     * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFulfillmentTime(com.google.protobuf.Timestamp value) { + if (fulfillmentTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && fulfillmentTime_ != null + && fulfillmentTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getFulfillmentTimeBuilder().mergeFrom(value); + } else { + fulfillmentTime_ = value; + } + } else { + fulfillmentTimeBuilder_.mergeFrom(value); + } + if (fulfillmentTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Customer specified deadline by when this order should be
+     * fulfilled.
+     * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFulfillmentTime() { + bitField0_ = (bitField0_ & ~0x00000200); + fulfillmentTime_ = null; + if (fulfillmentTimeBuilder_ != null) { + fulfillmentTimeBuilder_.dispose(); + fulfillmentTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Customer specified deadline by when this order should be
+     * fulfilled.
+     * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getFulfillmentTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getFulfillmentTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Customer specified deadline by when this order should be
+     * fulfilled.
+     * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getFulfillmentTimeOrBuilder() { + if (fulfillmentTimeBuilder_ != null) { + return fulfillmentTimeBuilder_.getMessageOrBuilder(); + } else { + return fulfillmentTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : fulfillmentTime_; + } + } + /** + * + * + *
+     * Required. Customer specified deadline by when this order should be
+     * fulfilled.
+     * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getFulfillmentTimeFieldBuilder() { + if (fulfillmentTimeBuilder_ == null) { + fulfillmentTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getFulfillmentTime(), getParentForChildren(), isClean()); + fulfillmentTime_ = null; + } + return fulfillmentTimeBuilder_; + } + + private java.lang.Object regionCode_ = ""; + /** + * + * + *
+     * Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this
+     * order will be deployed. For a list of valid CLDR region codes, see the
+     * [Language Subtag
+     * Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
+     * 
+ * + * string region_code = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this
+     * order will be deployed. For a list of valid CLDR region codes, see the
+     * [Language Subtag
+     * Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
+     * 
+ * + * string region_code = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this
+     * order will be deployed. For a list of valid CLDR region codes, see the
+     * [Language Subtag
+     * Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
+     * 
+ * + * string region_code = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this
+     * order will be deployed. For a list of valid CLDR region codes, see the
+     * [Language Subtag
+     * Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
+     * 
+ * + * string region_code = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this
+     * order will be deployed. For a list of valid CLDR region codes, see the
+     * [Language Subtag
+     * Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
+     * 
+ * + * string region_code = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object orderFormUri_ = ""; + /** + * + * + *
+     * Output only. Link to the order form.
+     * 
+ * + * string order_form_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The orderFormUri. + */ + public java.lang.String getOrderFormUri() { + java.lang.Object ref = orderFormUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderFormUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Link to the order form.
+     * 
+ * + * string order_form_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for orderFormUri. + */ + public com.google.protobuf.ByteString getOrderFormUriBytes() { + java.lang.Object ref = orderFormUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderFormUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Link to the order form.
+     * 
+ * + * string order_form_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The orderFormUri to set. + * @return This builder for chaining. + */ + public Builder setOrderFormUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderFormUri_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Link to the order form.
+     * 
+ * + * string order_form_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearOrderFormUri() { + orderFormUri_ = getDefaultInstance().getOrderFormUri(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Link to the order form.
+     * 
+ * + * string order_form_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for orderFormUri to set. + * @return This builder for chaining. + */ + public Builder setOrderFormUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderFormUri_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Output only. Type of this Order.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.Type type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Output only. Type of this Order.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.Type type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of this Order.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.Type type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type getType() { + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type result = + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type.forNumber(type_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Type of this Order.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.Type type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of this Order.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.Type type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00001000); + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp submitTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + submitTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the order was submitted. Is auto-populated to the
+     * current time when an order is submitted.
+     * 
+ * + * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the submitTime field is set. + */ + public boolean hasSubmitTime() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Output only. Time when the order was submitted. Is auto-populated to the
+     * current time when an order is submitted.
+     * 
+ * + * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The submitTime. + */ + public com.google.protobuf.Timestamp getSubmitTime() { + if (submitTimeBuilder_ == null) { + return submitTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : submitTime_; + } else { + return submitTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the order was submitted. Is auto-populated to the
+     * current time when an order is submitted.
+     * 
+ * + * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSubmitTime(com.google.protobuf.Timestamp value) { + if (submitTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + submitTime_ = value; + } else { + submitTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the order was submitted. Is auto-populated to the
+     * current time when an order is submitted.
+     * 
+ * + * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSubmitTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (submitTimeBuilder_ == null) { + submitTime_ = builderForValue.build(); + } else { + submitTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the order was submitted. Is auto-populated to the
+     * current time when an order is submitted.
+     * 
+ * + * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSubmitTime(com.google.protobuf.Timestamp value) { + if (submitTimeBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && submitTime_ != null + && submitTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSubmitTimeBuilder().mergeFrom(value); + } else { + submitTime_ = value; + } + } else { + submitTimeBuilder_.mergeFrom(value); + } + if (submitTime_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the order was submitted. Is auto-populated to the
+     * current time when an order is submitted.
+     * 
+ * + * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSubmitTime() { + bitField0_ = (bitField0_ & ~0x00002000); + submitTime_ = null; + if (submitTimeBuilder_ != null) { + submitTimeBuilder_.dispose(); + submitTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the order was submitted. Is auto-populated to the
+     * current time when an order is submitted.
+     * 
+ * + * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getSubmitTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the order was submitted. Is auto-populated to the
+     * current time when an order is submitted.
+     * 
+ * + * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { + if (submitTimeBuilder_ != null) { + return submitTimeBuilder_.getMessageOrBuilder(); + } else { + return submitTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : submitTime_; + } + } + /** + * + * + *
+     * Output only. Time when the order was submitted. Is auto-populated to the
+     * current time when an order is submitted.
+     * 
+ * + * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getSubmitTimeFieldBuilder() { + if (submitTimeBuilder_ == null) { + submitTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getSubmitTime(), getParentForChildren(), isClean()); + submitTime_ = null; + } + return submitTimeBuilder_; + } + + private java.lang.Object billingId_ = ""; + /** + * + * + *
+     * Required. The Google Cloud Billing ID to be charged for this order.
+     * 
+ * + * string billing_id = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The billingId. + */ + public java.lang.String getBillingId() { + java.lang.Object ref = billingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + billingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Google Cloud Billing ID to be charged for this order.
+     * 
+ * + * string billing_id = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for billingId. + */ + public com.google.protobuf.ByteString getBillingIdBytes() { + java.lang.Object ref = billingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + billingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Google Cloud Billing ID to be charged for this order.
+     * 
+ * + * string billing_id = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The billingId to set. + * @return This builder for chaining. + */ + public Builder setBillingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + billingId_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Google Cloud Billing ID to be charged for this order.
+     * 
+ * + * string billing_id = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBillingId() { + billingId_ = getDefaultInstance().getBillingId(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Google Cloud Billing ID to be charged for this order.
+     * 
+ * + * string billing_id = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for billingId to set. + * @return This builder for chaining. + */ + public Builder setBillingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + billingId_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private java.util.List + existingHardware_ = java.util.Collections.emptyList(); + + private void ensureExistingHardwareIsMutable() { + if (!((bitField0_ & 0x00008000) != 0)) { + existingHardware_ = + new java.util.ArrayList< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation>(existingHardware_); + bitField0_ |= 0x00008000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationOrBuilder> + existingHardwareBuilder_; + + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getExistingHardwareList() { + if (existingHardwareBuilder_ == null) { + return java.util.Collections.unmodifiableList(existingHardware_); + } else { + return existingHardwareBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getExistingHardwareCount() { + if (existingHardwareBuilder_ == null) { + return existingHardware_.size(); + } else { + return existingHardwareBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation getExistingHardware( + int index) { + if (existingHardwareBuilder_ == null) { + return existingHardware_.get(index); + } else { + return existingHardwareBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExistingHardware( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation value) { + if (existingHardwareBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExistingHardwareIsMutable(); + existingHardware_.set(index, value); + onChanged(); + } else { + existingHardwareBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExistingHardware( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder builderForValue) { + if (existingHardwareBuilder_ == null) { + ensureExistingHardwareIsMutable(); + existingHardware_.set(index, builderForValue.build()); + onChanged(); + } else { + existingHardwareBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExistingHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation value) { + if (existingHardwareBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExistingHardwareIsMutable(); + existingHardware_.add(value); + onChanged(); + } else { + existingHardwareBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExistingHardware( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation value) { + if (existingHardwareBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExistingHardwareIsMutable(); + existingHardware_.add(index, value); + onChanged(); + } else { + existingHardwareBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExistingHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder builderForValue) { + if (existingHardwareBuilder_ == null) { + ensureExistingHardwareIsMutable(); + existingHardware_.add(builderForValue.build()); + onChanged(); + } else { + existingHardwareBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addExistingHardware( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder builderForValue) { + if (existingHardwareBuilder_ == null) { + ensureExistingHardwareIsMutable(); + existingHardware_.add(index, builderForValue.build()); + onChanged(); + } else { + existingHardwareBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllExistingHardware( + java.lang.Iterable< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation> + values) { + if (existingHardwareBuilder_ == null) { + ensureExistingHardwareIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, existingHardware_); + onChanged(); + } else { + existingHardwareBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExistingHardware() { + if (existingHardwareBuilder_ == null) { + existingHardware_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + } else { + existingHardwareBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeExistingHardware(int index) { + if (existingHardwareBuilder_ == null) { + ensureExistingHardwareIsMutable(); + existingHardware_.remove(index); + onChanged(); + } else { + existingHardwareBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder + getExistingHardwareBuilder(int index) { + return getExistingHardwareFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationOrBuilder + getExistingHardwareOrBuilder(int index) { + if (existingHardwareBuilder_ == null) { + return existingHardware_.get(index); + } else { + return existingHardwareBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationOrBuilder> + getExistingHardwareOrBuilderList() { + if (existingHardwareBuilder_ != null) { + return existingHardwareBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(existingHardware_); + } + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder + addExistingHardwareBuilder() { + return getExistingHardwareFieldBuilder() + .addBuilder( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder + addExistingHardwareBuilder(int index) { + return getExistingHardwareFieldBuilder() + .addBuilder( + index, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Existing hardware to be removed as part of this order.
+     * Note: any hardware removed will be recycled unless otherwise agreed.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getExistingHardwareBuilderList() { + return getExistingHardwareFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationOrBuilder> + getExistingHardwareFieldBuilder() { + if (existingHardwareBuilder_ == null) { + existingHardwareBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationOrBuilder>( + existingHardware_, + ((bitField0_ & 0x00008000) != 0), + getParentForChildren(), + isClean()); + existingHardware_ = null; + } + return existingHardwareBuilder_; + } + + @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.gdchardwaremanagement.v1alpha.Order) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.Order) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.Order DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.Order(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Order getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Order parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrderName.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrderName.java new file mode 100644 index 000000000000..446ec849dd39 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrderName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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 OrderName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ORDER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/orders/{order}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String order; + + @Deprecated + protected OrderName() { + project = null; + location = null; + order = null; + } + + private OrderName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + order = Preconditions.checkNotNull(builder.getOrder()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOrder() { + return order; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OrderName of(String project, String location, String order) { + return newBuilder().setProject(project).setLocation(location).setOrder(order).build(); + } + + public static String format(String project, String location, String order) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setOrder(order) + .build() + .toString(); + } + + public static OrderName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ORDER.validatedMatch( + formattedString, "OrderName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("order")); + } + + 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 (OrderName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ORDER.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 (order != null) { + fieldMapBuilder.put("order", order); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ORDER.instantiate( + "project", project, "location", location, "order", order); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + OrderName that = ((OrderName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.order, that.order); + } + 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(order); + return h; + } + + /** Builder for projects/{project}/locations/{location}/orders/{order}. */ + public static class Builder { + private String project; + private String location; + private String order; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOrder() { + return order; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setOrder(String order) { + this.order = order; + return this; + } + + private Builder(OrderName orderName) { + this.project = orderName.project; + this.location = orderName.location; + this.order = orderName.order; + } + + public OrderName build() { + return new OrderName(this); + } + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrderOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrderOrBuilder.java new file mode 100644 index 000000000000..e44f28f3e2cf --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrderOrBuilder.java @@ -0,0 +1,645 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface OrderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.Order) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of this order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Name of this order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Display name of this order.
+   * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. Display name of this order.
+   * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. Time when this order was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this order was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this order was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when this order was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when this order was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when this order was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels associated with this order as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels associated with this order as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this order as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels associated with this order as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this order as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. State of this order. On order creation, state will be set to
+   * DRAFT.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. State of this order. On order creation, state will be set to
+   * DRAFT.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Order.State getState(); + + /** + * + * + *
+   * Required. Customer contact information.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the organizationContact field is set. + */ + boolean hasOrganizationContact(); + /** + * + * + *
+   * Required. Customer contact information.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The organizationContact. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact getOrganizationContact(); + /** + * + * + *
+   * Required. Customer contact information.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder + getOrganizationContactOrBuilder(); + + /** + * + * + *
+   * Optional. Customer specified workloads of interest targeted by this order.
+   * This must contain <= 20 elements and the length of each element must be <=
+   * 50 characters.
+   * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the targetWorkloads. + */ + java.util.List getTargetWorkloadsList(); + /** + * + * + *
+   * Optional. Customer specified workloads of interest targeted by this order.
+   * This must contain <= 20 elements and the length of each element must be <=
+   * 50 characters.
+   * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of targetWorkloads. + */ + int getTargetWorkloadsCount(); + /** + * + * + *
+   * Optional. Customer specified workloads of interest targeted by this order.
+   * This must contain <= 20 elements and the length of each element must be <=
+   * 50 characters.
+   * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The targetWorkloads at the given index. + */ + java.lang.String getTargetWorkloads(int index); + /** + * + * + *
+   * Optional. Customer specified workloads of interest targeted by this order.
+   * This must contain <= 20 elements and the length of each element must be <=
+   * 50 characters.
+   * 
+ * + * repeated string target_workloads = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the targetWorkloads at the given index. + */ + com.google.protobuf.ByteString getTargetWorkloadsBytes(int index); + + /** + * + * + *
+   * Required. Information about the customer's motivation for this order. The
+   * length of this field must be <= 1000 characters.
+   * 
+ * + * string customer_motivation = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The customerMotivation. + */ + java.lang.String getCustomerMotivation(); + /** + * + * + *
+   * Required. Information about the customer's motivation for this order. The
+   * length of this field must be <= 1000 characters.
+   * 
+ * + * string customer_motivation = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for customerMotivation. + */ + com.google.protobuf.ByteString getCustomerMotivationBytes(); + + /** + * + * + *
+   * Required. Customer specified deadline by when this order should be
+   * fulfilled.
+   * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fulfillmentTime field is set. + */ + boolean hasFulfillmentTime(); + /** + * + * + *
+   * Required. Customer specified deadline by when this order should be
+   * fulfilled.
+   * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fulfillmentTime. + */ + com.google.protobuf.Timestamp getFulfillmentTime(); + /** + * + * + *
+   * Required. Customer specified deadline by when this order should be
+   * fulfilled.
+   * 
+ * + * + * .google.protobuf.Timestamp fulfillment_time = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getFulfillmentTimeOrBuilder(); + + /** + * + * + *
+   * Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this
+   * order will be deployed. For a list of valid CLDR region codes, see the
+   * [Language Subtag
+   * Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
+   * 
+ * + * string region_code = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + /** + * + * + *
+   * Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this
+   * order will be deployed. For a list of valid CLDR region codes, see the
+   * [Language Subtag
+   * Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
+   * 
+ * + * string region_code = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); + + /** + * + * + *
+   * Output only. Link to the order form.
+   * 
+ * + * string order_form_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The orderFormUri. + */ + java.lang.String getOrderFormUri(); + /** + * + * + *
+   * Output only. Link to the order form.
+   * 
+ * + * string order_form_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for orderFormUri. + */ + com.google.protobuf.ByteString getOrderFormUriBytes(); + + /** + * + * + *
+   * Output only. Type of this Order.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.Type type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Output only. Type of this Order.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order.Type type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Type getType(); + + /** + * + * + *
+   * Output only. Time when the order was submitted. Is auto-populated to the
+   * current time when an order is submitted.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the submitTime field is set. + */ + boolean hasSubmitTime(); + /** + * + * + *
+   * Output only. Time when the order was submitted. Is auto-populated to the
+   * current time when an order is submitted.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The submitTime. + */ + com.google.protobuf.Timestamp getSubmitTime(); + /** + * + * + *
+   * Output only. Time when the order was submitted. Is auto-populated to the
+   * current time when an order is submitted.
+   * 
+ * + * .google.protobuf.Timestamp submit_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder(); + + /** + * + * + *
+   * Required. The Google Cloud Billing ID to be charged for this order.
+   * 
+ * + * string billing_id = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The billingId. + */ + java.lang.String getBillingId(); + /** + * + * + *
+   * Required. The Google Cloud Billing ID to be charged for this order.
+   * 
+ * + * string billing_id = 15 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for billingId. + */ + com.google.protobuf.ByteString getBillingIdBytes(); + + /** + * + * + *
+   * Optional. Existing hardware to be removed as part of this order.
+   * Note: any hardware removed will be recycled unless otherwise agreed.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getExistingHardwareList(); + /** + * + * + *
+   * Optional. Existing hardware to be removed as part of this order.
+   * Note: any hardware removed will be recycled unless otherwise agreed.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation getExistingHardware(int index); + /** + * + * + *
+   * Optional. Existing hardware to be removed as part of this order.
+   * Note: any hardware removed will be recycled unless otherwise agreed.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getExistingHardwareCount(); + /** + * + * + *
+   * Optional. Existing hardware to be removed as part of this order.
+   * Note: any hardware removed will be recycled unless otherwise agreed.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getExistingHardwareOrBuilderList(); + /** + * + * + *
+   * Optional. Existing hardware to be removed as part of this order.
+   * Note: any hardware removed will be recycled unless otherwise agreed.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation existing_hardware = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationOrBuilder + getExistingHardwareOrBuilder(int index); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrganizationContact.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrganizationContact.java new file mode 100644 index 000000000000..88808eb962dc --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrganizationContact.java @@ -0,0 +1,1675 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Contact information of the customer organization.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact} + */ +public final class OrganizationContact extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact) + OrganizationContactOrBuilder { + private static final long serialVersionUID = 0L; + // Use OrganizationContact.newBuilder() to construct. + private OrganizationContact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OrganizationContact() { + email_ = ""; + phone_ = ""; + contacts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OrganizationContact(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_OrganizationContact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_OrganizationContact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.class, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder.class); + } + + private int bitField0_; + public static final int ADDRESS_FIELD_NUMBER = 1; + private com.google.type.PostalAddress address_; + /** + * + * + *
+   * Required. The organization's address.
+   * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the address field is set. + */ + @java.lang.Override + public boolean hasAddress() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The organization's address.
+   * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The address. + */ + @java.lang.Override + public com.google.type.PostalAddress getAddress() { + return address_ == null ? com.google.type.PostalAddress.getDefaultInstance() : address_; + } + /** + * + * + *
+   * Required. The organization's address.
+   * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getAddressOrBuilder() { + return address_ == null ? com.google.type.PostalAddress.getDefaultInstance() : address_; + } + + public static final int EMAIL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object email_ = ""; + /** + * + * + *
+   * Optional. The organization's email.
+   * 
+ * + * string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The organization's email.
+   * 
+ * + * string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHONE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object phone_ = ""; + /** + * + * + *
+   * Optional. The organization's phone number.
+   * 
+ * + * string phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The phone. + */ + @java.lang.Override + public java.lang.String getPhone() { + java.lang.Object ref = phone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phone_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The organization's phone number.
+   * 
+ * + * string phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for phone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPhoneBytes() { + java.lang.Object ref = phone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTACTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List contacts_; + /** + * + * + *
+   * Required. The individual points of contact in the organization at this
+   * location.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getContactsList() { + return contacts_; + } + /** + * + * + *
+   * Required. The individual points of contact in the organization at this
+   * location.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getContactsOrBuilderList() { + return contacts_; + } + /** + * + * + *
+   * Required. The individual points of contact in the organization at this
+   * location.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getContactsCount() { + return contacts_.size(); + } + /** + * + * + *
+   * Required. The individual points of contact in the organization at this
+   * location.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact getContacts(int index) { + return contacts_.get(index); + } + /** + * + * + *
+   * Required. The individual points of contact in the organization at this
+   * location.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder getContactsOrBuilder( + int index) { + return contacts_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAddress()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, email_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, phone_); + } + for (int i = 0; i < contacts_.size(); i++) { + output.writeMessage(4, contacts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAddress()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, email_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, phone_); + } + for (int i = 0; i < contacts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, contacts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact other = + (com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact) obj; + + if (hasAddress() != other.hasAddress()) return false; + if (hasAddress()) { + if (!getAddress().equals(other.getAddress())) return false; + } + if (!getEmail().equals(other.getEmail())) return false; + if (!getPhone().equals(other.getPhone())) return false; + if (!getContactsList().equals(other.getContactsList())) return false; + if (!getUnknownFields().equals(other.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 (hasAddress()) { + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + } + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (37 * hash) + PHONE_FIELD_NUMBER; + hash = (53 * hash) + getPhone().hashCode(); + if (getContactsCount() > 0) { + hash = (37 * hash) + CONTACTS_FIELD_NUMBER; + hash = (53 * hash) + getContactsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact 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.gdchardwaremanagement.v1alpha.OrganizationContact + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + 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.gdchardwaremanagement.v1alpha.OrganizationContact parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact 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.gdchardwaremanagement.v1alpha.OrganizationContact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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; + } + /** + * + * + *
+   * Contact information of the customer organization.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact) + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_OrganizationContact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_OrganizationContact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.class, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAddressFieldBuilder(); + getContactsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + address_ = null; + if (addressBuilder_ != null) { + addressBuilder_.dispose(); + addressBuilder_ = null; + } + email_ = ""; + phone_ = ""; + if (contactsBuilder_ == null) { + contacts_ = java.util.Collections.emptyList(); + } else { + contacts_ = null; + contactsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_OrganizationContact_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact build() { + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact result = + new com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact result) { + if (contactsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + contacts_ = java.util.Collections.unmodifiableList(contacts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.contacts_ = contacts_; + } else { + result.contacts_ = contactsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.address_ = addressBuilder_ == null ? address_ : addressBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.email_ = email_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.phone_ = phone_; + } + 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.gdchardwaremanagement.v1alpha.OrganizationContact) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + .getDefaultInstance()) return this; + if (other.hasAddress()) { + mergeAddress(other.getAddress()); + } + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPhone().isEmpty()) { + phone_ = other.phone_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (contactsBuilder_ == null) { + if (!other.contacts_.isEmpty()) { + if (contacts_.isEmpty()) { + contacts_ = other.contacts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureContactsIsMutable(); + contacts_.addAll(other.contacts_); + } + onChanged(); + } + } else { + if (!other.contacts_.isEmpty()) { + if (contactsBuilder_.isEmpty()) { + contactsBuilder_.dispose(); + contactsBuilder_ = null; + contacts_ = other.contacts_; + bitField0_ = (bitField0_ & ~0x00000008); + contactsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContactsFieldBuilder() + : null; + } else { + contactsBuilder_.addAllMessages(other.contacts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(getAddressFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + email_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + phone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.gdchardwaremanagement.v1alpha.Contact m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.parser(), + extensionRegistry); + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(m); + } else { + contactsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.PostalAddress address_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + addressBuilder_; + /** + * + * + *
+     * Required. The organization's address.
+     * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the address field is set. + */ + public boolean hasAddress() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The organization's address.
+     * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The address. + */ + public com.google.type.PostalAddress getAddress() { + if (addressBuilder_ == null) { + return address_ == null ? com.google.type.PostalAddress.getDefaultInstance() : address_; + } else { + return addressBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The organization's address.
+     * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAddress(com.google.type.PostalAddress value) { + if (addressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + address_ = value; + } else { + addressBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The organization's address.
+     * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAddress(com.google.type.PostalAddress.Builder builderForValue) { + if (addressBuilder_ == null) { + address_ = builderForValue.build(); + } else { + addressBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The organization's address.
+     * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAddress(com.google.type.PostalAddress value) { + if (addressBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && address_ != null + && address_ != com.google.type.PostalAddress.getDefaultInstance()) { + getAddressBuilder().mergeFrom(value); + } else { + address_ = value; + } + } else { + addressBuilder_.mergeFrom(value); + } + if (address_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The organization's address.
+     * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAddress() { + bitField0_ = (bitField0_ & ~0x00000001); + address_ = null; + if (addressBuilder_ != null) { + addressBuilder_.dispose(); + addressBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The organization's address.
+     * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.PostalAddress.Builder getAddressBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAddressFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The organization's address.
+     * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.PostalAddressOrBuilder getAddressOrBuilder() { + if (addressBuilder_ != null) { + return addressBuilder_.getMessageOrBuilder(); + } else { + return address_ == null ? com.google.type.PostalAddress.getDefaultInstance() : address_; + } + } + /** + * + * + *
+     * Required. The organization's address.
+     * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + getAddressFieldBuilder() { + if (addressBuilder_ == null) { + addressBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder>( + getAddress(), getParentForChildren(), isClean()); + address_ = null; + } + return addressBuilder_; + } + + private java.lang.Object email_ = ""; + /** + * + * + *
+     * Optional. The organization's email.
+     * 
+ * + * string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The organization's email.
+     * 
+ * + * string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for email. + */ + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The organization's email.
+     * 
+ * + * string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + email_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The organization's email.
+     * 
+ * + * string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEmail() { + email_ = getDefaultInstance().getEmail(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The organization's email.
+     * 
+ * + * string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + email_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object phone_ = ""; + /** + * + * + *
+     * Optional. The organization's phone number.
+     * 
+ * + * string phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The phone. + */ + public java.lang.String getPhone() { + java.lang.Object ref = phone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The organization's phone number.
+     * 
+ * + * string phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for phone. + */ + public com.google.protobuf.ByteString getPhoneBytes() { + java.lang.Object ref = phone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The organization's phone number.
+     * 
+ * + * string phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The phone to set. + * @return This builder for chaining. + */ + public Builder setPhone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + phone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The organization's phone number.
+     * 
+ * + * string phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPhone() { + phone_ = getDefaultInstance().getPhone(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The organization's phone number.
+     * 
+ * + * string phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for phone to set. + * @return This builder for chaining. + */ + public Builder setPhoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + phone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List contacts_ = + java.util.Collections.emptyList(); + + private void ensureContactsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + contacts_ = + new java.util.ArrayList( + contacts_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Contact, + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder> + contactsBuilder_; + + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getContactsList() { + if (contactsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contacts_); + } else { + return contactsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getContactsCount() { + if (contactsBuilder_ == null) { + return contacts_.size(); + } else { + return contactsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact getContacts(int index) { + if (contactsBuilder_ == null) { + return contacts_.get(index); + } else { + return contactsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setContacts( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.set(index, value); + onChanged(); + } else { + contactsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setContacts( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.set(index, builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContacts(com.google.cloud.gdchardwaremanagement.v1alpha.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.add(value); + onChanged(); + } else { + contactsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContacts( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.add(index, value); + onChanged(); + } else { + contactsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContacts( + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContacts( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(index, builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllContacts( + java.lang.Iterable + values) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contacts_); + onChanged(); + } else { + contactsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearContacts() { + if (contactsBuilder_ == null) { + contacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + contactsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeContacts(int index) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.remove(index); + onChanged(); + } else { + contactsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder getContactsBuilder( + int index) { + return getContactsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder getContactsOrBuilder( + int index) { + if (contactsBuilder_ == null) { + return contacts_.get(index); + } else { + return contactsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getContactsOrBuilderList() { + if (contactsBuilder_ != null) { + return contactsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contacts_); + } + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder addContactsBuilder() { + return getContactsFieldBuilder() + .addBuilder(com.google.cloud.gdchardwaremanagement.v1alpha.Contact.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder addContactsBuilder( + int index) { + return getContactsFieldBuilder() + .addBuilder( + index, com.google.cloud.gdchardwaremanagement.v1alpha.Contact.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The individual points of contact in the organization at this
+     * location.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getContactsBuilderList() { + return getContactsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Contact, + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder> + getContactsFieldBuilder() { + if (contactsBuilder_ == null) { + contactsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Contact, + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder>( + contacts_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + contacts_ = null; + } + return contactsBuilder_; + } + + @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.gdchardwaremanagement.v1alpha.OrganizationContact) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OrganizationContact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrganizationContactOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrganizationContactOrBuilder.java new file mode 100644 index 000000000000..0aaeb372c7ef --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/OrganizationContactOrBuilder.java @@ -0,0 +1,178 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface OrganizationContactOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The organization's address.
+   * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the address field is set. + */ + boolean hasAddress(); + /** + * + * + *
+   * Required. The organization's address.
+   * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The address. + */ + com.google.type.PostalAddress getAddress(); + /** + * + * + *
+   * Required. The organization's address.
+   * 
+ * + * .google.type.PostalAddress address = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.PostalAddressOrBuilder getAddressOrBuilder(); + + /** + * + * + *
+   * Optional. The organization's email.
+   * 
+ * + * string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The email. + */ + java.lang.String getEmail(); + /** + * + * + *
+   * Optional. The organization's email.
+   * 
+ * + * string email = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for email. + */ + com.google.protobuf.ByteString getEmailBytes(); + + /** + * + * + *
+   * Optional. The organization's phone number.
+   * 
+ * + * string phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The phone. + */ + java.lang.String getPhone(); + /** + * + * + *
+   * Optional. The organization's phone number.
+   * 
+ * + * string phone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for phone. + */ + com.google.protobuf.ByteString getPhoneBytes(); + + /** + * + * + *
+   * Required. The individual points of contact in the organization at this
+   * location.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getContactsList(); + /** + * + * + *
+   * Required. The individual points of contact in the organization at this
+   * location.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Contact getContacts(int index); + /** + * + * + *
+   * Required. The individual points of contact in the organization at this
+   * location.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getContactsCount(); + /** + * + * + *
+   * Required. The individual points of contact in the organization at this
+   * location.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getContactsOrBuilderList(); + /** + * + * + *
+   * Required. The individual points of contact in the organization at this
+   * location.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder getContactsOrBuilder(int index); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/PowerSupply.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/PowerSupply.java new file mode 100644 index 000000000000..6568d568bd90 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/PowerSupply.java @@ -0,0 +1,179 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * The power supply options.
+ * 
+ * + * Protobuf enum {@code google.cloud.gdchardwaremanagement.v1alpha.PowerSupply} + */ +public enum PowerSupply implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Power supply is unspecified.
+   * 
+ * + * POWER_SUPPLY_UNSPECIFIED = 0; + */ + POWER_SUPPLY_UNSPECIFIED(0), + /** + * + * + *
+   * AC power supply.
+   * 
+ * + * POWER_SUPPLY_AC = 1; + */ + POWER_SUPPLY_AC(1), + /** + * + * + *
+   * DC power supply.
+   * 
+ * + * POWER_SUPPLY_DC = 2; + */ + POWER_SUPPLY_DC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Power supply is unspecified.
+   * 
+ * + * POWER_SUPPLY_UNSPECIFIED = 0; + */ + public static final int POWER_SUPPLY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * AC power supply.
+   * 
+ * + * POWER_SUPPLY_AC = 1; + */ + public static final int POWER_SUPPLY_AC_VALUE = 1; + /** + * + * + *
+   * DC power supply.
+   * 
+ * + * POWER_SUPPLY_DC = 2; + */ + public static final int POWER_SUPPLY_DC_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 PowerSupply 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 PowerSupply forNumber(int value) { + switch (value) { + case 0: + return POWER_SUPPLY_UNSPECIFIED; + case 1: + return POWER_SUPPLY_AC; + case 2: + return POWER_SUPPLY_DC; + 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 PowerSupply findValueByNumber(int number) { + return PowerSupply.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.gdchardwaremanagement.v1alpha.ResourcesProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PowerSupply[] VALUES = values(); + + public static PowerSupply 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 PowerSupply(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gdchardwaremanagement.v1alpha.PowerSupply) +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/RackSpace.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/RackSpace.java new file mode 100644 index 000000000000..9b8d8b8f7991 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/RackSpace.java @@ -0,0 +1,629 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Represents contiguous space in a rack.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.RackSpace} + */ +public final class RackSpace extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.RackSpace) + RackSpaceOrBuilder { + private static final long serialVersionUID = 0L; + // Use RackSpace.newBuilder() to construct. + private RackSpace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RackSpace() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RackSpace(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_RackSpace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_RackSpace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.class, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder.class); + } + + public static final int START_RACK_UNIT_FIELD_NUMBER = 1; + private int startRackUnit_ = 0; + /** + * + * + *
+   * Required. First rack unit of the rack space (inclusive).
+   * 
+ * + * int32 start_rack_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startRackUnit. + */ + @java.lang.Override + public int getStartRackUnit() { + return startRackUnit_; + } + + public static final int END_RACK_UNIT_FIELD_NUMBER = 2; + private int endRackUnit_ = 0; + /** + * + * + *
+   * Required. Last rack unit of the rack space (inclusive).
+   * 
+ * + * int32 end_rack_unit = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endRackUnit. + */ + @java.lang.Override + public int getEndRackUnit() { + return endRackUnit_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startRackUnit_ != 0) { + output.writeInt32(1, startRackUnit_); + } + if (endRackUnit_ != 0) { + output.writeInt32(2, endRackUnit_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startRackUnit_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, startRackUnit_); + } + if (endRackUnit_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, endRackUnit_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace other = + (com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace) obj; + + if (getStartRackUnit() != other.getStartRackUnit()) return false; + if (getEndRackUnit() != other.getEndRackUnit()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + START_RACK_UNIT_FIELD_NUMBER; + hash = (53 * hash) + getStartRackUnit(); + hash = (37 * hash) + END_RACK_UNIT_FIELD_NUMBER; + hash = (53 * hash) + getEndRackUnit(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace 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.gdchardwaremanagement.v1alpha.RackSpace parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace 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.gdchardwaremanagement.v1alpha.RackSpace parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace 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.gdchardwaremanagement.v1alpha.RackSpace prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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 contiguous space in a rack.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.RackSpace} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.RackSpace) + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_RackSpace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_RackSpace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.class, + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startRackUnit_ = 0; + endRackUnit_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_RackSpace_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace build() { + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace result = + new com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startRackUnit_ = startRackUnit_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endRackUnit_ = endRackUnit_; + } + } + + @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.gdchardwaremanagement.v1alpha.RackSpace) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace.getDefaultInstance()) + return this; + if (other.getStartRackUnit() != 0) { + setStartRackUnit(other.getStartRackUnit()); + } + if (other.getEndRackUnit() != 0) { + setEndRackUnit(other.getEndRackUnit()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + startRackUnit_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + endRackUnit_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int startRackUnit_; + /** + * + * + *
+     * Required. First rack unit of the rack space (inclusive).
+     * 
+ * + * int32 start_rack_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startRackUnit. + */ + @java.lang.Override + public int getStartRackUnit() { + return startRackUnit_; + } + /** + * + * + *
+     * Required. First rack unit of the rack space (inclusive).
+     * 
+ * + * int32 start_rack_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The startRackUnit to set. + * @return This builder for chaining. + */ + public Builder setStartRackUnit(int value) { + + startRackUnit_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. First rack unit of the rack space (inclusive).
+     * 
+ * + * int32 start_rack_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearStartRackUnit() { + bitField0_ = (bitField0_ & ~0x00000001); + startRackUnit_ = 0; + onChanged(); + return this; + } + + private int endRackUnit_; + /** + * + * + *
+     * Required. Last rack unit of the rack space (inclusive).
+     * 
+ * + * int32 end_rack_unit = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endRackUnit. + */ + @java.lang.Override + public int getEndRackUnit() { + return endRackUnit_; + } + /** + * + * + *
+     * Required. Last rack unit of the rack space (inclusive).
+     * 
+ * + * int32 end_rack_unit = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The endRackUnit to set. + * @return This builder for chaining. + */ + public Builder setEndRackUnit(int value) { + + endRackUnit_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Last rack unit of the rack space (inclusive).
+     * 
+ * + * int32 end_rack_unit = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEndRackUnit() { + bitField0_ = (bitField0_ & ~0x00000002); + endRackUnit_ = 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.gdchardwaremanagement.v1alpha.RackSpace) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.RackSpace) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RackSpace parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.RackSpace getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/RackSpaceOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/RackSpaceOrBuilder.java new file mode 100644 index 000000000000..47bb3df471e8 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/RackSpaceOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface RackSpaceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.RackSpace) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. First rack unit of the rack space (inclusive).
+   * 
+ * + * int32 start_rack_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startRackUnit. + */ + int getStartRackUnit(); + + /** + * + * + *
+   * Required. Last rack unit of the rack space (inclusive).
+   * 
+ * + * int32 end_rack_unit = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endRackUnit. + */ + int getEndRackUnit(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ResourcesProto.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ResourcesProto.java new file mode 100644 index 000000000000..796360e27c21 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ResourcesProto.java @@ -0,0 +1,773 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public final class ResourcesProto { + private ResourcesProto() {} + + 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_gdchardwaremanagement_v1alpha_Order_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Sku_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Sku_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_OrganizationContact_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_OrganizationContact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Contact_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Contact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuInstance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwarePhysicalInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwarePhysicalInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareInstallationInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareInstallationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ZoneNetworkConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ZoneNetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Subnet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Subnet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_TimePeriod_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_TimePeriod_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Dimensions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Dimensions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_RackSpace_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_RackSpace_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareLocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareLocation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n:google/cloud/gdchardwaremanagement/v1a" + + "lpha/resources.proto\022*google.cloud.gdcha" + + "rdwaremanagement.v1alpha\032\037google/api/fie" + + "ld_behavior.proto\032\033google/api/field_info" + + ".proto\032\031google/api/resource.proto\032\037googl" + + "e/protobuf/timestamp.proto\032\026google/type/" + + "date.proto\032\032google/type/datetime.proto\032\033" + + "google/type/dayofweek.proto\032 google/type" + + "/postal_address.proto\032\033google/type/timeo" + + "fday.proto\"\375\t\n\005Order\022\021\n\004name\030\001 \001(\tB\003\340A\010\022" + + "\031\n\014display_name\030\r \001(\tB\003\340A\001\0224\n\013create_tim" + + "e\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\022R\n\006labels\030\004 \003(\0132=.google." + + "cloud.gdchardwaremanagement.v1alpha.Orde" + + "r.LabelsEntryB\003\340A\001\022K\n\005state\030\005 \001(\01627.goog" + + "le.cloud.gdchardwaremanagement.v1alpha.O" + + "rder.StateB\003\340A\003\022b\n\024organization_contact\030" + + "\006 \001(\0132?.google.cloud.gdchardwaremanageme" + + "nt.v1alpha.OrganizationContactB\003\340A\002\022\035\n\020t" + + "arget_workloads\030\007 \003(\tB\003\340A\001\022 \n\023customer_m" + + "otivation\030\010 \001(\tB\003\340A\002\0229\n\020fulfillment_time" + + "\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\002\022" + + "\030\n\013region_code\030\n \001(\tB\003\340A\002\022\033\n\016order_form_" + + "uri\030\013 \001(\tB\003\340A\003\022I\n\004type\030\014 \001(\01626.google.cl" + + "oud.gdchardwaremanagement.v1alpha.Order." + + "TypeB\003\340A\003\0224\n\013submit_time\030\016 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\022\027\n\nbilling_id\030\017 " + + "\001(\tB\003\340A\002\022\\\n\021existing_hardware\030\020 \003(\0132<.go" + + "ogle.cloud.gdchardwaremanagement.v1alpha" + + ".HardwareLocationB\003\340A\001\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\321\001\n\005State\022" + + "\025\n\021STATE_UNSPECIFIED\020\000\022\t\n\005DRAFT\020\001\022\r\n\tSUB" + + "MITTED\020\002\022\014\n\010ACCEPTED\020\003\022\032\n\026ADDITIONAL_INF" + + "O_NEEDED\020\004\022\014\n\010BUILDING\020\005\022\014\n\010SHIPPING\020\006\022\016" + + "\n\nINSTALLING\020\007\022\n\n\006FAILED\020\010\022\027\n\023PARTIALLY_" + + "COMPLETED\020\t\022\r\n\tCOMPLETED\020\n\022\r\n\tCANCELLED\020" + + "\013\"/\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\010\n\004PAID\020" + + "\001\022\007\n\003POC\020\002:v\352As\n*gdchardwaremanagement.g" + + "oogleapis.com/Order\0226projects/{project}/" + + "locations/{location}/orders/{order}*\006ord" + + "ers2\005order\"\234\005\n\004Site\022\021\n\004name\030\001 \001(\tB\003\340A\010\022\031" + + "\n\014display_name\030\030 \001(\tB\003\340A\001\022\030\n\013description" + + "\030\031 \001(\tB\003\340A\001\0224\n\013create_time\030\002 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\0224\n\013update_time" + + "\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "Q\n\006labels\030\004 \003(\0132<.google.cloud.gdchardwa" + + "remanagement.v1alpha.Site.LabelsEntryB\003\340" + + "A\001\022b\n\024organization_contact\030\005 \001(\0132?.googl" + + "e.cloud.gdchardwaremanagement.v1alpha.Or" + + "ganizationContactB\003\340A\002\022 \n\023google_maps_pi" + + "n_uri\030\006 \001(\tB\003\340A\002\022Q\n\014access_times\030\032 \003(\01326" + + ".google.cloud.gdchardwaremanagement.v1al" + + "pha.TimePeriodB\003\340A\001\022\022\n\005notes\030\033 \001(\tB\003\340A\001\032" + + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001:q\352An\n)gdchardwaremanagement.googl" + + "eapis.com/Site\0224projects/{project}/locat" + + "ions/{location}/sites/{site}*\005sites2\004sit" + + "e\"\352\007\n\rHardwareGroup\022\021\n\004name\030\001 \001(\tB\003\340A\010\0224" + + "\n\013create_time\030\002 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\022Z\n\006labels\030\004 \003" + + "(\0132E.google.cloud.gdchardwaremanagement." + + "v1alpha.HardwareGroup.LabelsEntryB\003\340A\001\022\033" + + "\n\016hardware_count\030\005 \001(\005B\003\340A\002\022O\n\006config\030\006 " + + "\001(\0132:.google.cloud.gdchardwaremanagement" + + ".v1alpha.HardwareConfigB\003\340A\002\022?\n\004site\030\007 \001" + + "(\tB1\340A\002\372A+\n)gdchardwaremanagement.google" + + "apis.com/Site\022S\n\005state\030\010 \001(\0162?.google.cl" + + "oud.gdchardwaremanagement.v1alpha.Hardwa" + + "reGroup.StateB\003\340A\003\022?\n\004zone\030\t \001(\tB1\340A\001\372A+" + + "\n)gdchardwaremanagement.googleapis.com/Z" + + "one\022;\n\033requested_installation_date\030\n \001(\013" + + "2\021.google.type.DateB\003\340A\001\032-\n\013LabelsEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\232\001\n\005Stat" + + "e\022\025\n\021STATE_UNSPECIFIED\020\000\022\032\n\026ADDITIONAL_I" + + "NFO_NEEDED\020\001\022\014\n\010BUILDING\020\002\022\014\n\010SHIPPING\020\003" + + "\022\016\n\nINSTALLING\020\004\022\027\n\023PARTIALLY_INSTALLED\020" + + "\005\022\r\n\tINSTALLED\020\006\022\n\n\006FAILED\020\007:\257\001\352A\253\001\n2gdc" + + "hardwaremanagement.googleapis.com/Hardwa" + + "reGroup\022Vprojects/{project}/locations/{l" + + "ocation}/orders/{order}/hardwareGroups/{" + + "hardware_group}*\016hardwareGroups2\rhardwar" + + "eGroup\"\375\n\n\010Hardware\022\021\n\004name\030\001 \001(\tB\003\340A\010\022\031" + + "\n\014display_name\030\002 \001(\tB\003\340A\001\0224\n\013create_time" + + "\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "4\n\013update_time\030\004 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\022U\n\006labels\030\005 \003(\0132@.google.c" + + "loud.gdchardwaremanagement.v1alpha.Hardw" + + "are.LabelsEntryB\003\340A\001\022A\n\005order\030\006 \001(\tB2\340A\002" + + "\372A,\n*gdchardwaremanagement.googleapis.co" + + "m/Order\022R\n\016hardware_group\030\007 \001(\tB:\340A\003\372A4\n" + + "2gdchardwaremanagement.googleapis.com/Ha" + + "rdwareGroup\022?\n\004site\030\010 \001(\tB1\340A\002\372A+\n)gdcha" + + "rdwaremanagement.googleapis.com/Site\022N\n\005" + + "state\030\t \001(\0162:.google.cloud.gdchardwarema" + + "nagement.v1alpha.Hardware.StateB\003\340A\003\022\024\n\007" + + "ciq_uri\030\n \001(\tB\003\340A\003\022O\n\006config\030\013 \001(\0132:.goo" + + "gle.cloud.gdchardwaremanagement.v1alpha." + + "HardwareConfigB\003\340A\002\022;\n\033estimated_install" + + "ation_date\030\014 \001(\0132\021.google.type.DateB\003\340A\003" + + "\022\\\n\rphysical_info\030\r \001(\0132@.google.cloud.g" + + "dchardwaremanagement.v1alpha.HardwarePhy" + + "sicalInfoB\003\340A\001\022d\n\021installation_info\030\016 \001(" + + "\0132D.google.cloud.gdchardwaremanagement.v" + + "1alpha.HardwareInstallationInfoB\003\340A\001\022?\n\004" + + "zone\030\017 \001(\tB1\340A\002\372A+\n)gdchardwaremanagemen" + + "t.googleapis.com/Zone\022;\n\033requested_insta" + + "llation_date\030\020 \001(\0132\021.google.type.DateB\003\340" + + "A\001\0228\n\030actual_installation_date\030\021 \001(\0132\021.g" + + "oogle.type.DateB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\201\001\n\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\032\n\026ADDITIONAL_INFO_" + + "NEEDED\020\001\022\014\n\010BUILDING\020\002\022\014\n\010SHIPPING\020\003\022\016\n\n" + + "INSTALLING\020\004\022\r\n\tINSTALLED\020\005\022\n\n\006FAILED\020\006:" + + "\204\001\352A\200\001\n-gdchardwaremanagement.googleapis" + + ".com/Hardware\022;projects/{project}/locati" + + "ons/{location}/hardware/{hardware}*\010hard" + + "ware2\010hardware\"\222\003\n\007Comment\022\021\n\004name\030\001 \001(\t" + + "B\003\340A\010\0224\n\013create_time\030\002 \001(\0132\032.google.prot" + + "obuf.TimestampB\003\340A\003\022T\n\006labels\030\003 \003(\0132?.go" + + "ogle.cloud.gdchardwaremanagement.v1alpha" + + ".Comment.LabelsEntryB\003\340A\001\022\023\n\006author\030\004 \001(" + + "\tB\003\340A\003\022\021\n\004text\030\005 \001(\tB\003\340A\002\032-\n\013LabelsEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\220\001\352A\214\001\n" + + ",gdchardwaremanagement.googleapis.com/Co" + + "mment\022Iprojects/{project}/locations/{loc" + + "ation}/orders/{order}/comments/{comment}" + + "*\010comments2\007comment\"\261\003\n\016ChangeLogEntry\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\022[\n\006label" + + "s\030\003 \003(\0132F.google.cloud.gdchardwaremanage" + + "ment.v1alpha.ChangeLogEntry.LabelsEntryB" + + "\003\340A\001\022\020\n\003log\030\004 \001(\tB\003\340A\003\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\267\001\352A\263\001\n3gd" + + "chardwaremanagement.googleapis.com/Chang" + + "eLogEntry\022Zprojects/{project}/locations/" + + "{location}/orders/{order}/changeLogEntri" + + "es/{change_log_entry}*\020changeLogEntries2" + + "\016changeLogEntry\"\214\005\n\003Sku\022\021\n\004name\030\001 \001(\tB\003\340" + + "A\010\022\031\n\014display_name\030\002 \001(\tB\003\340A\003\0224\n\013create_" + + "time\030\003 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\0224\n\013update_time\030\004 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\022J\n\006config\030\006 \001(\01325.goog" + + "le.cloud.gdchardwaremanagement.v1alpha.S" + + "kuConfigB\003\340A\003\022O\n\tinstances\030\007 \003(\01327.googl" + + "e.cloud.gdchardwaremanagement.v1alpha.Sk" + + "uInstanceB\003\340A\003\022\030\n\013description\030\010 \001(\tB\003\340A\003" + + "\022\030\n\013revision_id\030\t \001(\tB\003\340A\003\022\026\n\tis_active\030" + + "\n \001(\010B\003\340A\003\022G\n\004type\030\013 \001(\01624.google.cloud." + + "gdchardwaremanagement.v1alpha.Sku.TypeB\003" + + "\340A\003\022\027\n\nvcpu_count\030\014 \001(\005B\003\340A\003\"2\n\004Type\022\024\n\020" + + "TYPE_UNSPECIFIED\020\000\022\010\n\004RACK\020\001\022\n\n\006SERVER\020\002" + + ":l\352Ai\n(gdchardwaremanagement.googleapis." + + "com/Sku\0222projects/{project}/locations/{l" + + "ocation}/skus/{sku}*\004skus2\003sku\"\233\007\n\004Zone\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\013upda" + + "te_time\030\003 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\022Q\n\006labels\030\004 \003(\0132<.google.cloud.gd" + + "chardwaremanagement.v1alpha.Zone.LabelsE" + + "ntryB\003\340A\001\022\031\n\014display_name\030\005 \001(\tB\003\340A\001\022J\n\005" + + "state\030\010 \001(\01626.google.cloud.gdchardwarema" + + "nagement.v1alpha.Zone.StateB\003\340A\003\022J\n\010cont" + + "acts\030\t \003(\01323.google.cloud.gdchardwareman" + + "agement.v1alpha.ContactB\003\340A\002\022\024\n\007ciq_uri\030" + + "\n \001(\tB\003\340A\003\022Z\n\016network_config\030\013 \001(\0132=.goo" + + "gle.cloud.gdchardwaremanagement.v1alpha." + + "ZoneNetworkConfigB\003\340A\001\022\037\n\022globally_uniqu" + + "e_id\030\014 \001(\tB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\330\001\n\005State\022\025\n\021STAT" + + "E_UNSPECIFIED\020\000\022\032\n\026ADDITIONAL_INFO_NEEDE" + + "D\020\001\022\r\n\tPREPARING\020\002\022,\n(READY_FOR_CUSTOMER" + + "_FACTORY_TURNUP_CHECKS\020\005\022\031\n\025READY_FOR_SI" + + "TE_TURNUP\020\006\022)\n%CUSTOMER_FACTORY_TURNUP_C" + + "HECKS_FAILED\020\007\022\n\n\006ACTIVE\020\003\022\r\n\tCANCELLED\020" + + "\004:q\352An\n)gdchardwaremanagement.googleapis" + + ".com/Zone\0224projects/{project}/locations/" + + "{location}/zones/{zone}*\005zones2\004zone\"\273\001\n" + + "\023OrganizationContact\0220\n\007address\030\001 \001(\0132\032." + + "google.type.PostalAddressB\003\340A\002\022\022\n\005email\030" + + "\002 \001(\tB\003\340A\001\022\022\n\005phone\030\003 \001(\tB\003\340A\001\022J\n\010contac" + + "ts\030\004 \003(\01323.google.cloud.gdchardwaremanag" + + "ement.v1alpha.ContactB\003\340A\002\"\351\001\n\007Contact\022\027" + + "\n\ngiven_name\030\001 \001(\tB\003\340A\002\022\030\n\013family_name\030\002" + + " \001(\tB\003\340A\001\022\022\n\005email\030\003 \001(\tB\003\340A\002\022\022\n\005phone\030\004" + + " \001(\tB\003\340A\002\022-\n\ttime_zone\030\005 \001(\0132\025.google.ty" + + "pe.TimeZoneB\003\340A\001\022T\n\017reachable_times\030\006 \003(" + + "\01326.google.cloud.gdchardwaremanagement.v" + + "1alpha.TimePeriodB\003\340A\001\"\316\001\n\016HardwareConfi" + + "g\022=\n\003sku\030\001 \001(\tB0\340A\002\372A*\n(gdchardwaremanag" + + "ement.googleapis.com/Sku\022R\n\014power_supply" + + "\030\002 \001(\01627.google.cloud.gdchardwaremanagem" + + "ent.v1alpha.PowerSupplyB\003\340A\002\022)\n\034subscrip" + + "tion_duration_months\030\003 \001(\005B\003\340A\001\"C\n\tSkuCo" + + "nfig\022\013\n\003cpu\030\001 \001(\t\022\013\n\003gpu\030\002 \001(\t\022\013\n\003ram\030\003 " + + "\001(\t\022\017\n\007storage\030\004 \001(\t\"\312\001\n\013SkuInstance\022\023\n\013" + + "region_code\030\001 \001(\t\022M\n\014power_supply\030\002 \001(\0162" + + "7.google.cloud.gdchardwaremanagement.v1a" + + "lpha.PowerSupply\022\023\n\013billing_sku\030\003 \001(\t\022\034\n" + + "\024billing_sku_per_vcpu\030\004 \001(\t\022$\n\034subscript" + + "ion_duration_months\030\005 \001(\005\"\343\005\n\024HardwarePh" + + "ysicalInfo\022s\n\020power_receptacle\030\001 \001(\0162T.g" + + "oogle.cloud.gdchardwaremanagement.v1alph" + + "a.HardwarePhysicalInfo.PowerReceptacleTy" + + "peB\003\340A\002\022o\n\016network_uplink\030\002 \001(\0162R.google" + + ".cloud.gdchardwaremanagement.v1alpha.Har" + + "dwarePhysicalInfo.NetworkUplinkTypeB\003\340A\002" + + "\022^\n\007voltage\030\003 \001(\0162H.google.cloud.gdchard" + + "waremanagement.v1alpha.HardwarePhysicalI" + + "nfo.VoltageB\003\340A\002\022^\n\007amperes\030\004 \001(\0162H.goog" + + "le.cloud.gdchardwaremanagement.v1alpha.H" + + "ardwarePhysicalInfo.AmperesB\003\340A\002\"f\n\023Powe" + + "rReceptacleType\022%\n!POWER_RECEPTACLE_TYPE" + + "_UNSPECIFIED\020\000\022\r\n\tNEMA_5_15\020\001\022\010\n\004C_13\020\002\022" + + "\017\n\013STANDARD_EU\020\003\"C\n\021NetworkUplinkType\022#\n" + + "\037NETWORK_UPLINK_TYPE_UNSPECIFIED\020\000\022\t\n\005RJ" + + "_45\020\001\"D\n\007Voltage\022\027\n\023VOLTAGE_UNSPECIFIED\020" + + "\000\022\017\n\013VOLTAGE_110\020\001\022\017\n\013VOLTAGE_220\020\003\"2\n\007A" + + "mperes\022\027\n\023AMPERES_UNSPECIFIED\020\000\022\016\n\nAMPER" + + "ES_15\020\001\"\325\003\n\030HardwareInstallationInfo\022\032\n\r" + + "rack_location\030\001 \001(\tB\003\340A\001\022\"\n\025power_distan" + + "ce_meters\030\002 \001(\005B\003\340A\002\022#\n\026switch_distance_" + + "meters\030\003 \001(\005B\003\340A\002\022Y\n\024rack_unit_dimension" + + "s\030\004 \001(\01326.google.cloud.gdchardwaremanage" + + "ment.v1alpha.DimensionsB\003\340A\002\022N\n\nrack_spa" + + "ce\030\005 \001(\01325.google.cloud.gdchardwaremanag" + + "ement.v1alpha.RackSpaceB\003\340A\002\022e\n\track_typ" + + "e\030\006 \001(\0162M.google.cloud.gdchardwaremanage" + + "ment.v1alpha.HardwareInstallationInfo.Ra" + + "ckTypeB\003\340A\002\"B\n\010RackType\022\031\n\025RACK_TYPE_UNS" + + "PECIFIED\020\000\022\014\n\010TWO_POST\020\001\022\r\n\tFOUR_POST\020\002\"" + + "\336\002\n\021ZoneNetworkConfig\022,\n\027machine_mgmt_ip" + + "v4_range\030\001 \001(\tB\013\340A\002\342\214\317\327\010\002\010\002\022/\n\032kubernete" + + "s_node_ipv4_range\030\002 \001(\tB\013\340A\002\342\214\317\327\010\002\010\002\0228\n#" + + "kubernetes_control_plane_ipv4_range\030\003 \001(" + + "\tB\013\340A\002\342\214\317\327\010\002\010\002\022W\n\026management_ipv4_subnet" + + "\030\004 \001(\01322.google.cloud.gdchardwaremanagem" + + "ent.v1alpha.SubnetB\003\340A\002\022W\n\026kubernetes_ip" + + "v4_subnet\030\005 \001(\01322.google.cloud.gdchardwa" + + "remanagement.v1alpha.SubnetB\003\340A\001\"]\n\006Subn" + + "et\022\"\n\raddress_range\030\001 \001(\tB\013\340A\002\342\214\317\327\010\002\010\002\022/" + + "\n\032default_gateway_ip_address\030\002 \001(\tB\013\340A\002\342" + + "\214\317\327\010\002\010\002\"\227\001\n\nTimePeriod\022/\n\nstart_time\030\001 \001" + + "(\0132\026.google.type.TimeOfDayB\003\340A\002\022-\n\010end_t" + + "ime\030\002 \001(\0132\026.google.type.TimeOfDayB\003\340A\002\022)" + + "\n\004days\030\003 \003(\0162\026.google.type.DayOfWeekB\003\340A" + + "\002\"^\n\nDimensions\022\031\n\014width_inches\030\001 \001(\002B\003\340" + + "A\002\022\032\n\rheight_inches\030\002 \001(\002B\003\340A\002\022\031\n\014depth_" + + "inches\030\003 \001(\002B\003\340A\002\"E\n\tRackSpace\022\034\n\017start_" + + "rack_unit\030\001 \001(\005B\003\340A\002\022\032\n\rend_rack_unit\030\002 " + + "\001(\005B\003\340A\002\"\277\001\n\020HardwareLocation\022?\n\004site\030\001 " + + "\001(\tB1\340A\002\372A+\n)gdchardwaremanagement.googl" + + "eapis.com/Site\022\032\n\rrack_location\030\002 \001(\tB\003\340" + + "A\002\022N\n\nrack_space\030\003 \003(\01325.google.cloud.gd" + + "chardwaremanagement.v1alpha.RackSpaceB\003\340" + + "A\001*U\n\013PowerSupply\022\034\n\030POWER_SUPPLY_UNSPEC" + + "IFIED\020\000\022\023\n\017POWER_SUPPLY_AC\020\001\022\023\n\017POWER_SU" + + "PPLY_DC\020\002B\262\002\n.com.google.cloud.gdchardwa" + + "remanagement.v1alphaB\016ResourcesProtoP\001Zd" + + "cloud.google.com/go/gdchardwaremanagemen" + + "t/apiv1alpha/gdchardwaremanagementpb;gdc" + + "hardwaremanagementpb\252\002*Google.Cloud.GdcH" + + "ardwareManagement.V1Alpha\312\002*Google\\Cloud" + + "\\GdcHardwareManagement\\V1alpha\352\002-Google:" + + ":Cloud::GDCHardwareManagement::V1alphab\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + com.google.type.DateTimeProto.getDescriptor(), + com.google.type.DayOfWeekProto.getDescriptor(), + com.google.type.PostalAddressProto.getDescriptor(), + com.google.type.TimeOfDayProto.getDescriptor(), + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "CreateTime", + "UpdateTime", + "Labels", + "State", + "OrganizationContact", + "TargetWorkloads", + "CustomerMotivation", + "FulfillmentTime", + "RegionCode", + "OrderFormUri", + "Type", + "SubmitTime", + "BillingId", + "ExistingHardware", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_LabelsEntry_descriptor = + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Order_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "CreateTime", + "UpdateTime", + "Labels", + "OrganizationContact", + "GoogleMapsPinUri", + "AccessTimes", + "Notes", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_LabelsEntry_descriptor = + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "HardwareCount", + "Config", + "Site", + "State", + "Zone", + "RequestedInstallationDate", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_LabelsEntry_descriptor = + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareGroup_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "CreateTime", + "UpdateTime", + "Labels", + "Order", + "HardwareGroup", + "Site", + "State", + "CiqUri", + "Config", + "EstimatedInstallationDate", + "PhysicalInfo", + "InstallationInfo", + "Zone", + "RequestedInstallationDate", + "ActualInstallationDate", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_LabelsEntry_descriptor = + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Hardware_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_descriptor, + new java.lang.String[] { + "Name", "CreateTime", "Labels", "Author", "Text", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_LabelsEntry_descriptor = + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Comment_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_descriptor, + new java.lang.String[] { + "Name", "CreateTime", "Labels", "Log", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_LabelsEntry_descriptor = + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ChangeLogEntry_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Sku_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Sku_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Sku_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "CreateTime", + "UpdateTime", + "Config", + "Instances", + "Description", + "RevisionId", + "IsActive", + "Type", + "VcpuCount", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "DisplayName", + "State", + "Contacts", + "CiqUri", + "NetworkConfig", + "GloballyUniqueId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_LabelsEntry_descriptor = + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_OrganizationContact_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_OrganizationContact_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_OrganizationContact_descriptor, + new java.lang.String[] { + "Address", "Email", "Phone", "Contacts", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Contact_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Contact_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Contact_descriptor, + new java.lang.String[] { + "GivenName", "FamilyName", "Email", "Phone", "TimeZone", "ReachableTimes", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareConfig_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareConfig_descriptor, + new java.lang.String[] { + "Sku", "PowerSupply", "SubscriptionDurationMonths", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuConfig_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuConfig_descriptor, + new java.lang.String[] { + "Cpu", "Gpu", "Ram", "Storage", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuInstance_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuInstance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuInstance_descriptor, + new java.lang.String[] { + "RegionCode", + "PowerSupply", + "BillingSku", + "BillingSkuPerVcpu", + "SubscriptionDurationMonths", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwarePhysicalInfo_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwarePhysicalInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwarePhysicalInfo_descriptor, + new java.lang.String[] { + "PowerReceptacle", "NetworkUplink", "Voltage", "Amperes", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareInstallationInfo_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareInstallationInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareInstallationInfo_descriptor, + new java.lang.String[] { + "RackLocation", + "PowerDistanceMeters", + "SwitchDistanceMeters", + "RackUnitDimensions", + "RackSpace", + "RackType", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ZoneNetworkConfig_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ZoneNetworkConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ZoneNetworkConfig_descriptor, + new java.lang.String[] { + "MachineMgmtIpv4Range", + "KubernetesNodeIpv4Range", + "KubernetesControlPlaneIpv4Range", + "ManagementIpv4Subnet", + "KubernetesIpv4Subnet", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Subnet_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Subnet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Subnet_descriptor, + new java.lang.String[] { + "AddressRange", "DefaultGatewayIpAddress", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_TimePeriod_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_TimePeriod_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_TimePeriod_descriptor, + new java.lang.String[] { + "StartTime", "EndTime", "Days", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Dimensions_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Dimensions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_Dimensions_descriptor, + new java.lang.String[] { + "WidthInches", "HeightInches", "DepthInches", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_RackSpace_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_RackSpace_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_RackSpace_descriptor, + new java.lang.String[] { + "StartRackUnit", "EndRackUnit", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareLocation_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareLocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_HardwareLocation_descriptor, + new java.lang.String[] { + "Site", "RackLocation", "RackSpace", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + com.google.type.DateTimeProto.getDescriptor(); + com.google.type.DayOfWeekProto.getDescriptor(); + com.google.type.PostalAddressProto.getDescriptor(); + com.google.type.TimeOfDayProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ServiceProto.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ServiceProto.java new file mode 100644 index 000000000000..8d3553f727b9 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ServiceProto.java @@ -0,0 +1,969 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public final class ServiceProto { + private ServiceProto() {} + + 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_gdchardwaremanagement_v1alpha_ListOrdersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetOrderRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetOrderRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateOrderRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateOrderRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateOrderRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateOrderRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteOrderRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteOrderRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SubmitOrderRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SubmitOrderRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSiteRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSiteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateSiteRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateSiteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateSiteRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateSiteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetCommentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetCommentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateCommentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateCommentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetChangeLogEntryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetChangeLogEntryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSkuRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSkuRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetZoneRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetZoneRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateZoneRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateZoneRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateZoneRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateZoneRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteZoneRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteZoneRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SignalZoneStateRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SignalZoneStateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_gdchardwaremanagement_v1alpha_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_gdchardwaremanagement_v1alpha_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 = { + "\n8google/cloud/gdchardwaremanagement/v1a" + + "lpha/service.proto\022*google.cloud.gdchard" + + "waremanagement.v1alpha\032\034google/api/annot" + + "ations.proto\032\027google/api/client.proto\032\037g" + + "oogle/api/field_behavior.proto\032\033google/a" + + "pi/field_info.proto\032\031google/api/resource" + + ".proto\032:google/cloud/gdchardwaremanageme" + + "nt/v1alpha/resources.proto\032#google/longr" + + "unning/operations.proto\032\033google/protobuf" + + "/empty.proto\032 google/protobuf/field_mask" + + ".proto\032\037google/protobuf/timestamp.proto\"" + + "\264\001\n\021ListOrdersRequest\022B\n\006parent\030\001 \001(\tB2\340" + + "A\002\372A,\022*gdchardwaremanagement.googleapis." + + "com/Order\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npag" + + "e_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\"\205\001\n\022ListOrdersRes" + + "ponse\022A\n\006orders\030\001 \003(\01321.google.cloud.gdc" + + "hardwaremanagement.v1alpha.Order\022\027\n\017next" + + "_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"S" + + "\n\017GetOrderRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n" + + "*gdchardwaremanagement.googleapis.com/Or" + + "der\"\317\001\n\022CreateOrderRequest\022B\n\006parent\030\001 \001" + + "(\tB2\340A\002\372A,\022*gdchardwaremanagement.google" + + "apis.com/Order\022\025\n\010order_id\030\002 \001(\tB\003\340A\001\022E\n" + + "\005order\030\003 \001(\01321.google.cloud.gdchardwarem" + + "anagement.v1alpha.OrderB\003\340A\002\022\027\n\nrequest_" + + "id\030\004 \001(\tB\003\340A\001\"\252\001\n\022UpdateOrderRequest\0224\n\013" + + "update_mask\030\001 \001(\0132\032.google.protobuf.Fiel" + + "dMaskB\003\340A\002\022E\n\005order\030\002 \001(\01321.google.cloud" + + ".gdchardwaremanagement.v1alpha.OrderB\003\340A" + + "\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"\203\001\n\022DeleteOrd" + + "erRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*gdchard" + + "waremanagement.googleapis.com/Order\022\027\n\nr" + + "equest_id\030\002 \001(\tB\003\340A\001\022\022\n\005force\030\003 \001(\010B\003\340A\001" + + "\"o\n\022SubmitOrderRequest\022@\n\004name\030\001 \001(\tB2\340A" + + "\002\372A,\n*gdchardwaremanagement.googleapis.c" + + "om/Order\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\262\001\n\020Li" + + "stSitesRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)" + + "gdchardwaremanagement.googleapis.com/Sit" + + "e\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030" + + "\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order" + + "_by\030\005 \001(\tB\003\340A\001\"\202\001\n\021ListSitesResponse\022?\n\005" + + "sites\030\001 \003(\01320.google.cloud.gdchardwarema" + + "nagement.v1alpha.Site\022\027\n\017next_page_token" + + "\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"Q\n\016GetSiteRe" + + "quest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)gdchardware" + + "management.googleapis.com/Site\"\312\001\n\021Creat" + + "eSiteRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)gd" + + "chardwaremanagement.googleapis.com/Site\022" + + "\024\n\007site_id\030\002 \001(\tB\003\340A\001\022C\n\004site\030\003 \001(\01320.go" + + "ogle.cloud.gdchardwaremanagement.v1alpha" + + ".SiteB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\247\001\n\021" + + "UpdateSiteRequest\0224\n\013update_mask\030\001 \001(\0132\032" + + ".google.protobuf.FieldMaskB\003\340A\002\022C\n\004site\030" + + "\002 \001(\01320.google.cloud.gdchardwaremanageme" + + "nt.v1alpha.SiteB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\t" + + "B\003\340A\001\"\304\001\n\031ListHardwareGroupsRequest\022J\n\006p" + + "arent\030\001 \001(\tB:\340A\002\372A4\0222gdchardwaremanageme" + + "nt.googleapis.com/HardwareGroup\022\026\n\tpage_" + + "size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001" + + "\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB" + + "\003\340A\001\"\236\001\n\032ListHardwareGroupsResponse\022R\n\017h" + + "ardware_groups\030\001 \003(\01329.google.cloud.gdch" + + "ardwaremanagement.v1alpha.HardwareGroup\022" + + "\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030" + + "\003 \003(\t\"c\n\027GetHardwareGroupRequest\022H\n\004name" + + "\030\001 \001(\tB:\340A\002\372A4\n2gdchardwaremanagement.go" + + "ogleapis.com/HardwareGroup\"\371\001\n\032CreateHar" + + "dwareGroupRequest\022J\n\006parent\030\001 \001(\tB:\340A\002\372A" + + "4\0222gdchardwaremanagement.googleapis.com/" + + "HardwareGroup\022\036\n\021hardware_group_id\030\002 \001(\t" + + "B\003\340A\001\022V\n\016hardware_group\030\003 \001(\01329.google.c" + + "loud.gdchardwaremanagement.v1alpha.Hardw" + + "areGroupB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\303" + + "\001\n\032UpdateHardwareGroupRequest\0224\n\013update_" + + "mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003" + + "\340A\002\022V\n\016hardware_group\030\002 \001(\01329.google.clo" + + "ud.gdchardwaremanagement.v1alpha.Hardwar" + + "eGroupB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"\177\n\032" + + "DeleteHardwareGroupRequest\022H\n\004name\030\001 \001(\t" + + "B:\340A\002\372A4\n2gdchardwaremanagement.googleap" + + "is.com/HardwareGroup\022\027\n\nrequest_id\030\002 \001(\t" + + "B\003\340A\001\"\271\001\n\023ListHardwareRequest\022E\n\006parent\030" + + "\001 \001(\tB5\340A\002\372A/\022-gdchardwaremanagement.goo" + + "gleapis.com/Hardware\022\026\n\tpage_size\030\002 \001(\005B" + + "\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030" + + "\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\214\001\n\024Li" + + "stHardwareResponse\022F\n\010hardware\030\001 \003(\01324.g" + + "oogle.cloud.gdchardwaremanagement.v1alph" + + "a.Hardware\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013u" + + "nreachable\030\003 \003(\t\"Y\n\022GetHardwareRequest\022C" + + "\n\004name\030\001 \001(\tB5\340A\002\372A/\n-gdchardwaremanagem" + + "ent.googleapis.com/Hardware\"\305\001\n\025CreateHa" + + "rdwareRequest\022E\n\006parent\030\001 \001(\tB5\340A\002\372A/\022-g" + + "dchardwaremanagement.googleapis.com/Hard" + + "ware\022\030\n\013hardware_id\030\002 \001(\tB\003\340A\001\022K\n\010hardwa" + + "re\030\003 \001(\01324.google.cloud.gdchardwaremanag" + + "ement.v1alpha.HardwareB\003\340A\002\"\263\001\n\025UpdateHa" + + "rdwareRequest\0224\n\013update_mask\030\001 \001(\0132\032.goo" + + "gle.protobuf.FieldMaskB\003\340A\002\022K\n\010hardware\030" + + "\002 \001(\01324.google.cloud.gdchardwaremanageme" + + "nt.v1alpha.HardwareB\003\340A\002\022\027\n\nrequest_id\030\003" + + " \001(\tB\003\340A\001\"}\n\025DeleteHardwareRequest\022C\n\004na" + + "me\030\001 \001(\tB5\340A\002\372A/\n-gdchardwaremanagement." + + "googleapis.com/Hardware\022\037\n\nrequest_id\030\002 " + + "\001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\270\001\n\023ListCommentsRequest" + + "\022D\n\006parent\030\001 \001(\tB4\340A\002\372A.\022,gdchardwareman" + + "agement.googleapis.com/Comment\022\026\n\tpage_s" + + "ize\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022" + + "\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003" + + "\340A\001\"\213\001\n\024ListCommentsResponse\022E\n\010comments" + + "\030\001 \003(\01323.google.cloud.gdchardwaremanagem" + + "ent.v1alpha.Comment\022\027\n\017next_page_token\030\002" + + " \001(\t\022\023\n\013unreachable\030\003 \003(\t\"W\n\021GetCommentR" + + "equest\022B\n\004name\030\001 \001(\tB4\340A\002\372A.\n,gdchardwar" + + "emanagement.googleapis.com/Comment\"\331\001\n\024C" + + "reateCommentRequest\022D\n\006parent\030\001 \001(\tB4\340A\002" + + "\372A.\022,gdchardwaremanagement.googleapis.co" + + "m/Comment\022\027\n\ncomment_id\030\002 \001(\tB\003\340A\001\022I\n\007co" + + "mment\030\003 \001(\01323.google.cloud.gdchardwarema" + + "nagement.v1alpha.CommentB\003\340A\002\022\027\n\nrequest" + + "_id\030\004 \001(\tB\003\340A\001\"\307\001\n\033ListChangeLogEntriesR" + + "equest\022K\n\006parent\030\001 \001(\tB;\340A\002\372A5\0223gdchardw" + + "aremanagement.googleapis.com/ChangeLogEn" + + "try\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_toke" + + "n\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010ord" + + "er_by\030\005 \001(\tB\003\340A\001\"\244\001\n\034ListChangeLogEntrie" + + "sResponse\022V\n\022change_log_entries\030\001 \003(\0132:." + + "google.cloud.gdchardwaremanagement.v1alp" + + "ha.ChangeLogEntry\022\027\n\017next_page_token\030\002 \001" + + "(\t\022\023\n\013unreachable\030\003 \003(\t\"e\n\030GetChangeLogE" + + "ntryRequest\022I\n\004name\030\001 \001(\tB;\340A\002\372A5\n3gdcha" + + "rdwaremanagement.googleapis.com/ChangeLo" + + "gEntry\"\260\001\n\017ListSkusRequest\022@\n\006parent\030\001 \001" + + "(\tB0\340A\002\372A*\022(gdchardwaremanagement.google" + + "apis.com/Sku\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\340" + + "A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"\177\n\020ListSkusRes" + + "ponse\022=\n\004skus\030\001 \003(\0132/.google.cloud.gdcha" + + "rdwaremanagement.v1alpha.Sku\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"O\n\rGe" + + "tSkuRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(gdcha" + + "rdwaremanagement.googleapis.com/Sku\"\262\001\n\020" + + "ListZonesRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+" + + "\022)gdchardwaremanagement.googleapis.com/Z" + + "one\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_toke" + + "n\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010ord" + + "er_by\030\005 \001(\tB\003\340A\001\"\202\001\n\021ListZonesResponse\022?" + + "\n\005zones\030\001 \003(\01320.google.cloud.gdchardware" + + "management.v1alpha.Zone\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"Q\n\016GetZone" + + "Request\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)gdchardwa" + + "remanagement.googleapis.com/Zone\"\322\001\n\021Cre" + + "ateZoneRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)" + + "gdchardwaremanagement.googleapis.com/Zon" + + "e\022\024\n\007zone_id\030\002 \001(\tB\003\340A\001\022C\n\004zone\030\003 \001(\01320." + + "google.cloud.gdchardwaremanagement.v1alp" + + "ha.ZoneB\003\340A\002\022\037\n\nrequest_id\030\004 \001(\tB\013\340A\001\342\214\317" + + "\327\010\002\010\001\"\257\001\n\021UpdateZoneRequest\0224\n\013update_ma" + + "sk\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A" + + "\002\022C\n\004zone\030\002 \001(\01320.google.cloud.gdchardwa" + + "remanagement.v1alpha.ZoneB\003\340A\002\022\037\n\nreques" + + "t_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"u\n\021DeleteZoneReq" + + "uest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)gdchardwarem" + + "anagement.googleapis.com/Zone\022\037\n\nrequest" + + "_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\317\002\n\026SignalZoneSta" + + "teRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)gdchard" + + "waremanagement.googleapis.com/Zone\022\037\n\nre" + + "quest_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022i\n\014state_sig" + + "nal\030\003 \001(\0162N.google.cloud.gdchardwaremana" + + "gement.v1alpha.SignalZoneStateRequest.St" + + "ateSignalB\003\340A\002\"h\n\013StateSignal\022\034\n\030STATE_S" + + "IGNAL_UNSPECIFIED\020\000\022\031\n\025READY_FOR_SITE_TU" + + "RNUP\020\001\022 \n\034FACTORY_TURNUP_CHECKS_FAILED\020\002" + + "\"\200\002\n\021OperationMetadata\0224\n\013create_time\030\001 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n\010" + + "end_time\030\002 \001(\0132\032.google.protobuf.Timesta" + + "mpB\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\026" + + "requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013api" + + "_version\030\007 \001(\tB\003\340A\0032\372:\n\025GDCHardwareManag" + + "ement\022\315\001\n\nListOrders\022=.google.cloud.gdch" + + "ardwaremanagement.v1alpha.ListOrdersRequ" + + "est\032>.google.cloud.gdchardwaremanagement" + + ".v1alpha.ListOrdersResponse\"@\332A\006parent\202\323" + + "\344\223\0021\022//v1alpha/{parent=projects/*/locati" + + "ons/*}/orders\022\272\001\n\010GetOrder\022;.google.clou" + + "d.gdchardwaremanagement.v1alpha.GetOrder" + + "Request\0321.google.cloud.gdchardwaremanage" + + "ment.v1alpha.Order\">\332A\004name\202\323\344\223\0021\022//v1al" + + "pha/{name=projects/*/locations/*/orders/" + + "*}\022\341\001\n\013CreateOrder\022>.google.cloud.gdchar" + + "dwaremanagement.v1alpha.CreateOrderReque" + + "st\032\035.google.longrunning.Operation\"s\312A\032\n\005" + + "Order\022\021OperationMetadata\332A\025parent,order," + + "order_id\202\323\344\223\0028\"//v1alpha/{parent=project" + + "s/*/locations/*}/orders:\005order\022\343\001\n\013Updat" + + "eOrder\022>.google.cloud.gdchardwaremanagem" + + "ent.v1alpha.UpdateOrderRequest\032\035.google." + + "longrunning.Operation\"u\312A\032\n\005Order\022\021Opera" + + "tionMetadata\332A\021order,update_mask\202\323\344\223\002>25" + + "/v1alpha/{order.name=projects/*/location" + + "s/*/orders/*}:\005order\022\331\001\n\013DeleteOrder\022>.g" + + "oogle.cloud.gdchardwaremanagement.v1alph" + + "a.DeleteOrderRequest\032\035.google.longrunnin" + + "g.Operation\"k\312A*\n\025google.protobuf.Empty\022" + + "\021OperationMetadata\332A\004name\202\323\344\223\0021*//v1alph" + + "a/{name=projects/*/locations/*/orders/*}" + + "\022\323\001\n\013SubmitOrder\022>.google.cloud.gdchardw" + + "aremanagement.v1alpha.SubmitOrderRequest" + + "\032\035.google.longrunning.Operation\"e\312A\032\n\005Or" + + "der\022\021OperationMetadata\332A\004name\202\323\344\223\002;\"6/v1" + + "alpha/{name=projects/*/locations/*/order" + + "s/*}:submit:\001*\022\311\001\n\tListSites\022<.google.cl" + + "oud.gdchardwaremanagement.v1alpha.ListSi" + + "tesRequest\032=.google.cloud.gdchardwareman" + + "agement.v1alpha.ListSitesResponse\"?\332A\006pa" + + "rent\202\323\344\223\0020\022./v1alpha/{parent=projects/*/" + + "locations/*}/sites\022\266\001\n\007GetSite\022:.google." + + "cloud.gdchardwaremanagement.v1alpha.GetS" + + "iteRequest\0320.google.cloud.gdchardwareman" + + "agement.v1alpha.Site\"=\332A\004name\202\323\344\223\0020\022./v1" + + "alpha/{name=projects/*/locations/*/sites" + + "/*}\022\332\001\n\nCreateSite\022=.google.cloud.gdchar" + + "dwaremanagement.v1alpha.CreateSiteReques" + + "t\032\035.google.longrunning.Operation\"n\312A\031\n\004S" + + "ite\022\021OperationMetadata\332A\023parent,site,sit" + + "e_id\202\323\344\223\0026\"./v1alpha/{parent=projects/*/" + + "locations/*}/sites:\004site\022\334\001\n\nUpdateSite\022" + + "=.google.cloud.gdchardwaremanagement.v1a" + + "lpha.UpdateSiteRequest\032\035.google.longrunn" + + "ing.Operation\"p\312A\031\n\004Site\022\021OperationMetad" + + "ata\332A\020site,update_mask\202\323\344\223\002;23/v1alpha/{" + + "site.name=projects/*/locations/*/sites/*" + + "}:\004site\022\366\001\n\022ListHardwareGroups\022E.google." + + "cloud.gdchardwaremanagement.v1alpha.List" + + "HardwareGroupsRequest\032F.google.cloud.gdc" + + "hardwaremanagement.v1alpha.ListHardwareG" + + "roupsResponse\"Q\332A\006parent\202\323\344\223\002B\022@/v1alpha" + + "/{parent=projects/*/locations/*/orders/*" + + "}/hardwareGroups\022\343\001\n\020GetHardwareGroup\022C." + + "google.cloud.gdchardwaremanagement.v1alp" + + "ha.GetHardwareGroupRequest\0329.google.clou" + + "d.gdchardwaremanagement.v1alpha.Hardware" + + "Group\"O\332A\004name\202\323\344\223\002B\022@/v1alpha/{name=pro" + + "jects/*/locations/*/orders/*/hardwareGro" + + "ups/*}\022\246\002\n\023CreateHardwareGroup\022F.google." + + "cloud.gdchardwaremanagement.v1alpha.Crea" + + "teHardwareGroupRequest\032\035.google.longrunn" + + "ing.Operation\"\247\001\312A\"\n\rHardwareGroup\022\021Oper" + + "ationMetadata\332A\'parent,hardware_group,ha" + + "rdware_group_id\202\323\344\223\002R\"@/v1alpha/{parent=" + + "projects/*/locations/*/orders/*}/hardwar" + + "eGroups:\016hardware_group\022\250\002\n\023UpdateHardwa" + + "reGroup\022F.google.cloud.gdchardwaremanage" + + "ment.v1alpha.UpdateHardwareGroupRequest\032" + + "\035.google.longrunning.Operation\"\251\001\312A\"\n\rHa" + + "rdwareGroup\022\021OperationMetadata\332A\032hardwar" + + "e_group,update_mask\202\323\344\223\002a2O/v1alpha/{har" + + "dware_group.name=projects/*/locations/*/" + + "orders/*/hardwareGroups/*}:\016hardware_gro" + + "up\022\372\001\n\023DeleteHardwareGroup\022F.google.clou" + + "d.gdchardwaremanagement.v1alpha.DeleteHa" + + "rdwareGroupRequest\032\035.google.longrunning." + + "Operation\"|\312A*\n\025google.protobuf.Empty\022\021O" + + "perationMetadata\332A\004name\202\323\344\223\002B*@/v1alpha/" + + "{name=projects/*/locations/*/orders/*/ha" + + "rdwareGroups/*}\022\325\001\n\014ListHardware\022?.googl" + + "e.cloud.gdchardwaremanagement.v1alpha.Li" + + "stHardwareRequest\032@.google.cloud.gdchard" + + "waremanagement.v1alpha.ListHardwareRespo" + + "nse\"B\332A\006parent\202\323\344\223\0023\0221/v1alpha/{parent=p" + + "rojects/*/locations/*}/hardware\022\305\001\n\013GetH" + + "ardware\022>.google.cloud.gdchardwaremanage" + + "ment.v1alpha.GetHardwareRequest\0324.google" + + ".cloud.gdchardwaremanagement.v1alpha.Har" + + "dware\"@\332A\004name\202\323\344\223\0023\0221/v1alpha/{name=pro" + + "jects/*/locations/*/hardware/*}\022\366\001\n\016Crea" + + "teHardware\022A.google.cloud.gdchardwareman" + + "agement.v1alpha.CreateHardwareRequest\032\035." + + "google.longrunning.Operation\"\201\001\312A\035\n\010Hard" + + "ware\022\021OperationMetadata\332A\033parent,hardwar" + + "e,hardware_id\202\323\344\223\002=\"1/v1alpha/{parent=pr" + + "ojects/*/locations/*}/hardware:\010hardware" + + "\022\370\001\n\016UpdateHardware\022A.google.cloud.gdcha" + + "rdwaremanagement.v1alpha.UpdateHardwareR" + + "equest\032\035.google.longrunning.Operation\"\203\001" + + "\312A\035\n\010Hardware\022\021OperationMetadata\332A\024hardw" + + "are,update_mask\202\323\344\223\002F2:/v1alpha/{hardwar" + + "e.name=projects/*/locations/*/hardware/*" + + "}:\010hardware\022\341\001\n\016DeleteHardware\022A.google." + + "cloud.gdchardwaremanagement.v1alpha.Dele" + + "teHardwareRequest\032\035.google.longrunning.O" + + "peration\"m\312A*\n\025google.protobuf.Empty\022\021Op" + + "erationMetadata\332A\004name\202\323\344\223\0023*1/v1alpha/{" + + "name=projects/*/locations/*/hardware/*}\022" + + "\336\001\n\014ListComments\022?.google.cloud.gdchardw" + + "aremanagement.v1alpha.ListCommentsReques" + + "t\032@.google.cloud.gdchardwaremanagement.v" + + "1alpha.ListCommentsResponse\"K\332A\006parent\202\323" + + "\344\223\002<\022:/v1alpha/{parent=projects/*/locati" + + "ons/*/orders/*}/comments\022\313\001\n\nGetComment\022" + + "=.google.cloud.gdchardwaremanagement.v1a" + + "lpha.GetCommentRequest\0323.google.cloud.gd" + + "chardwaremanagement.v1alpha.Comment\"I\332A\004" + + "name\202\323\344\223\002<\022:/v1alpha/{name=projects/*/lo" + + "cations/*/orders/*/comments/*}\022\371\001\n\rCreat" + + "eComment\022@.google.cloud.gdchardwaremanag" + + "ement.v1alpha.CreateCommentRequest\032\035.goo" + + "gle.longrunning.Operation\"\206\001\312A\034\n\007Comment" + + "\022\021OperationMetadata\332A\031parent,comment,com" + + "ment_id\202\323\344\223\002E\":/v1alpha/{parent=projects" + + "/*/locations/*/orders/*}/comments:\007comme" + + "nt\022\376\001\n\024ListChangeLogEntries\022G.google.clo" + + "ud.gdchardwaremanagement.v1alpha.ListCha" + + "ngeLogEntriesRequest\032H.google.cloud.gdch" + + "ardwaremanagement.v1alpha.ListChangeLogE" + + "ntriesResponse\"S\332A\006parent\202\323\344\223\002D\022B/v1alph" + + "a/{parent=projects/*/locations/*/orders/" + + "*}/changeLogEntries\022\350\001\n\021GetChangeLogEntr" + + "y\022D.google.cloud.gdchardwaremanagement.v" + + "1alpha.GetChangeLogEntryRequest\032:.google" + + ".cloud.gdchardwaremanagement.v1alpha.Cha" + + "ngeLogEntry\"Q\332A\004name\202\323\344\223\002D\022B/v1alpha/{na" + + "me=projects/*/locations/*/orders/*/chang" + + "eLogEntries/*}\022\305\001\n\010ListSkus\022;.google.clo" + + "ud.gdchardwaremanagement.v1alpha.ListSku" + + "sRequest\032<.google.cloud.gdchardwaremanag" + + "ement.v1alpha.ListSkusResponse\">\332A\006paren" + + "t\202\323\344\223\002/\022-/v1alpha/{parent=projects/*/loc" + + "ations/*}/skus\022\262\001\n\006GetSku\0229.google.cloud" + + ".gdchardwaremanagement.v1alpha.GetSkuReq" + + "uest\032/.google.cloud.gdchardwaremanagemen" + + "t.v1alpha.Sku\"<\332A\004name\202\323\344\223\002/\022-/v1alpha/{" + + "name=projects/*/locations/*/skus/*}\022\311\001\n\t" + + "ListZones\022<.google.cloud.gdchardwaremana" + + "gement.v1alpha.ListZonesRequest\032=.google" + + ".cloud.gdchardwaremanagement.v1alpha.Lis" + + "tZonesResponse\"?\332A\006parent\202\323\344\223\0020\022./v1alph" + + "a/{parent=projects/*/locations/*}/zones\022" + + "\266\001\n\007GetZone\022:.google.cloud.gdchardwarema" + + "nagement.v1alpha.GetZoneRequest\0320.google" + + ".cloud.gdchardwaremanagement.v1alpha.Zon" + + "e\"=\332A\004name\202\323\344\223\0020\022./v1alpha/{name=project" + + "s/*/locations/*/zones/*}\022\332\001\n\nCreateZone\022" + + "=.google.cloud.gdchardwaremanagement.v1a" + + "lpha.CreateZoneRequest\032\035.google.longrunn" + + "ing.Operation\"n\312A\031\n\004Zone\022\021OperationMetad" + + "ata\332A\023parent,zone,zone_id\202\323\344\223\0026\"./v1alph" + + "a/{parent=projects/*/locations/*}/zones:" + + "\004zone\022\334\001\n\nUpdateZone\022=.google.cloud.gdch" + + "ardwaremanagement.v1alpha.UpdateZoneRequ" + + "est\032\035.google.longrunning.Operation\"p\312A\031\n" + + "\004Zone\022\021OperationMetadata\332A\020zone,update_m" + + "ask\202\323\344\223\002;23/v1alpha/{zone.name=projects/" + + "*/locations/*/zones/*}:\004zone\022\326\001\n\nDeleteZ" + + "one\022=.google.cloud.gdchardwaremanagement" + + ".v1alpha.DeleteZoneRequest\032\035.google.long" + + "running.Operation\"j\312A*\n\025google.protobuf." + + "Empty\022\021OperationMetadata\332A\004name\202\323\344\223\0020*./" + + "v1alpha/{name=projects/*/locations/*/zon" + + "es/*}\022\346\001\n\017SignalZoneState\022B.google.cloud" + + ".gdchardwaremanagement.v1alpha.SignalZon" + + "eStateRequest\032\035.google.longrunning.Opera" + + "tion\"p\312A\031\n\004Zone\022\021OperationMetadata\332A\021nam" + + "e,state_signal\202\323\344\223\002:\"5/v1alpha/{name=pro" + + "jects/*/locations/*/zones/*}:signal:\001*\032X" + + "\312A$gdchardwaremanagement.googleapis.com\322" + + "A.https://www.googleapis.com/auth/cloud-" + + "platformB\260\002\n.com.google.cloud.gdchardwar" + + "emanagement.v1alphaB\014ServiceProtoP\001Zdclo" + + "ud.google.com/go/gdchardwaremanagement/a" + + "piv1alpha/gdchardwaremanagementpb;gdchar" + + "dwaremanagementpb\252\002*Google.Cloud.GdcHard" + + "wareManagement.V1Alpha\312\002*Google\\Cloud\\Gd" + + "cHardwareManagement\\V1alpha\352\002-Google::Cl" + + "oud::GDCHardwareManagement::V1alphab\006pro" + + "to3" + }; + 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.gdchardwaremanagement.v1alpha.ResourcesProto.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_gdchardwaremanagement_v1alpha_ListOrdersRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListOrdersResponse_descriptor, + new java.lang.String[] { + "Orders", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetOrderRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetOrderRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetOrderRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateOrderRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateOrderRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateOrderRequest_descriptor, + new java.lang.String[] { + "Parent", "OrderId", "Order", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateOrderRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateOrderRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateOrderRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Order", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteOrderRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteOrderRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteOrderRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Force", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SubmitOrderRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SubmitOrderRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SubmitOrderRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSitesResponse_descriptor, + new java.lang.String[] { + "Sites", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSiteRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSiteRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSiteRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateSiteRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateSiteRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateSiteRequest_descriptor, + new java.lang.String[] { + "Parent", "SiteId", "Site", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateSiteRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateSiteRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateSiteRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Site", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareGroupsResponse_descriptor, + new java.lang.String[] { + "HardwareGroups", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareGroupRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareGroupRequest_descriptor, + new java.lang.String[] { + "Parent", "HardwareGroupId", "HardwareGroup", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareGroupRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "HardwareGroup", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareGroupRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareGroupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareGroupRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListHardwareResponse_descriptor, + new java.lang.String[] { + "Hardware", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetHardwareRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateHardwareRequest_descriptor, + new java.lang.String[] { + "Parent", "HardwareId", "Hardware", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Hardware", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteHardwareRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsResponse_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListCommentsResponse_descriptor, + new java.lang.String[] { + "Comments", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetCommentRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetCommentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetCommentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateCommentRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateCommentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateCommentRequest_descriptor, + new java.lang.String[] { + "Parent", "CommentId", "Comment", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesResponse_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListChangeLogEntriesResponse_descriptor, + new java.lang.String[] { + "ChangeLogEntries", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetChangeLogEntryRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetChangeLogEntryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetChangeLogEntryRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusResponse_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListSkusResponse_descriptor, + new java.lang.String[] { + "Skus", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSkuRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSkuRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetSkuRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesRequest_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesResponse_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_ListZonesResponse_descriptor, + new java.lang.String[] { + "Zones", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetZoneRequest_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetZoneRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_GetZoneRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateZoneRequest_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateZoneRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_CreateZoneRequest_descriptor, + new java.lang.String[] { + "Parent", "ZoneId", "Zone", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateZoneRequest_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateZoneRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateZoneRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Zone", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteZoneRequest_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteZoneRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_DeleteZoneRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SignalZoneStateRequest_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SignalZoneStateRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_SignalZoneStateRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "StateSignal", + }); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_cloud_gdchardwaremanagement_v1alpha_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_gdchardwaremanagement_v1alpha_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.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.gdchardwaremanagement.v1alpha.ResourcesProto.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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SignalZoneStateRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SignalZoneStateRequest.java new file mode 100644 index 000000000000..7cb0175dbb98 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SignalZoneStateRequest.java @@ -0,0 +1,1200 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to signal the state of a zone.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest} + */ +public final class SignalZoneStateRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest) + SignalZoneStateRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SignalZoneStateRequest.newBuilder() to construct. + private SignalZoneStateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SignalZoneStateRequest() { + name_ = ""; + requestId_ = ""; + stateSignal_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SignalZoneStateRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SignalZoneStateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SignalZoneStateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.Builder.class); + } + + /** + * + * + *
+   * Valid state signals for a zone.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal} + */ + public enum StateSignal implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State signal of the zone is unspecified.
+     * 
+ * + * STATE_SIGNAL_UNSPECIFIED = 0; + */ + STATE_SIGNAL_UNSPECIFIED(0), + /** + * + * + *
+     * The Zone is ready for site turnup.
+     * 
+ * + * READY_FOR_SITE_TURNUP = 1; + */ + READY_FOR_SITE_TURNUP(1), + /** + * + * + *
+     * The Zone failed in factory turnup checks.
+     * 
+ * + * FACTORY_TURNUP_CHECKS_FAILED = 2; + */ + FACTORY_TURNUP_CHECKS_FAILED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State signal of the zone is unspecified.
+     * 
+ * + * STATE_SIGNAL_UNSPECIFIED = 0; + */ + public static final int STATE_SIGNAL_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The Zone is ready for site turnup.
+     * 
+ * + * READY_FOR_SITE_TURNUP = 1; + */ + public static final int READY_FOR_SITE_TURNUP_VALUE = 1; + /** + * + * + *
+     * The Zone failed in factory turnup checks.
+     * 
+ * + * FACTORY_TURNUP_CHECKS_FAILED = 2; + */ + public static final int FACTORY_TURNUP_CHECKS_FAILED_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 StateSignal 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 StateSignal forNumber(int value) { + switch (value) { + case 0: + return STATE_SIGNAL_UNSPECIFIED; + case 1: + return READY_FOR_SITE_TURNUP; + case 2: + return FACTORY_TURNUP_CHECKS_FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StateSignal findValueByNumber(int number) { + return StateSignal.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.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final StateSignal[] VALUES = values(); + + public static StateSignal 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 StateSignal(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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; + } + } + + public static final int STATE_SIGNAL_FIELD_NUMBER = 3; + private int stateSignal_ = 0; + /** + * + * + *
+   * Required. The state signal to send for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal state_signal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for stateSignal. + */ + @java.lang.Override + public int getStateSignalValue() { + return stateSignal_; + } + /** + * + * + *
+   * Required. The state signal to send for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal state_signal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The stateSignal. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal + getStateSignal() { + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal result = + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal.forNumber( + stateSignal_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal + .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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (stateSignal_ + != com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal + .STATE_SIGNAL_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, stateSignal_); + } + 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_); + } + if (stateSignal_ + != com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal + .STATE_SIGNAL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, stateSignal_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (stateSignal_ != other.stateSignal_) return false; + if (!getUnknownFields().equals(other.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 = (37 * hash) + STATE_SIGNAL_FIELD_NUMBER; + hash = (53 * hash) + stateSignal_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest 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.gdchardwaremanagement.v1alpha.SignalZoneStateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest + 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.gdchardwaremanagement.v1alpha.SignalZoneStateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest 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.gdchardwaremanagement.v1alpha.SignalZoneStateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to signal the state of a zone.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SignalZoneStateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SignalZoneStateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.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_ = ""; + stateSignal_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SignalZoneStateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.stateSignal_ = stateSignal_; + } + } + + @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.gdchardwaremanagement.v1alpha.SignalZoneStateRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.stateSignal_ != 0) { + setStateSignalValue(other.getStateSignalValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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 + case 24: + { + stateSignal_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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; + } + + private int stateSignal_ = 0; + /** + * + * + *
+     * Required. The state signal to send for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal state_signal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for stateSignal. + */ + @java.lang.Override + public int getStateSignalValue() { + return stateSignal_; + } + /** + * + * + *
+     * Required. The state signal to send for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal state_signal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for stateSignal to set. + * @return This builder for chaining. + */ + public Builder setStateSignalValue(int value) { + stateSignal_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The state signal to send for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal state_signal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The stateSignal. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal + getStateSignal() { + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal result = + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal + .forNumber(stateSignal_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The state signal to send for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal state_signal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The stateSignal to set. + * @return This builder for chaining. + */ + public Builder setStateSignal( + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + stateSignal_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The state signal to send for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal state_signal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearStateSignal() { + bitField0_ = (bitField0_ & ~0x00000004); + stateSignal_ = 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.gdchardwaremanagement.v1alpha.SignalZoneStateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SignalZoneStateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SignalZoneStateRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SignalZoneStateRequestOrBuilder.java new file mode 100644 index 000000000000..1134897089f6 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SignalZoneStateRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface SignalZoneStateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Required. The state signal to send for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal state_signal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for stateSignal. + */ + int getStateSignalValue(); + /** + * + * + *
+   * Required. The state signal to send for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal state_signal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The stateSignal. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal + getStateSignal(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Site.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Site.java new file mode 100644 index 000000000000..fc34d8d05fd5 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Site.java @@ -0,0 +1,3233 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A physical site where hardware will be installed.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Site} + */ +public final class Site extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.Site) + SiteOrBuilder { + private static final long serialVersionUID = 0L; + // Use Site.newBuilder() to construct. + private Site(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Site() { + name_ = ""; + displayName_ = ""; + description_ = ""; + googleMapsPinUri_ = ""; + accessTimes_ = java.util.Collections.emptyList(); + notes_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Site(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Site.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Name of the site.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Identifier. Name of the site.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * 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 = 24; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. Display name of this Site.
+   * 
+ * + * string display_name = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Display name of this Site.
+   * 
+ * + * string display_name = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 25; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Description of this Site.
+   * 
+ * + * string description = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Description of this Site.
+   * 
+ * + * string description = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when this site was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Time when this site was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this site was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when this site was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Time when this site was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when this site was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_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 associated with this site as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this site as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels associated with this site as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this site as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 ORGANIZATION_CONTACT_FIELD_NUMBER = 5; + private com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organizationContact_; + /** + * + * + *
+   * Required. Contact information for this site.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the organizationContact field is set. + */ + @java.lang.Override + public boolean hasOrganizationContact() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Required. Contact information for this site.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The organizationContact. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + getOrganizationContact() { + return organizationContact_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.getDefaultInstance() + : organizationContact_; + } + /** + * + * + *
+   * Required. Contact information for this site.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder + getOrganizationContactOrBuilder() { + return organizationContact_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.getDefaultInstance() + : organizationContact_; + } + + public static final int GOOGLE_MAPS_PIN_URI_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object googleMapsPinUri_ = ""; + /** + * + * + *
+   * Required. A URL to the Google Maps address location of the site.
+   * An example value is `https://goo.gl/maps/xxxxxxxxx`.
+   * 
+ * + * string google_maps_pin_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The googleMapsPinUri. + */ + @java.lang.Override + public java.lang.String getGoogleMapsPinUri() { + java.lang.Object ref = googleMapsPinUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + googleMapsPinUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A URL to the Google Maps address location of the site.
+   * An example value is `https://goo.gl/maps/xxxxxxxxx`.
+   * 
+ * + * string google_maps_pin_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for googleMapsPinUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGoogleMapsPinUriBytes() { + java.lang.Object ref = googleMapsPinUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + googleMapsPinUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCESS_TIMES_FIELD_NUMBER = 26; + + @SuppressWarnings("serial") + private java.util.List accessTimes_; + /** + * + * + *
+   * Optional. The time periods when the site is accessible.
+   * If this field is empty, the site is accessible at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getAccessTimesList() { + return accessTimes_; + } + /** + * + * + *
+   * Optional. The time periods when the site is accessible.
+   * If this field is empty, the site is accessible at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder> + getAccessTimesOrBuilderList() { + return accessTimes_; + } + /** + * + * + *
+   * Optional. The time periods when the site is accessible.
+   * If this field is empty, the site is accessible at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAccessTimesCount() { + return accessTimes_.size(); + } + /** + * + * + *
+   * Optional. The time periods when the site is accessible.
+   * If this field is empty, the site is accessible at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod getAccessTimes(int index) { + return accessTimes_.get(index); + } + /** + * + * + *
+   * Optional. The time periods when the site is accessible.
+   * If this field is empty, the site is accessible at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder getAccessTimesOrBuilder( + int index) { + return accessTimes_.get(index); + } + + public static final int NOTES_FIELD_NUMBER = 27; + + @SuppressWarnings("serial") + private volatile java.lang.Object notes_ = ""; + /** + * + * + *
+   * Optional. Any additional notes for this Site. Please include information
+   * about:
+   *  - security or access restrictions
+   *  - any regulations affecting the technicians visiting the site
+   *  - any special process or approval required to move the equipment
+   *  - whether a representative will be available during site visits
+   * 
+ * + * string notes = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notes. + */ + @java.lang.Override + public java.lang.String getNotes() { + java.lang.Object ref = notes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notes_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Any additional notes for this Site. Please include information
+   * about:
+   *  - security or access restrictions
+   *  - any regulations affecting the technicians visiting the site
+   *  - any special process or approval required to move the equipment
+   *  - whether a representative will be available during site visits
+   * 
+ * + * string notes = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotesBytes() { + java.lang.Object ref = notes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notes_ = 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 (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getOrganizationContact()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(googleMapsPinUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, googleMapsPinUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, description_); + } + for (int i = 0; i < accessTimes_.size(); i++) { + output.writeMessage(26, accessTimes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notes_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 27, notes_); + } + 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 (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOrganizationContact()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(googleMapsPinUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, googleMapsPinUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(25, description_); + } + for (int i = 0; i < accessTimes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, accessTimes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notes_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, notes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.Site)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.Site other = + (com.google.cloud.gdchardwaremanagement.v1alpha.Site) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) 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 (hasOrganizationContact() != other.hasOrganizationContact()) return false; + if (hasOrganizationContact()) { + if (!getOrganizationContact().equals(other.getOrganizationContact())) return false; + } + if (!getGoogleMapsPinUri().equals(other.getGoogleMapsPinUri())) return false; + if (!getAccessTimesList().equals(other.getAccessTimesList())) return false; + if (!getNotes().equals(other.getNotes())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (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(); + } + if (hasOrganizationContact()) { + hash = (37 * hash) + ORGANIZATION_CONTACT_FIELD_NUMBER; + hash = (53 * hash) + getOrganizationContact().hashCode(); + } + hash = (37 * hash) + GOOGLE_MAPS_PIN_URI_FIELD_NUMBER; + hash = (53 * hash) + getGoogleMapsPinUri().hashCode(); + if (getAccessTimesCount() > 0) { + hash = (37 * hash) + ACCESS_TIMES_FIELD_NUMBER; + hash = (53 * hash) + getAccessTimesList().hashCode(); + } + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + getNotes().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site 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.gdchardwaremanagement.v1alpha.Site parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site 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.gdchardwaremanagement.v1alpha.Site parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site 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.gdchardwaremanagement.v1alpha.Site prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A physical site where hardware will be installed.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Site} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.Site) + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Site.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.Site.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(); + getOrganizationContactFieldBuilder(); + getAccessTimesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + organizationContact_ = null; + if (organizationContactBuilder_ != null) { + organizationContactBuilder_.dispose(); + organizationContactBuilder_ = null; + } + googleMapsPinUri_ = ""; + if (accessTimesBuilder_ == null) { + accessTimes_ = java.util.Collections.emptyList(); + } else { + accessTimes_ = null; + accessTimesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + notes_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Site_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Site getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Site build() { + com.google.cloud.gdchardwaremanagement.v1alpha.Site result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Site buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.Site result = + new com.google.cloud.gdchardwaremanagement.v1alpha.Site(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.Site result) { + if (accessTimesBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + accessTimes_ = java.util.Collections.unmodifiableList(accessTimes_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.accessTimes_ = accessTimes_; + } else { + result.accessTimes_ = accessTimesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.Site result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.organizationContact_ = + organizationContactBuilder_ == null + ? organizationContact_ + : organizationContactBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.googleMapsPinUri_ = googleMapsPinUri_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.notes_ = notes_; + } + 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.gdchardwaremanagement.v1alpha.Site) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.Site) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.Site other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000020; + if (other.hasOrganizationContact()) { + mergeOrganizationContact(other.getOrganizationContact()); + } + if (!other.getGoogleMapsPinUri().isEmpty()) { + googleMapsPinUri_ = other.googleMapsPinUri_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (accessTimesBuilder_ == null) { + if (!other.accessTimes_.isEmpty()) { + if (accessTimes_.isEmpty()) { + accessTimes_ = other.accessTimes_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureAccessTimesIsMutable(); + accessTimes_.addAll(other.accessTimes_); + } + onChanged(); + } + } else { + if (!other.accessTimes_.isEmpty()) { + if (accessTimesBuilder_.isEmpty()) { + accessTimesBuilder_.dispose(); + accessTimesBuilder_ = null; + accessTimes_ = other.accessTimes_; + bitField0_ = (bitField0_ & ~0x00000100); + accessTimesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAccessTimesFieldBuilder() + : null; + } else { + accessTimesBuilder_.addAllMessages(other.accessTimes_); + } + } + } + if (!other.getNotes().isEmpty()) { + notes_ = other.notes_; + bitField0_ |= 0x00000200; + 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_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: + { + input.readMessage( + getOrganizationContactFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 50: + { + googleMapsPinUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 50 + case 194: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 194 + case 202: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 202 + case 210: + { + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.parser(), + extensionRegistry); + if (accessTimesBuilder_ == null) { + ensureAccessTimesIsMutable(); + accessTimes_.add(m); + } else { + accessTimesBuilder_.addMessage(m); + } + break; + } // case 210 + case 218: + { + notes_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 218 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + 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 the site.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifier. Name of the site.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifier. Name of the site.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * 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 the site.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * 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 the site.
+     * Format: `projects/{project}/locations/{location}/sites/{site}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. Display name of this Site.
+     * 
+ * + * string display_name = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Display name of this Site.
+     * 
+ * + * string display_name = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Display name of this Site.
+     * 
+ * + * string display_name = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Display name of this Site.
+     * 
+ * + * string display_name = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Display name of this Site.
+     * 
+ * + * string display_name = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of this Site.
+     * 
+ * + * string description = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Description of this Site.
+     * 
+ * + * string description = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Description of this Site.
+     * 
+ * + * string description = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of this Site.
+     * 
+ * + * string description = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of this Site.
+     * 
+ * + * string description = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when this site was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Time when this site was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this site was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this site was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this site was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when this site was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this site was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this site was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this site was created.
+     * 
+ * + * + * .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. Time when this site was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Time when this site was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this site was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this site was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this site was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when this site was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this site was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this site was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when this site was last updated.
+     * 
+ * + * + * .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_ |= 0x00000020; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels associated with this site as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this site as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this site as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this site as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels associated with this site as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000020; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this site as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + /** + * + * + *
+     * Optional. Labels associated with this site as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organizationContact_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder> + organizationContactBuilder_; + /** + * + * + *
+     * Required. Contact information for this site.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the organizationContact field is set. + */ + public boolean hasOrganizationContact() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Required. Contact information for this site.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The organizationContact. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + getOrganizationContact() { + if (organizationContactBuilder_ == null) { + return organizationContact_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + .getDefaultInstance() + : organizationContact_; + } else { + return organizationContactBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Contact information for this site.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOrganizationContact( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact value) { + if (organizationContactBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + organizationContact_ = value; + } else { + organizationContactBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Contact information for this site.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOrganizationContact( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder + builderForValue) { + if (organizationContactBuilder_ == null) { + organizationContact_ = builderForValue.build(); + } else { + organizationContactBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Contact information for this site.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOrganizationContact( + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact value) { + if (organizationContactBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && organizationContact_ != null + && organizationContact_ + != com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + .getDefaultInstance()) { + getOrganizationContactBuilder().mergeFrom(value); + } else { + organizationContact_ = value; + } + } else { + organizationContactBuilder_.mergeFrom(value); + } + if (organizationContact_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Contact information for this site.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOrganizationContact() { + bitField0_ = (bitField0_ & ~0x00000040); + organizationContact_ = null; + if (organizationContactBuilder_ != null) { + organizationContactBuilder_.dispose(); + organizationContactBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Contact information for this site.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder + getOrganizationContactBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getOrganizationContactFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Contact information for this site.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder + getOrganizationContactOrBuilder() { + if (organizationContactBuilder_ != null) { + return organizationContactBuilder_.getMessageOrBuilder(); + } else { + return organizationContact_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact + .getDefaultInstance() + : organizationContact_; + } + } + /** + * + * + *
+     * Required. Contact information for this site.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder> + getOrganizationContactFieldBuilder() { + if (organizationContactBuilder_ == null) { + organizationContactBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder>( + getOrganizationContact(), getParentForChildren(), isClean()); + organizationContact_ = null; + } + return organizationContactBuilder_; + } + + private java.lang.Object googleMapsPinUri_ = ""; + /** + * + * + *
+     * Required. A URL to the Google Maps address location of the site.
+     * An example value is `https://goo.gl/maps/xxxxxxxxx`.
+     * 
+ * + * string google_maps_pin_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The googleMapsPinUri. + */ + public java.lang.String getGoogleMapsPinUri() { + java.lang.Object ref = googleMapsPinUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + googleMapsPinUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A URL to the Google Maps address location of the site.
+     * An example value is `https://goo.gl/maps/xxxxxxxxx`.
+     * 
+ * + * string google_maps_pin_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for googleMapsPinUri. + */ + public com.google.protobuf.ByteString getGoogleMapsPinUriBytes() { + java.lang.Object ref = googleMapsPinUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + googleMapsPinUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A URL to the Google Maps address location of the site.
+     * An example value is `https://goo.gl/maps/xxxxxxxxx`.
+     * 
+ * + * string google_maps_pin_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The googleMapsPinUri to set. + * @return This builder for chaining. + */ + public Builder setGoogleMapsPinUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + googleMapsPinUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A URL to the Google Maps address location of the site.
+     * An example value is `https://goo.gl/maps/xxxxxxxxx`.
+     * 
+ * + * string google_maps_pin_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGoogleMapsPinUri() { + googleMapsPinUri_ = getDefaultInstance().getGoogleMapsPinUri(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A URL to the Google Maps address location of the site.
+     * An example value is `https://goo.gl/maps/xxxxxxxxx`.
+     * 
+ * + * string google_maps_pin_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for googleMapsPinUri to set. + * @return This builder for chaining. + */ + public Builder setGoogleMapsPinUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + googleMapsPinUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.util.List accessTimes_ = + java.util.Collections.emptyList(); + + private void ensureAccessTimesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + accessTimes_ = + new java.util.ArrayList( + accessTimes_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder> + accessTimesBuilder_; + + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAccessTimesList() { + if (accessTimesBuilder_ == null) { + return java.util.Collections.unmodifiableList(accessTimes_); + } else { + return accessTimesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAccessTimesCount() { + if (accessTimesBuilder_ == null) { + return accessTimes_.size(); + } else { + return accessTimesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod getAccessTimes(int index) { + if (accessTimesBuilder_ == null) { + return accessTimes_.get(index); + } else { + return accessTimesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAccessTimes( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod value) { + if (accessTimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessTimesIsMutable(); + accessTimes_.set(index, value); + onChanged(); + } else { + accessTimesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAccessTimes( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder builderForValue) { + if (accessTimesBuilder_ == null) { + ensureAccessTimesIsMutable(); + accessTimes_.set(index, builderForValue.build()); + onChanged(); + } else { + accessTimesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAccessTimes(com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod value) { + if (accessTimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessTimesIsMutable(); + accessTimes_.add(value); + onChanged(); + } else { + accessTimesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAccessTimes( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod value) { + if (accessTimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessTimesIsMutable(); + accessTimes_.add(index, value); + onChanged(); + } else { + accessTimesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAccessTimes( + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder builderForValue) { + if (accessTimesBuilder_ == null) { + ensureAccessTimesIsMutable(); + accessTimes_.add(builderForValue.build()); + onChanged(); + } else { + accessTimesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAccessTimes( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder builderForValue) { + if (accessTimesBuilder_ == null) { + ensureAccessTimesIsMutable(); + accessTimes_.add(index, builderForValue.build()); + onChanged(); + } else { + accessTimesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAccessTimes( + java.lang.Iterable + values) { + if (accessTimesBuilder_ == null) { + ensureAccessTimesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accessTimes_); + onChanged(); + } else { + accessTimesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAccessTimes() { + if (accessTimesBuilder_ == null) { + accessTimes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + accessTimesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAccessTimes(int index) { + if (accessTimesBuilder_ == null) { + ensureAccessTimesIsMutable(); + accessTimes_.remove(index); + onChanged(); + } else { + accessTimesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder getAccessTimesBuilder( + int index) { + return getAccessTimesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder + getAccessTimesOrBuilder(int index) { + if (accessTimesBuilder_ == null) { + return accessTimes_.get(index); + } else { + return accessTimesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder> + getAccessTimesOrBuilderList() { + if (accessTimesBuilder_ != null) { + return accessTimesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accessTimes_); + } + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder + addAccessTimesBuilder() { + return getAccessTimesFieldBuilder() + .addBuilder( + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder addAccessTimesBuilder( + int index) { + return getAccessTimesFieldBuilder() + .addBuilder( + index, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The time periods when the site is accessible.
+     * If this field is empty, the site is accessible at all times.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAccessTimesBuilderList() { + return getAccessTimesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder> + getAccessTimesFieldBuilder() { + if (accessTimesBuilder_ == null) { + accessTimesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder>( + accessTimes_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); + accessTimes_ = null; + } + return accessTimesBuilder_; + } + + private java.lang.Object notes_ = ""; + /** + * + * + *
+     * Optional. Any additional notes for this Site. Please include information
+     * about:
+     *  - security or access restrictions
+     *  - any regulations affecting the technicians visiting the site
+     *  - any special process or approval required to move the equipment
+     *  - whether a representative will be available during site visits
+     * 
+ * + * string notes = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notes. + */ + public java.lang.String getNotes() { + java.lang.Object ref = notes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notes_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Any additional notes for this Site. Please include information
+     * about:
+     *  - security or access restrictions
+     *  - any regulations affecting the technicians visiting the site
+     *  - any special process or approval required to move the equipment
+     *  - whether a representative will be available during site visits
+     * 
+ * + * string notes = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notes. + */ + public com.google.protobuf.ByteString getNotesBytes() { + java.lang.Object ref = notes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Any additional notes for this Site. Please include information
+     * about:
+     *  - security or access restrictions
+     *  - any regulations affecting the technicians visiting the site
+     *  - any special process or approval required to move the equipment
+     *  - whether a representative will be available during site visits
+     * 
+ * + * string notes = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The notes to set. + * @return This builder for chaining. + */ + public Builder setNotes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notes_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Any additional notes for this Site. Please include information
+     * about:
+     *  - security or access restrictions
+     *  - any regulations affecting the technicians visiting the site
+     *  - any special process or approval required to move the equipment
+     *  - whether a representative will be available during site visits
+     * 
+ * + * string notes = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNotes() { + notes_ = getDefaultInstance().getNotes(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Any additional notes for this Site. Please include information
+     * about:
+     *  - security or access restrictions
+     *  - any regulations affecting the technicians visiting the site
+     *  - any special process or approval required to move the equipment
+     *  - whether a representative will be available during site visits
+     * 
+ * + * string notes = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for notes to set. + * @return This builder for chaining. + */ + public Builder setNotesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notes_ = value; + bitField0_ |= 0x00000200; + 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.gdchardwaremanagement.v1alpha.Site) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.Site) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.Site DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.Site(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Site getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Site parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Site getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SiteName.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SiteName.java new file mode 100644 index 000000000000..8207874642a3 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SiteName.java @@ -0,0 +1,217 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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 SiteName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SITE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/sites/{site}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String site; + + @Deprecated + protected SiteName() { + project = null; + location = null; + site = null; + } + + private SiteName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + site = Preconditions.checkNotNull(builder.getSite()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSite() { + return site; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SiteName of(String project, String location, String site) { + return newBuilder().setProject(project).setLocation(location).setSite(site).build(); + } + + public static String format(String project, String location, String site) { + return newBuilder().setProject(project).setLocation(location).setSite(site).build().toString(); + } + + public static SiteName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SITE.validatedMatch( + formattedString, "SiteName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("site")); + } + + 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 (SiteName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SITE.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 (site != null) { + fieldMapBuilder.put("site", site); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SITE.instantiate( + "project", project, "location", location, "site", site); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SiteName that = ((SiteName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.site, that.site); + } + 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(site); + return h; + } + + /** Builder for projects/{project}/locations/{location}/sites/{site}. */ + public static class Builder { + private String project; + private String location; + private String site; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSite() { + return site; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setSite(String site) { + this.site = site; + return this; + } + + private Builder(SiteName siteName) { + this.project = siteName.project; + this.location = siteName.location; + this.site = siteName.site; + } + + public SiteName build() { + return new SiteName(this); + } + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SiteOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SiteOrBuilder.java new file mode 100644 index 000000000000..83bcc59494fe --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SiteOrBuilder.java @@ -0,0 +1,419 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface SiteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.Site) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of the site.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Name of the site.
+   * Format: `projects/{project}/locations/{location}/sites/{site}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Display name of this Site.
+   * 
+ * + * string display_name = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. Display name of this Site.
+   * 
+ * + * string display_name = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description of this Site.
+   * 
+ * + * string description = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of this Site.
+   * 
+ * + * string description = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Time when this site was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this site was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this site was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when this site was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when this site was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when this site was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels associated with this site as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels associated with this site as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this site as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels associated with this site as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this site as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Contact information for this site.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the organizationContact field is set. + */ + boolean hasOrganizationContact(); + /** + * + * + *
+   * Required. Contact information for this site.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The organizationContact. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact getOrganizationContact(); + /** + * + * + *
+   * Required. Contact information for this site.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact organization_contact = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactOrBuilder + getOrganizationContactOrBuilder(); + + /** + * + * + *
+   * Required. A URL to the Google Maps address location of the site.
+   * An example value is `https://goo.gl/maps/xxxxxxxxx`.
+   * 
+ * + * string google_maps_pin_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The googleMapsPinUri. + */ + java.lang.String getGoogleMapsPinUri(); + /** + * + * + *
+   * Required. A URL to the Google Maps address location of the site.
+   * An example value is `https://goo.gl/maps/xxxxxxxxx`.
+   * 
+ * + * string google_maps_pin_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for googleMapsPinUri. + */ + com.google.protobuf.ByteString getGoogleMapsPinUriBytes(); + + /** + * + * + *
+   * Optional. The time periods when the site is accessible.
+   * If this field is empty, the site is accessible at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getAccessTimesList(); + /** + * + * + *
+   * Optional. The time periods when the site is accessible.
+   * If this field is empty, the site is accessible at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod getAccessTimes(int index); + /** + * + * + *
+   * Optional. The time periods when the site is accessible.
+   * If this field is empty, the site is accessible at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAccessTimesCount(); + /** + * + * + *
+   * Optional. The time periods when the site is accessible.
+   * If this field is empty, the site is accessible at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAccessTimesOrBuilderList(); + /** + * + * + *
+   * Optional. The time periods when the site is accessible.
+   * If this field is empty, the site is accessible at all times.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.TimePeriod access_times = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder getAccessTimesOrBuilder( + int index); + + /** + * + * + *
+   * Optional. Any additional notes for this Site. Please include information
+   * about:
+   *  - security or access restrictions
+   *  - any regulations affecting the technicians visiting the site
+   *  - any special process or approval required to move the equipment
+   *  - whether a representative will be available during site visits
+   * 
+ * + * string notes = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notes. + */ + java.lang.String getNotes(); + /** + * + * + *
+   * Optional. Any additional notes for this Site. Please include information
+   * about:
+   *  - security or access restrictions
+   *  - any regulations affecting the technicians visiting the site
+   *  - any special process or approval required to move the equipment
+   *  - whether a representative will be available during site visits
+   * 
+ * + * string notes = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notes. + */ + com.google.protobuf.ByteString getNotesBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Sku.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Sku.java new file mode 100644 index 000000000000..27118b6bcf68 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Sku.java @@ -0,0 +1,3168 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A stock keeping unit (SKU) of GDC hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Sku} + */ +public final class Sku extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.Sku) + SkuOrBuilder { + private static final long serialVersionUID = 0L; + // Use Sku.newBuilder() to construct. + private Sku(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Sku() { + name_ = ""; + displayName_ = ""; + instances_ = java.util.Collections.emptyList(); + description_ = ""; + revisionId_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Sku(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Sku_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Sku_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder.class); + } + + /** + * + * + *
+   * Valid types of a SKU.
+   * 
+ * + * Protobuf enum {@code google.cloud.gdchardwaremanagement.v1alpha.Sku.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Type of the SKU is unspecified. This is not an allowed value.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Rack SKU.
+     * 
+ * + * RACK = 1; + */ + RACK(1), + /** + * + * + *
+     * Server SKU.
+     * 
+ * + * SERVER = 2; + */ + SERVER(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Type of the SKU is unspecified. This is not an allowed value.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Rack SKU.
+     * 
+ * + * RACK = 1; + */ + public static final int RACK_VALUE = 1; + /** + * + * + *
+     * Server SKU.
+     * 
+ * + * SERVER = 2; + */ + public static final int SERVER_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 Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return RACK; + case 2: + return SERVER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Sku.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.gdchardwaremanagement.v1alpha.Sku.Type) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Name of this SKU.
+   * Format: `projects/{project}/locations/{location}/skus/{sku}`
+   * 
+ * + * 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 this SKU.
+   * Format: `projects/{project}/locations/{location}/skus/{sku}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Output only. Display name of this SKU.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Display name of this SKU.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when this SKU was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Time when this SKU was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this SKU was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when this SKU was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Time when this SKU was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when this SKU was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config_; + /** + * + * + *
+   * Output only. Configuration for this SKU.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Configuration for this SKU.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig getConfig() { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.getDefaultInstance() + : config_; + } + /** + * + * + *
+   * Output only. Configuration for this SKU.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfigOrBuilder getConfigOrBuilder() { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.getDefaultInstance() + : config_; + } + + public static final int INSTANCES_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List instances_; + /** + * + * + *
+   * Output only. Available instances of this SKU. This field should be used for
+   * checking availability of a SKU.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getInstancesList() { + return instances_; + } + /** + * + * + *
+   * Output only. Available instances of this SKU. This field should be used for
+   * checking availability of a SKU.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceOrBuilder> + getInstancesOrBuilderList() { + return instances_; + } + /** + * + * + *
+   * Output only. Available instances of this SKU. This field should be used for
+   * checking availability of a SKU.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+   * Output only. Available instances of this SKU. This field should be used for
+   * checking availability of a SKU.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+   * Output only. Available instances of this SKU. This field should be used for
+   * checking availability of a SKU.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceOrBuilder getInstancesOrBuilder( + int index) { + return instances_.get(index); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Output only. Description of this SKU.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. Description of this SKU.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 REVISION_ID_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object revisionId_ = ""; + /** + * + * + *
+   * Output only. The SKU revision ID.
+   * A new revision is created whenever `config` is updated. The format is an
+   * 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The SKU revision ID.
+   * A new revision is created whenever `config` is updated. The format is an
+   * 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_ACTIVE_FIELD_NUMBER = 10; + private boolean isActive_ = false; + /** + * + * + *
+   * Output only. Flag to indicate whether or not this revision is active. Only
+   * an active revision can be used in a new Order.
+   * 
+ * + * bool is_active = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isActive. + */ + @java.lang.Override + public boolean getIsActive() { + return isActive_; + } + + public static final int TYPE_FIELD_NUMBER = 11; + private int type_ = 0; + /** + * + * + *
+   * Output only. Type of this SKU.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Sku.Type type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Output only. Type of this SKU.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Sku.Type type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type getType() { + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type result = + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type.forNumber(type_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type.UNRECOGNIZED + : result; + } + + public static final int VCPU_COUNT_FIELD_NUMBER = 12; + private int vcpuCount_ = 0; + /** + * + * + *
+   * Output only. The vCPU count associated with this SKU.
+   * 
+ * + * int32 vcpu_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vcpuCount. + */ + @java.lang.Override + public int getVcpuCount() { + return vcpuCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getConfig()); + } + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(7, instances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, revisionId_); + } + if (isActive_ != false) { + output.writeBool(10, isActive_); + } + if (type_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(11, type_); + } + if (vcpuCount_ != 0) { + output.writeInt32(12, vcpuCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getConfig()); + } + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, instances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, revisionId_); + } + if (isActive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, isActive_); + } + if (type_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, type_); + } + if (vcpuCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, vcpuCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.Sku)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.Sku other = + (com.google.cloud.gdchardwaremanagement.v1alpha.Sku) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getRevisionId().equals(other.getRevisionId())) return false; + if (getIsActive() != other.getIsActive()) return false; + if (type_ != other.type_) return false; + if (getVcpuCount() != other.getVcpuCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + hash = (37 * hash) + IS_ACTIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsActive()); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + VCPU_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getVcpuCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku 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.gdchardwaremanagement.v1alpha.Sku parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku 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.gdchardwaremanagement.v1alpha.Sku parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku 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.gdchardwaremanagement.v1alpha.Sku prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A stock keeping unit (SKU) of GDC hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Sku} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.Sku) + com.google.cloud.gdchardwaremanagement.v1alpha.SkuOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Sku_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Sku_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.Sku.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(); + getConfigFieldBuilder(); + getInstancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + } else { + instances_ = null; + instancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + description_ = ""; + revisionId_ = ""; + isActive_ = false; + type_ = 0; + vcpuCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Sku_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Sku.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku build() { + com.google.cloud.gdchardwaremanagement.v1alpha.Sku result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.Sku result = + new com.google.cloud.gdchardwaremanagement.v1alpha.Sku(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.Sku result) { + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.Sku result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.config_ = configBuilder_ == null ? config_ : configBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.revisionId_ = revisionId_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.isActive_ = isActive_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.vcpuCount_ = vcpuCount_; + } + 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.gdchardwaremanagement.v1alpha.Sku) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.Sku) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.Sku other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.Sku.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.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000020); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getRevisionId().isEmpty()) { + revisionId_ = other.revisionId_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.getIsActive() != false) { + setIsActive(other.getIsActive()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getVcpuCount() != 0) { + setVcpuCount(other.getVcpuCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 50: + { + input.readMessage(getConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.parser(), + extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 74: + { + revisionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 80: + { + isActive_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 88: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 96: + { + vcpuCount_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 96 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + 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 this SKU.
+     * Format: `projects/{project}/locations/{location}/skus/{sku}`
+     * 
+ * + * 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 this SKU.
+     * Format: `projects/{project}/locations/{location}/skus/{sku}`
+     * 
+ * + * 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 this SKU.
+     * Format: `projects/{project}/locations/{location}/skus/{sku}`
+     * 
+ * + * 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 this SKU.
+     * Format: `projects/{project}/locations/{location}/skus/{sku}`
+     * 
+ * + * 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 this SKU.
+     * Format: `projects/{project}/locations/{location}/skus/{sku}`
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * Output only. Display name of this SKU.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Display name of this SKU.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Display name of this SKU.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Display name of this SKU.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Display name of this SKU.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private 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. Time when this SKU was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Time when this SKU was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this SKU was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this SKU was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this SKU was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when this SKU was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this SKU was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this SKU was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this SKU was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_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> + 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. Time when this SKU was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Time when this SKU was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this SKU was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this SKU was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this SKU was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when this SKU was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this SKU was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when this SKU was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when this SKU was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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.cloud.gdchardwaremanagement.v1alpha.SkuConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * Output only. Configuration for this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Configuration for this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The config. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Configuration for this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setConfig(com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + } else { + configBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Configuration for this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setConfig( + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Configuration for this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeConfig(com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig value) { + if (configBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && config_ != null + && config_ + != com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.getDefaultInstance()) { + getConfigBuilder().mergeFrom(value); + } else { + config_ = value; + } + } else { + configBuilder_.mergeFrom(value); + } + if (config_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Configuration for this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Configuration for this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.Builder getConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Configuration for this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfigOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.getDefaultInstance() + : config_; + } + } + /** + * + * + *
+     * Output only. Configuration for this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + instances_ = + new java.util.ArrayList( + instances_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstances( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstances( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInstances(com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInstances( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInstances( + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addInstances( + int index, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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; + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder getInstancesBuilder( + int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceOrBuilder + getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceOrBuilder> + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder + addInstancesBuilder() { + return getInstancesFieldBuilder() + .addBuilder( + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder addInstancesBuilder( + int index) { + return getInstancesFieldBuilder() + .addBuilder( + index, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Available instances of this SKU. This field should be used for
+     * checking availability of a SKU.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceOrBuilder>( + instances_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Output only. Description of this SKU.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. Description of this SKU.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. Description of this SKU.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Description of this SKU.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Description of this SKU.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object revisionId_ = ""; + /** + * + * + *
+     * Output only. The SKU revision ID.
+     * A new revision is created whenever `config` is updated. The format is an
+     * 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The SKU revision ID.
+     * A new revision is created whenever `config` is updated. The format is an
+     * 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The SKU revision ID.
+     * A new revision is created whenever `config` is updated. The format is an
+     * 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + revisionId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The SKU revision ID.
+     * A new revision is created whenever `config` is updated. The format is an
+     * 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + revisionId_ = getDefaultInstance().getRevisionId(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The SKU revision ID.
+     * A new revision is created whenever `config` is updated. The format is an
+     * 8-character hexadecimal string.
+     * 
+ * + * string revision_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + revisionId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private boolean isActive_; + /** + * + * + *
+     * Output only. Flag to indicate whether or not this revision is active. Only
+     * an active revision can be used in a new Order.
+     * 
+ * + * bool is_active = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isActive. + */ + @java.lang.Override + public boolean getIsActive() { + return isActive_; + } + /** + * + * + *
+     * Output only. Flag to indicate whether or not this revision is active. Only
+     * an active revision can be used in a new Order.
+     * 
+ * + * bool is_active = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The isActive to set. + * @return This builder for chaining. + */ + public Builder setIsActive(boolean value) { + + isActive_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Flag to indicate whether or not this revision is active. Only
+     * an active revision can be used in a new Order.
+     * 
+ * + * bool is_active = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIsActive() { + bitField0_ = (bitField0_ & ~0x00000100); + isActive_ = false; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Output only. Type of this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Sku.Type type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Output only. Type of this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Sku.Type type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Sku.Type type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type getType() { + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type result = + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type.forNumber(type_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Type of this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Sku.Type type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of this SKU.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Sku.Type type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000200); + type_ = 0; + onChanged(); + return this; + } + + private int vcpuCount_; + /** + * + * + *
+     * Output only. The vCPU count associated with this SKU.
+     * 
+ * + * int32 vcpu_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vcpuCount. + */ + @java.lang.Override + public int getVcpuCount() { + return vcpuCount_; + } + /** + * + * + *
+     * Output only. The vCPU count associated with this SKU.
+     * 
+ * + * int32 vcpu_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The vcpuCount to set. + * @return This builder for chaining. + */ + public Builder setVcpuCount(int value) { + + vcpuCount_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The vCPU count associated with this SKU.
+     * 
+ * + * int32 vcpu_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVcpuCount() { + bitField0_ = (bitField0_ & ~0x00000400); + vcpuCount_ = 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.gdchardwaremanagement.v1alpha.Sku) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.Sku) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.Sku DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.Sku(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Sku getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Sku parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Sku getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuConfig.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuConfig.java new file mode 100644 index 000000000000..d4da6083d7fe --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuConfig.java @@ -0,0 +1,1172 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Configuration for a SKU.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.SkuConfig} + */ +public final class SkuConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.SkuConfig) + SkuConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SkuConfig.newBuilder() to construct. + private SkuConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SkuConfig() { + cpu_ = ""; + gpu_ = ""; + ram_ = ""; + storage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SkuConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.class, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.Builder.class); + } + + public static final int CPU_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cpu_ = ""; + /** + * + * + *
+   * Information about CPU configuration.
+   * 
+ * + * string cpu = 1; + * + * @return The cpu. + */ + @java.lang.Override + public java.lang.String getCpu() { + java.lang.Object ref = cpu_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpu_ = s; + return s; + } + } + /** + * + * + *
+   * Information about CPU configuration.
+   * 
+ * + * string cpu = 1; + * + * @return The bytes for cpu. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCpuBytes() { + java.lang.Object ref = cpu_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpu_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GPU_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object gpu_ = ""; + /** + * + * + *
+   * Information about GPU configuration.
+   * 
+ * + * string gpu = 2; + * + * @return The gpu. + */ + @java.lang.Override + public java.lang.String getGpu() { + java.lang.Object ref = gpu_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gpu_ = s; + return s; + } + } + /** + * + * + *
+   * Information about GPU configuration.
+   * 
+ * + * string gpu = 2; + * + * @return The bytes for gpu. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGpuBytes() { + java.lang.Object ref = gpu_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gpu_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RAM_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object ram_ = ""; + /** + * + * + *
+   * Information about RAM configuration.
+   * 
+ * + * string ram = 3; + * + * @return The ram. + */ + @java.lang.Override + public java.lang.String getRam() { + java.lang.Object ref = ram_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ram_ = s; + return s; + } + } + /** + * + * + *
+   * Information about RAM configuration.
+   * 
+ * + * string ram = 3; + * + * @return The bytes for ram. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRamBytes() { + java.lang.Object ref = ram_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ram_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STORAGE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object storage_ = ""; + /** + * + * + *
+   * Information about storage configuration.
+   * 
+ * + * string storage = 4; + * + * @return The storage. + */ + @java.lang.Override + public java.lang.String getStorage() { + java.lang.Object ref = storage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + storage_ = s; + return s; + } + } + /** + * + * + *
+   * Information about storage configuration.
+   * 
+ * + * string storage = 4; + * + * @return The bytes for storage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStorageBytes() { + java.lang.Object ref = storage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + storage_ = 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(cpu_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpu_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gpu_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gpu_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ram_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ram_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, storage_); + } + 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(cpu_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpu_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gpu_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gpu_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ram_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ram_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, storage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig other = + (com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig) obj; + + if (!getCpu().equals(other.getCpu())) return false; + if (!getGpu().equals(other.getGpu())) return false; + if (!getRam().equals(other.getRam())) return false; + if (!getStorage().equals(other.getStorage())) return false; + if (!getUnknownFields().equals(other.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) + CPU_FIELD_NUMBER; + hash = (53 * hash) + getCpu().hashCode(); + hash = (37 * hash) + GPU_FIELD_NUMBER; + hash = (53 * hash) + getGpu().hashCode(); + hash = (37 * hash) + RAM_FIELD_NUMBER; + hash = (53 * hash) + getRam().hashCode(); + hash = (37 * hash) + STORAGE_FIELD_NUMBER; + hash = (53 * hash) + getStorage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig 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.gdchardwaremanagement.v1alpha.SkuConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig 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.gdchardwaremanagement.v1alpha.SkuConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig 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.gdchardwaremanagement.v1alpha.SkuConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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 SKU.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.SkuConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.SkuConfig) + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.class, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpu_ = ""; + gpu_ = ""; + ram_ = ""; + storage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig build() { + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig result = + new com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpu_ = cpu_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gpu_ = gpu_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ram_ = ram_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.storage_ = storage_; + } + } + + @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.gdchardwaremanagement.v1alpha.SkuConfig) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig.getDefaultInstance()) + return this; + if (!other.getCpu().isEmpty()) { + cpu_ = other.cpu_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getGpu().isEmpty()) { + gpu_ = other.gpu_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRam().isEmpty()) { + ram_ = other.ram_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getStorage().isEmpty()) { + storage_ = other.storage_; + 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: + { + cpu_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + gpu_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + ram_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + storage_ = 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 cpu_ = ""; + /** + * + * + *
+     * Information about CPU configuration.
+     * 
+ * + * string cpu = 1; + * + * @return The cpu. + */ + public java.lang.String getCpu() { + java.lang.Object ref = cpu_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpu_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Information about CPU configuration.
+     * 
+ * + * string cpu = 1; + * + * @return The bytes for cpu. + */ + public com.google.protobuf.ByteString getCpuBytes() { + java.lang.Object ref = cpu_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpu_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Information about CPU configuration.
+     * 
+ * + * string cpu = 1; + * + * @param value The cpu to set. + * @return This builder for chaining. + */ + public Builder setCpu(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cpu_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about CPU configuration.
+     * 
+ * + * string cpu = 1; + * + * @return This builder for chaining. + */ + public Builder clearCpu() { + cpu_ = getDefaultInstance().getCpu(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Information about CPU configuration.
+     * 
+ * + * string cpu = 1; + * + * @param value The bytes for cpu to set. + * @return This builder for chaining. + */ + public Builder setCpuBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cpu_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object gpu_ = ""; + /** + * + * + *
+     * Information about GPU configuration.
+     * 
+ * + * string gpu = 2; + * + * @return The gpu. + */ + public java.lang.String getGpu() { + java.lang.Object ref = gpu_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gpu_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Information about GPU configuration.
+     * 
+ * + * string gpu = 2; + * + * @return The bytes for gpu. + */ + public com.google.protobuf.ByteString getGpuBytes() { + java.lang.Object ref = gpu_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gpu_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Information about GPU configuration.
+     * 
+ * + * string gpu = 2; + * + * @param value The gpu to set. + * @return This builder for chaining. + */ + public Builder setGpu(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gpu_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about GPU configuration.
+     * 
+ * + * string gpu = 2; + * + * @return This builder for chaining. + */ + public Builder clearGpu() { + gpu_ = getDefaultInstance().getGpu(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Information about GPU configuration.
+     * 
+ * + * string gpu = 2; + * + * @param value The bytes for gpu to set. + * @return This builder for chaining. + */ + public Builder setGpuBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gpu_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object ram_ = ""; + /** + * + * + *
+     * Information about RAM configuration.
+     * 
+ * + * string ram = 3; + * + * @return The ram. + */ + public java.lang.String getRam() { + java.lang.Object ref = ram_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ram_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Information about RAM configuration.
+     * 
+ * + * string ram = 3; + * + * @return The bytes for ram. + */ + public com.google.protobuf.ByteString getRamBytes() { + java.lang.Object ref = ram_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ram_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Information about RAM configuration.
+     * 
+ * + * string ram = 3; + * + * @param value The ram to set. + * @return This builder for chaining. + */ + public Builder setRam(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ram_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about RAM configuration.
+     * 
+ * + * string ram = 3; + * + * @return This builder for chaining. + */ + public Builder clearRam() { + ram_ = getDefaultInstance().getRam(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Information about RAM configuration.
+     * 
+ * + * string ram = 3; + * + * @param value The bytes for ram to set. + * @return This builder for chaining. + */ + public Builder setRamBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ram_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object storage_ = ""; + /** + * + * + *
+     * Information about storage configuration.
+     * 
+ * + * string storage = 4; + * + * @return The storage. + */ + public java.lang.String getStorage() { + java.lang.Object ref = storage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + storage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Information about storage configuration.
+     * 
+ * + * string storage = 4; + * + * @return The bytes for storage. + */ + public com.google.protobuf.ByteString getStorageBytes() { + java.lang.Object ref = storage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + storage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Information about storage configuration.
+     * 
+ * + * string storage = 4; + * + * @param value The storage to set. + * @return This builder for chaining. + */ + public Builder setStorage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + storage_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Information about storage configuration.
+     * 
+ * + * string storage = 4; + * + * @return This builder for chaining. + */ + public Builder clearStorage() { + storage_ = getDefaultInstance().getStorage(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Information about storage configuration.
+     * 
+ * + * string storage = 4; + * + * @param value The bytes for storage to set. + * @return This builder for chaining. + */ + public Builder setStorageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + storage_ = 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.gdchardwaremanagement.v1alpha.SkuConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.SkuConfig) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SkuConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuConfigOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuConfigOrBuilder.java new file mode 100644 index 000000000000..8726eb1d6073 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuConfigOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface SkuConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.SkuConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Information about CPU configuration.
+   * 
+ * + * string cpu = 1; + * + * @return The cpu. + */ + java.lang.String getCpu(); + /** + * + * + *
+   * Information about CPU configuration.
+   * 
+ * + * string cpu = 1; + * + * @return The bytes for cpu. + */ + com.google.protobuf.ByteString getCpuBytes(); + + /** + * + * + *
+   * Information about GPU configuration.
+   * 
+ * + * string gpu = 2; + * + * @return The gpu. + */ + java.lang.String getGpu(); + /** + * + * + *
+   * Information about GPU configuration.
+   * 
+ * + * string gpu = 2; + * + * @return The bytes for gpu. + */ + com.google.protobuf.ByteString getGpuBytes(); + + /** + * + * + *
+   * Information about RAM configuration.
+   * 
+ * + * string ram = 3; + * + * @return The ram. + */ + java.lang.String getRam(); + /** + * + * + *
+   * Information about RAM configuration.
+   * 
+ * + * string ram = 3; + * + * @return The bytes for ram. + */ + com.google.protobuf.ByteString getRamBytes(); + + /** + * + * + *
+   * Information about storage configuration.
+   * 
+ * + * string storage = 4; + * + * @return The storage. + */ + java.lang.String getStorage(); + /** + * + * + *
+   * Information about storage configuration.
+   * 
+ * + * string storage = 4; + * + * @return The bytes for storage. + */ + com.google.protobuf.ByteString getStorageBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuInstance.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuInstance.java new file mode 100644 index 000000000000..76becb65889b --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuInstance.java @@ -0,0 +1,1276 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A specific instance of the SKU.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.SkuInstance} + */ +public final class SkuInstance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.SkuInstance) + SkuInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use SkuInstance.newBuilder() to construct. + private SkuInstance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SkuInstance() { + regionCode_ = ""; + powerSupply_ = 0; + billingSku_ = ""; + billingSkuPerVcpu_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SkuInstance(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.class, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder.class); + } + + public static final int REGION_CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + /** + * + * + *
+   * The [Unicode CLDR](https://cldr.unicode.org) region code where this
+   * instance is available.
+   * 
+ * + * string region_code = 1; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + /** + * + * + *
+   * The [Unicode CLDR](https://cldr.unicode.org) region code where this
+   * instance is available.
+   * 
+ * + * string region_code = 1; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POWER_SUPPLY_FIELD_NUMBER = 2; + private int powerSupply_ = 0; + /** + * + * + *
+   * Power supply type for this instance.
+   * 
+ * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2; + * + * @return The enum numeric value on the wire for powerSupply. + */ + @java.lang.Override + public int getPowerSupplyValue() { + return powerSupply_; + } + /** + * + * + *
+   * Power supply type for this instance.
+   * 
+ * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2; + * + * @return The powerSupply. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply getPowerSupply() { + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply result = + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.forNumber(powerSupply_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.UNRECOGNIZED + : result; + } + + public static final int BILLING_SKU_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object billingSku_ = ""; + /** + * + * + *
+   * Reference to the corresponding SKU in the Cloud Billing API.
+   * The estimated price information can be retrieved using that API.
+   * Format: `services/{service}/skus/{sku}`
+   * 
+ * + * string billing_sku = 3; + * + * @return The billingSku. + */ + @java.lang.Override + public java.lang.String getBillingSku() { + java.lang.Object ref = billingSku_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + billingSku_ = s; + return s; + } + } + /** + * + * + *
+   * Reference to the corresponding SKU in the Cloud Billing API.
+   * The estimated price information can be retrieved using that API.
+   * Format: `services/{service}/skus/{sku}`
+   * 
+ * + * string billing_sku = 3; + * + * @return The bytes for billingSku. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBillingSkuBytes() { + java.lang.Object ref = billingSku_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + billingSku_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BILLING_SKU_PER_VCPU_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object billingSkuPerVcpu_ = ""; + /** + * + * + *
+   * Reference to the corresponding SKU per vCPU in the Cloud Billing API.
+   * The estimated price information can be retrieved using that API.
+   * Format: `services/{service}/skus/{sku}`
+   * 
+ * + * string billing_sku_per_vcpu = 4; + * + * @return The billingSkuPerVcpu. + */ + @java.lang.Override + public java.lang.String getBillingSkuPerVcpu() { + java.lang.Object ref = billingSkuPerVcpu_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + billingSkuPerVcpu_ = s; + return s; + } + } + /** + * + * + *
+   * Reference to the corresponding SKU per vCPU in the Cloud Billing API.
+   * The estimated price information can be retrieved using that API.
+   * Format: `services/{service}/skus/{sku}`
+   * 
+ * + * string billing_sku_per_vcpu = 4; + * + * @return The bytes for billingSkuPerVcpu. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBillingSkuPerVcpuBytes() { + java.lang.Object ref = billingSkuPerVcpu_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + billingSkuPerVcpu_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBSCRIPTION_DURATION_MONTHS_FIELD_NUMBER = 5; + private int subscriptionDurationMonths_ = 0; + /** + * + * + *
+   * Subscription duration for the hardware in months.
+   * 
+ * + * int32 subscription_duration_months = 5; + * + * @return The subscriptionDurationMonths. + */ + @java.lang.Override + public int getSubscriptionDurationMonths() { + return subscriptionDurationMonths_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(regionCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, regionCode_); + } + if (powerSupply_ + != com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.POWER_SUPPLY_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, powerSupply_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(billingSku_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, billingSku_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(billingSkuPerVcpu_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, billingSkuPerVcpu_); + } + if (subscriptionDurationMonths_ != 0) { + output.writeInt32(5, subscriptionDurationMonths_); + } + 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(regionCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, regionCode_); + } + if (powerSupply_ + != com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.POWER_SUPPLY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, powerSupply_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(billingSku_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, billingSku_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(billingSkuPerVcpu_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, billingSkuPerVcpu_); + } + if (subscriptionDurationMonths_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(5, subscriptionDurationMonths_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance other = + (com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance) obj; + + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (powerSupply_ != other.powerSupply_) return false; + if (!getBillingSku().equals(other.getBillingSku())) return false; + if (!getBillingSkuPerVcpu().equals(other.getBillingSkuPerVcpu())) return false; + if (getSubscriptionDurationMonths() != other.getSubscriptionDurationMonths()) return false; + if (!getUnknownFields().equals(other.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) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + hash = (37 * hash) + POWER_SUPPLY_FIELD_NUMBER; + hash = (53 * hash) + powerSupply_; + hash = (37 * hash) + BILLING_SKU_FIELD_NUMBER; + hash = (53 * hash) + getBillingSku().hashCode(); + hash = (37 * hash) + BILLING_SKU_PER_VCPU_FIELD_NUMBER; + hash = (53 * hash) + getBillingSkuPerVcpu().hashCode(); + hash = (37 * hash) + SUBSCRIPTION_DURATION_MONTHS_FIELD_NUMBER; + hash = (53 * hash) + getSubscriptionDurationMonths(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance 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.gdchardwaremanagement.v1alpha.SkuInstance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance 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.gdchardwaremanagement.v1alpha.SkuInstance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance 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.gdchardwaremanagement.v1alpha.SkuInstance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A specific instance of the SKU.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.SkuInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.SkuInstance) + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.class, + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + regionCode_ = ""; + powerSupply_ = 0; + billingSku_ = ""; + billingSkuPerVcpu_ = ""; + subscriptionDurationMonths_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SkuInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance build() { + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance result = + new com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.regionCode_ = regionCode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.powerSupply_ = powerSupply_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.billingSku_ = billingSku_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.billingSkuPerVcpu_ = billingSkuPerVcpu_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.subscriptionDurationMonths_ = subscriptionDurationMonths_; + } + } + + @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.gdchardwaremanagement.v1alpha.SkuInstance) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance.getDefaultInstance()) + return this; + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.powerSupply_ != 0) { + setPowerSupplyValue(other.getPowerSupplyValue()); + } + if (!other.getBillingSku().isEmpty()) { + billingSku_ = other.billingSku_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getBillingSkuPerVcpu().isEmpty()) { + billingSkuPerVcpu_ = other.billingSkuPerVcpu_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getSubscriptionDurationMonths() != 0) { + setSubscriptionDurationMonths(other.getSubscriptionDurationMonths()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + regionCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + powerSupply_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + billingSku_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + billingSkuPerVcpu_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + subscriptionDurationMonths_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object regionCode_ = ""; + /** + * + * + *
+     * The [Unicode CLDR](https://cldr.unicode.org) region code where this
+     * instance is available.
+     * 
+ * + * string region_code = 1; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [Unicode CLDR](https://cldr.unicode.org) region code where this
+     * instance is available.
+     * 
+ * + * string region_code = 1; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [Unicode CLDR](https://cldr.unicode.org) region code where this
+     * instance is available.
+     * 
+ * + * string region_code = 1; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The [Unicode CLDR](https://cldr.unicode.org) region code where this
+     * instance is available.
+     * 
+ * + * string region_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The [Unicode CLDR](https://cldr.unicode.org) region code where this
+     * instance is available.
+     * 
+ * + * string region_code = 1; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int powerSupply_ = 0; + /** + * + * + *
+     * Power supply type for this instance.
+     * 
+ * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2; + * + * @return The enum numeric value on the wire for powerSupply. + */ + @java.lang.Override + public int getPowerSupplyValue() { + return powerSupply_; + } + /** + * + * + *
+     * Power supply type for this instance.
+     * 
+ * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2; + * + * @param value The enum numeric value on the wire for powerSupply to set. + * @return This builder for chaining. + */ + public Builder setPowerSupplyValue(int value) { + powerSupply_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Power supply type for this instance.
+     * 
+ * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2; + * + * @return The powerSupply. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply getPowerSupply() { + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply result = + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.forNumber(powerSupply_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Power supply type for this instance.
+     * 
+ * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2; + * + * @param value The powerSupply to set. + * @return This builder for chaining. + */ + public Builder setPowerSupply( + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + powerSupply_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Power supply type for this instance.
+     * 
+ * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2; + * + * @return This builder for chaining. + */ + public Builder clearPowerSupply() { + bitField0_ = (bitField0_ & ~0x00000002); + powerSupply_ = 0; + onChanged(); + return this; + } + + private java.lang.Object billingSku_ = ""; + /** + * + * + *
+     * Reference to the corresponding SKU in the Cloud Billing API.
+     * The estimated price information can be retrieved using that API.
+     * Format: `services/{service}/skus/{sku}`
+     * 
+ * + * string billing_sku = 3; + * + * @return The billingSku. + */ + public java.lang.String getBillingSku() { + java.lang.Object ref = billingSku_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + billingSku_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Reference to the corresponding SKU in the Cloud Billing API.
+     * The estimated price information can be retrieved using that API.
+     * Format: `services/{service}/skus/{sku}`
+     * 
+ * + * string billing_sku = 3; + * + * @return The bytes for billingSku. + */ + public com.google.protobuf.ByteString getBillingSkuBytes() { + java.lang.Object ref = billingSku_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + billingSku_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Reference to the corresponding SKU in the Cloud Billing API.
+     * The estimated price information can be retrieved using that API.
+     * Format: `services/{service}/skus/{sku}`
+     * 
+ * + * string billing_sku = 3; + * + * @param value The billingSku to set. + * @return This builder for chaining. + */ + public Builder setBillingSku(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + billingSku_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Reference to the corresponding SKU in the Cloud Billing API.
+     * The estimated price information can be retrieved using that API.
+     * Format: `services/{service}/skus/{sku}`
+     * 
+ * + * string billing_sku = 3; + * + * @return This builder for chaining. + */ + public Builder clearBillingSku() { + billingSku_ = getDefaultInstance().getBillingSku(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Reference to the corresponding SKU in the Cloud Billing API.
+     * The estimated price information can be retrieved using that API.
+     * Format: `services/{service}/skus/{sku}`
+     * 
+ * + * string billing_sku = 3; + * + * @param value The bytes for billingSku to set. + * @return This builder for chaining. + */ + public Builder setBillingSkuBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + billingSku_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object billingSkuPerVcpu_ = ""; + /** + * + * + *
+     * Reference to the corresponding SKU per vCPU in the Cloud Billing API.
+     * The estimated price information can be retrieved using that API.
+     * Format: `services/{service}/skus/{sku}`
+     * 
+ * + * string billing_sku_per_vcpu = 4; + * + * @return The billingSkuPerVcpu. + */ + public java.lang.String getBillingSkuPerVcpu() { + java.lang.Object ref = billingSkuPerVcpu_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + billingSkuPerVcpu_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Reference to the corresponding SKU per vCPU in the Cloud Billing API.
+     * The estimated price information can be retrieved using that API.
+     * Format: `services/{service}/skus/{sku}`
+     * 
+ * + * string billing_sku_per_vcpu = 4; + * + * @return The bytes for billingSkuPerVcpu. + */ + public com.google.protobuf.ByteString getBillingSkuPerVcpuBytes() { + java.lang.Object ref = billingSkuPerVcpu_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + billingSkuPerVcpu_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Reference to the corresponding SKU per vCPU in the Cloud Billing API.
+     * The estimated price information can be retrieved using that API.
+     * Format: `services/{service}/skus/{sku}`
+     * 
+ * + * string billing_sku_per_vcpu = 4; + * + * @param value The billingSkuPerVcpu to set. + * @return This builder for chaining. + */ + public Builder setBillingSkuPerVcpu(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + billingSkuPerVcpu_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Reference to the corresponding SKU per vCPU in the Cloud Billing API.
+     * The estimated price information can be retrieved using that API.
+     * Format: `services/{service}/skus/{sku}`
+     * 
+ * + * string billing_sku_per_vcpu = 4; + * + * @return This builder for chaining. + */ + public Builder clearBillingSkuPerVcpu() { + billingSkuPerVcpu_ = getDefaultInstance().getBillingSkuPerVcpu(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Reference to the corresponding SKU per vCPU in the Cloud Billing API.
+     * The estimated price information can be retrieved using that API.
+     * Format: `services/{service}/skus/{sku}`
+     * 
+ * + * string billing_sku_per_vcpu = 4; + * + * @param value The bytes for billingSkuPerVcpu to set. + * @return This builder for chaining. + */ + public Builder setBillingSkuPerVcpuBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + billingSkuPerVcpu_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int subscriptionDurationMonths_; + /** + * + * + *
+     * Subscription duration for the hardware in months.
+     * 
+ * + * int32 subscription_duration_months = 5; + * + * @return The subscriptionDurationMonths. + */ + @java.lang.Override + public int getSubscriptionDurationMonths() { + return subscriptionDurationMonths_; + } + /** + * + * + *
+     * Subscription duration for the hardware in months.
+     * 
+ * + * int32 subscription_duration_months = 5; + * + * @param value The subscriptionDurationMonths to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionDurationMonths(int value) { + + subscriptionDurationMonths_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Subscription duration for the hardware in months.
+     * 
+ * + * int32 subscription_duration_months = 5; + * + * @return This builder for chaining. + */ + public Builder clearSubscriptionDurationMonths() { + bitField0_ = (bitField0_ & ~0x00000010); + subscriptionDurationMonths_ = 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.gdchardwaremanagement.v1alpha.SkuInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.SkuInstance) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SkuInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuInstanceOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuInstanceOrBuilder.java new file mode 100644 index 000000000000..9fa77b662d8e --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuInstanceOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface SkuInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.SkuInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The [Unicode CLDR](https://cldr.unicode.org) region code where this
+   * instance is available.
+   * 
+ * + * string region_code = 1; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + /** + * + * + *
+   * The [Unicode CLDR](https://cldr.unicode.org) region code where this
+   * instance is available.
+   * 
+ * + * string region_code = 1; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); + + /** + * + * + *
+   * Power supply type for this instance.
+   * 
+ * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2; + * + * @return The enum numeric value on the wire for powerSupply. + */ + int getPowerSupplyValue(); + /** + * + * + *
+   * Power supply type for this instance.
+   * 
+ * + * .google.cloud.gdchardwaremanagement.v1alpha.PowerSupply power_supply = 2; + * + * @return The powerSupply. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply getPowerSupply(); + + /** + * + * + *
+   * Reference to the corresponding SKU in the Cloud Billing API.
+   * The estimated price information can be retrieved using that API.
+   * Format: `services/{service}/skus/{sku}`
+   * 
+ * + * string billing_sku = 3; + * + * @return The billingSku. + */ + java.lang.String getBillingSku(); + /** + * + * + *
+   * Reference to the corresponding SKU in the Cloud Billing API.
+   * The estimated price information can be retrieved using that API.
+   * Format: `services/{service}/skus/{sku}`
+   * 
+ * + * string billing_sku = 3; + * + * @return The bytes for billingSku. + */ + com.google.protobuf.ByteString getBillingSkuBytes(); + + /** + * + * + *
+   * Reference to the corresponding SKU per vCPU in the Cloud Billing API.
+   * The estimated price information can be retrieved using that API.
+   * Format: `services/{service}/skus/{sku}`
+   * 
+ * + * string billing_sku_per_vcpu = 4; + * + * @return The billingSkuPerVcpu. + */ + java.lang.String getBillingSkuPerVcpu(); + /** + * + * + *
+   * Reference to the corresponding SKU per vCPU in the Cloud Billing API.
+   * The estimated price information can be retrieved using that API.
+   * Format: `services/{service}/skus/{sku}`
+   * 
+ * + * string billing_sku_per_vcpu = 4; + * + * @return The bytes for billingSkuPerVcpu. + */ + com.google.protobuf.ByteString getBillingSkuPerVcpuBytes(); + + /** + * + * + *
+   * Subscription duration for the hardware in months.
+   * 
+ * + * int32 subscription_duration_months = 5; + * + * @return The subscriptionDurationMonths. + */ + int getSubscriptionDurationMonths(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuName.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuName.java new file mode 100644 index 000000000000..6b5f3897252b --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuName.java @@ -0,0 +1,216 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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 SkuName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SKU = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/skus/{sku}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String sku; + + @Deprecated + protected SkuName() { + project = null; + location = null; + sku = null; + } + + private SkuName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + sku = Preconditions.checkNotNull(builder.getSku()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSku() { + return sku; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SkuName of(String project, String location, String sku) { + return newBuilder().setProject(project).setLocation(location).setSku(sku).build(); + } + + public static String format(String project, String location, String sku) { + return newBuilder().setProject(project).setLocation(location).setSku(sku).build().toString(); + } + + public static SkuName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SKU.validatedMatch( + formattedString, "SkuName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("sku")); + } + + 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 (SkuName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SKU.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 (sku != null) { + fieldMapBuilder.put("sku", sku); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SKU.instantiate("project", project, "location", location, "sku", sku); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SkuName that = ((SkuName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.sku, that.sku); + } + 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(sku); + return h; + } + + /** Builder for projects/{project}/locations/{location}/skus/{sku}. */ + public static class Builder { + private String project; + private String location; + private String sku; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSku() { + return sku; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setSku(String sku) { + this.sku = sku; + return this; + } + + private Builder(SkuName skuName) { + this.project = skuName.project; + this.location = skuName.location; + this.sku = skuName.sku; + } + + public SkuName build() { + return new SkuName(this); + } + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuOrBuilder.java new file mode 100644 index 000000000000..52e9c198a754 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SkuOrBuilder.java @@ -0,0 +1,373 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface SkuOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.Sku) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of this SKU.
+   * Format: `projects/{project}/locations/{location}/skus/{sku}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Name of this SKU.
+   * Format: `projects/{project}/locations/{location}/skus/{sku}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Display name of this SKU.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. Display name of this SKU.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. Time when this SKU was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this SKU was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this SKU was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when this SKU was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when this SKU was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when this SKU was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Configuration for this SKU.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * Output only. Configuration for this SKU.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The config. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfig getConfig(); + /** + * + * + *
+   * Output only. Configuration for this SKU.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.SkuConfig config = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SkuConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Output only. Available instances of this SKU. This field should be used for
+   * checking availability of a SKU.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getInstancesList(); + /** + * + * + *
+   * Output only. Available instances of this SKU. This field should be used for
+   * checking availability of a SKU.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstance getInstances(int index); + /** + * + * + *
+   * Output only. Available instances of this SKU. This field should be used for
+   * checking availability of a SKU.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getInstancesCount(); + /** + * + * + *
+   * Output only. Available instances of this SKU. This field should be used for
+   * checking availability of a SKU.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getInstancesOrBuilderList(); + /** + * + * + *
+   * Output only. Available instances of this SKU. This field should be used for
+   * checking availability of a SKU.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.SkuInstance instances = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceOrBuilder getInstancesOrBuilder( + int index); + + /** + * + * + *
+   * Output only. Description of this SKU.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Output only. Description of this SKU.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The SKU revision ID.
+   * A new revision is created whenever `config` is updated. The format is an
+   * 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + * + * + *
+   * Output only. The SKU revision ID.
+   * A new revision is created whenever `config` is updated. The format is an
+   * 8-character hexadecimal string.
+   * 
+ * + * string revision_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString getRevisionIdBytes(); + + /** + * + * + *
+   * Output only. Flag to indicate whether or not this revision is active. Only
+   * an active revision can be used in a new Order.
+   * 
+ * + * bool is_active = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isActive. + */ + boolean getIsActive(); + + /** + * + * + *
+   * Output only. Type of this SKU.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Sku.Type type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Output only. Type of this SKU.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Sku.Type type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Sku.Type getType(); + + /** + * + * + *
+   * Output only. The vCPU count associated with this SKU.
+   * 
+ * + * int32 vcpu_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vcpuCount. + */ + int getVcpuCount(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SubmitOrderRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SubmitOrderRequest.java new file mode 100644 index 000000000000..3d12035e7985 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SubmitOrderRequest.java @@ -0,0 +1,845 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to submit an order.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest} + */ +public final class SubmitOrderRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest) + SubmitOrderRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubmitOrderRequest.newBuilder() to construct. + private SubmitOrderRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubmitOrderRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubmitOrderRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SubmitOrderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SubmitOrderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.SubmitOrderRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest) 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.gdchardwaremanagement.v1alpha.SubmitOrderRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest 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.gdchardwaremanagement.v1alpha.SubmitOrderRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest + 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.gdchardwaremanagement.v1alpha.SubmitOrderRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest 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.gdchardwaremanagement.v1alpha.SubmitOrderRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to submit an order.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SubmitOrderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SubmitOrderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.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.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_SubmitOrderRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest 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.gdchardwaremanagement.v1alpha.SubmitOrderRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.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. The name of the order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the order.
+     * Format: `projects/{project}/locations/{location}/orders/{order}`
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.SubmitOrderRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubmitOrderRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SubmitOrderRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SubmitOrderRequestOrBuilder.java new file mode 100644 index 000000000000..0874b4175110 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SubmitOrderRequestOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface SubmitOrderRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the order.
+   * Format: `projects/{project}/locations/{location}/orders/{order}`
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Subnet.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Subnet.java new file mode 100644 index 000000000000..5ee0f77650f6 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Subnet.java @@ -0,0 +1,836 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Represents a subnet.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Subnet} + */ +public final class Subnet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.Subnet) + SubnetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Subnet.newBuilder() to construct. + private Subnet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Subnet() { + addressRange_ = ""; + defaultGatewayIpAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Subnet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Subnet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Subnet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder.class); + } + + public static final int ADDRESS_RANGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object addressRange_ = ""; + /** + * + * + *
+   * Required. Address range for this subnet in CIDR notation.
+   * 
+ * + * + * string address_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The addressRange. + */ + @java.lang.Override + public java.lang.String getAddressRange() { + java.lang.Object ref = addressRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + addressRange_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Address range for this subnet in CIDR notation.
+   * 
+ * + * + * string address_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for addressRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressRangeBytes() { + java.lang.Object ref = addressRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + addressRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_GATEWAY_IP_ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object defaultGatewayIpAddress_ = ""; + /** + * + * + *
+   * Required. Default gateway for this subnet.
+   * 
+ * + * + * string default_gateway_ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The defaultGatewayIpAddress. + */ + @java.lang.Override + public java.lang.String getDefaultGatewayIpAddress() { + java.lang.Object ref = defaultGatewayIpAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultGatewayIpAddress_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Default gateway for this subnet.
+   * 
+ * + * + * string default_gateway_ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for defaultGatewayIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultGatewayIpAddressBytes() { + java.lang.Object ref = defaultGatewayIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultGatewayIpAddress_ = 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(addressRange_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, addressRange_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultGatewayIpAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, defaultGatewayIpAddress_); + } + 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(addressRange_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, addressRange_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultGatewayIpAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, defaultGatewayIpAddress_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.Subnet)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet other = + (com.google.cloud.gdchardwaremanagement.v1alpha.Subnet) obj; + + if (!getAddressRange().equals(other.getAddressRange())) return false; + if (!getDefaultGatewayIpAddress().equals(other.getDefaultGatewayIpAddress())) return false; + if (!getUnknownFields().equals(other.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) + ADDRESS_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getAddressRange().hashCode(); + hash = (37 * hash) + DEFAULT_GATEWAY_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getDefaultGatewayIpAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet 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.gdchardwaremanagement.v1alpha.Subnet parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet 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.gdchardwaremanagement.v1alpha.Subnet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet 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.gdchardwaremanagement.v1alpha.Subnet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a subnet.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Subnet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.Subnet) + com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Subnet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Subnet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + addressRange_ = ""; + defaultGatewayIpAddress_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Subnet_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Subnet getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Subnet build() { + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Subnet buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet result = + new com.google.cloud.gdchardwaremanagement.v1alpha.Subnet(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.Subnet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.addressRange_ = addressRange_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.defaultGatewayIpAddress_ = defaultGatewayIpAddress_; + } + } + + @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.gdchardwaremanagement.v1alpha.Subnet) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.Subnet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.Subnet other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance()) + return this; + if (!other.getAddressRange().isEmpty()) { + addressRange_ = other.addressRange_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDefaultGatewayIpAddress().isEmpty()) { + defaultGatewayIpAddress_ = other.defaultGatewayIpAddress_; + 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: + { + addressRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + defaultGatewayIpAddress_ = 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 addressRange_ = ""; + /** + * + * + *
+     * Required. Address range for this subnet in CIDR notation.
+     * 
+ * + * + * string address_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The addressRange. + */ + public java.lang.String getAddressRange() { + java.lang.Object ref = addressRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + addressRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Address range for this subnet in CIDR notation.
+     * 
+ * + * + * string address_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for addressRange. + */ + public com.google.protobuf.ByteString getAddressRangeBytes() { + java.lang.Object ref = addressRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + addressRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Address range for this subnet in CIDR notation.
+     * 
+ * + * + * string address_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The addressRange to set. + * @return This builder for chaining. + */ + public Builder setAddressRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + addressRange_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Address range for this subnet in CIDR notation.
+     * 
+ * + * + * string address_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAddressRange() { + addressRange_ = getDefaultInstance().getAddressRange(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Address range for this subnet in CIDR notation.
+     * 
+ * + * + * string address_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for addressRange to set. + * @return This builder for chaining. + */ + public Builder setAddressRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + addressRange_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object defaultGatewayIpAddress_ = ""; + /** + * + * + *
+     * Required. Default gateway for this subnet.
+     * 
+ * + * + * string default_gateway_ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The defaultGatewayIpAddress. + */ + public java.lang.String getDefaultGatewayIpAddress() { + java.lang.Object ref = defaultGatewayIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultGatewayIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Default gateway for this subnet.
+     * 
+ * + * + * string default_gateway_ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for defaultGatewayIpAddress. + */ + public com.google.protobuf.ByteString getDefaultGatewayIpAddressBytes() { + java.lang.Object ref = defaultGatewayIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultGatewayIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Default gateway for this subnet.
+     * 
+ * + * + * string default_gateway_ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The defaultGatewayIpAddress to set. + * @return This builder for chaining. + */ + public Builder setDefaultGatewayIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + defaultGatewayIpAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Default gateway for this subnet.
+     * 
+ * + * + * string default_gateway_ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDefaultGatewayIpAddress() { + defaultGatewayIpAddress_ = getDefaultInstance().getDefaultGatewayIpAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Default gateway for this subnet.
+     * 
+ * + * + * string default_gateway_ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for defaultGatewayIpAddress to set. + * @return This builder for chaining. + */ + public Builder setDefaultGatewayIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + defaultGatewayIpAddress_ = 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.gdchardwaremanagement.v1alpha.Subnet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.Subnet) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.Subnet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.Subnet(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Subnet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Subnet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Subnet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SubnetOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SubnetOrBuilder.java new file mode 100644 index 000000000000..71223f86aad0 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/SubnetOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface SubnetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.Subnet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Address range for this subnet in CIDR notation.
+   * 
+ * + * + * string address_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The addressRange. + */ + java.lang.String getAddressRange(); + /** + * + * + *
+   * Required. Address range for this subnet in CIDR notation.
+   * 
+ * + * + * string address_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for addressRange. + */ + com.google.protobuf.ByteString getAddressRangeBytes(); + + /** + * + * + *
+   * Required. Default gateway for this subnet.
+   * 
+ * + * + * string default_gateway_ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The defaultGatewayIpAddress. + */ + java.lang.String getDefaultGatewayIpAddress(); + /** + * + * + *
+   * Required. Default gateway for this subnet.
+   * 
+ * + * + * string default_gateway_ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for defaultGatewayIpAddress. + */ + com.google.protobuf.ByteString getDefaultGatewayIpAddressBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/TimePeriod.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/TimePeriod.java new file mode 100644 index 000000000000..32050d54e803 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/TimePeriod.java @@ -0,0 +1,1374 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Represents a time period in a week.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.TimePeriod} + */ +public final class TimePeriod extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.TimePeriod) + TimePeriodOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimePeriod.newBuilder() to construct. + private TimePeriod(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TimePeriod() { + days_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TimePeriod(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_TimePeriod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_TimePeriod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.class, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.type.TimeOfDay startTime_; + /** + * + * + *
+   * Required. The start of the time period.
+   * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.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 of the time period.
+   * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.type.TimeOfDay getStartTime() { + return startTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Required. The start of the time period.
+   * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.TimeOfDayOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.type.TimeOfDay endTime_; + /** + * + * + *
+   * Required. The end of the time period.
+   * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.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 of the time period.
+   * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.type.TimeOfDay getEndTime() { + return endTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Required. The end of the time period.
+   * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.TimeOfDayOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : endTime_; + } + + public static final int DAYS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List days_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.type.DayOfWeek> + days_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.type.DayOfWeek>() { + public com.google.type.DayOfWeek convert(java.lang.Integer from) { + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(from); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+   * Required. The days of the week that the time period is active.
+   * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the days. + */ + @java.lang.Override + public java.util.List getDaysList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.type.DayOfWeek>(days_, days_converter_); + } + /** + * + * + *
+   * Required. The days of the week that the time period is active.
+   * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of days. + */ + @java.lang.Override + public int getDaysCount() { + return days_.size(); + } + /** + * + * + *
+   * Required. The days of the week that the time period is active.
+   * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The days at the given index. + */ + @java.lang.Override + public com.google.type.DayOfWeek getDays(int index) { + return days_converter_.convert(days_.get(index)); + } + /** + * + * + *
+   * Required. The days of the week that the time period is active.
+   * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for days. + */ + @java.lang.Override + public java.util.List getDaysValueList() { + return days_; + } + /** + * + * + *
+   * Required. The days of the week that the time period is active.
+   * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of days at the given index. + */ + @java.lang.Override + public int getDaysValue(int index) { + return days_.get(index); + } + + private int daysMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (getDaysList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(daysMemoizedSerializedSize); + } + for (int i = 0; i < days_.size(); i++) { + output.writeEnumNoTag(days_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + { + int dataSize = 0; + for (int i = 0; i < days_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(days_.get(i)); + } + size += dataSize; + if (!getDaysList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + daysMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod other = + (com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod) 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 (!days_.equals(other.days_)) return false; + if (!getUnknownFields().equals(other.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(); + } + if (getDaysCount() > 0) { + hash = (37 * hash) + DAYS_FIELD_NUMBER; + hash = (53 * hash) + days_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod 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.gdchardwaremanagement.v1alpha.TimePeriod parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod 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.gdchardwaremanagement.v1alpha.TimePeriod parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod 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.gdchardwaremanagement.v1alpha.TimePeriod prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a time period in a week.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.TimePeriod} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.TimePeriod) + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_TimePeriod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_TimePeriod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.class, + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.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; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + days_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_TimePeriod_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod build() { + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod result = + new com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod result) { + if (((bitField0_ & 0x00000004) != 0)) { + days_ = java.util.Collections.unmodifiableList(days_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.days_ = days_; + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 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.gdchardwaremanagement.v1alpha.TimePeriod) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.days_.isEmpty()) { + if (days_.isEmpty()) { + days_ = other.days_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDaysIsMutable(); + days_.addAll(other.days_); + } + 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(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + int tmpRaw = input.readEnum(); + ensureDaysIsMutable(); + days_.add(tmpRaw); + break; + } // case 24 + case 26: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureDaysIsMutable(); + days_.add(tmpRaw); + } + input.popLimit(oldLimit); + 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.type.TimeOfDay startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Required. The start of the time period.
+     * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The start of the time period.
+     * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startTime. + */ + public com.google.type.TimeOfDay getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The start of the time period.
+     * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setStartTime(com.google.type.TimeOfDay value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The start of the time period.
+     * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setStartTime(com.google.type.TimeOfDay.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The start of the time period.
+     * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeStartTime(com.google.type.TimeOfDay value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.type.TimeOfDay.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The start of the time period.
+     * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The start of the time period.
+     * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.TimeOfDay.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The start of the time period.
+     * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.TimeOfDayOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Required. The start of the time period.
+     * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.type.TimeOfDay endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Required. The end of the time period.
+     * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The end of the time period.
+     * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + public com.google.type.TimeOfDay getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The end of the time period.
+     * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setEndTime(com.google.type.TimeOfDay value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The end of the time period.
+     * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setEndTime(com.google.type.TimeOfDay.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The end of the time period.
+     * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeEndTime(com.google.type.TimeOfDay value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.type.TimeOfDay.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The end of the time period.
+     * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The end of the time period.
+     * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.TimeOfDay.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The end of the time period.
+     * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.TimeOfDayOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Required. The end of the time period.
+     * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.util.List days_ = java.util.Collections.emptyList(); + + private void ensureDaysIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + days_ = new java.util.ArrayList(days_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the days. + */ + public java.util.List getDaysList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.type.DayOfWeek>(days_, days_converter_); + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of days. + */ + public int getDaysCount() { + return days_.size(); + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The days at the given index. + */ + public com.google.type.DayOfWeek getDays(int index) { + return days_converter_.convert(days_.get(index)); + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The days to set. + * @return This builder for chaining. + */ + public Builder setDays(int index, com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDaysIsMutable(); + days_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The days to add. + * @return This builder for chaining. + */ + public Builder addDays(com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDaysIsMutable(); + days_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The days to add. + * @return This builder for chaining. + */ + public Builder addAllDays(java.lang.Iterable values) { + ensureDaysIsMutable(); + for (com.google.type.DayOfWeek value : values) { + days_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearDays() { + days_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for days. + */ + public java.util.List getDaysValueList() { + return java.util.Collections.unmodifiableList(days_); + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of days at the given index. + */ + public int getDaysValue(int index) { + return days_.get(index); + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for days to set. + * @return This builder for chaining. + */ + public Builder setDaysValue(int index, int value) { + ensureDaysIsMutable(); + days_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for days to add. + * @return This builder for chaining. + */ + public Builder addDaysValue(int value) { + ensureDaysIsMutable(); + days_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The days of the week that the time period is active.
+     * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The enum numeric values on the wire for days to add. + * @return This builder for chaining. + */ + public Builder addAllDaysValue(java.lang.Iterable values) { + ensureDaysIsMutable(); + for (int value : values) { + days_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.gdchardwaremanagement.v1alpha.TimePeriod) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.TimePeriod) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimePeriod parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.TimePeriod getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/TimePeriodOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/TimePeriodOrBuilder.java new file mode 100644 index 000000000000..48984f6e9316 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/TimePeriodOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface TimePeriodOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.TimePeriod) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The start of the time period.
+   * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Required. The start of the time period.
+   * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startTime. + */ + com.google.type.TimeOfDay getStartTime(); + /** + * + * + *
+   * Required. The start of the time period.
+   * 
+ * + * .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.TimeOfDayOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Required. The end of the time period.
+   * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Required. The end of the time period.
+   * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + com.google.type.TimeOfDay getEndTime(); + /** + * + * + *
+   * Required. The end of the time period.
+   * 
+ * + * .google.type.TimeOfDay end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.TimeOfDayOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Required. The days of the week that the time period is active.
+   * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the days. + */ + java.util.List getDaysList(); + /** + * + * + *
+   * Required. The days of the week that the time period is active.
+   * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of days. + */ + int getDaysCount(); + /** + * + * + *
+   * Required. The days of the week that the time period is active.
+   * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The days at the given index. + */ + com.google.type.DayOfWeek getDays(int index); + /** + * + * + *
+   * Required. The days of the week that the time period is active.
+   * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the enum numeric values on the wire for days. + */ + java.util.List getDaysValueList(); + /** + * + * + *
+   * Required. The days of the week that the time period is active.
+   * 
+ * + * repeated .google.type.DayOfWeek days = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of days at the given index. + */ + int getDaysValue(int index); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareGroupRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareGroupRequest.java new file mode 100644 index 000000000000..eaca47eaa9fd --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareGroupRequest.java @@ -0,0 +1,1287 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to update a hardware group.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest} + */ +public final class UpdateHardwareGroupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest) + UpdateHardwareGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateHardwareGroupRequest.newBuilder() to construct. + private UpdateHardwareGroupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateHardwareGroupRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateHardwareGroupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest.Builder + .class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A mask to specify the fields in the HardwareGroup to overwrite
+   * with this update. The fields specified in the update_mask are relative to
+   * the hardware group, not the full request. A field will be overwritten if it
+   * is in the mask. If you don't provide a mask then all fields will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. A mask to specify the fields in the HardwareGroup to overwrite
+   * with this update. The fields specified in the update_mask are relative to
+   * the hardware group, not the full request. A field will be overwritten if it
+   * is in the mask. If you don't provide a mask then all fields will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A mask to specify the fields in the HardwareGroup to overwrite
+   * with this update. The fields specified in the update_mask are relative to
+   * the hardware group, not the full request. A field will be overwritten if it
+   * is in the mask. If you don't provide a mask then all fields will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int HARDWARE_GROUP_FIELD_NUMBER = 2; + private com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardwareGroup_; + /** + * + * + *
+   * Required. The hardware group to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardwareGroup field is set. + */ + @java.lang.Override + public boolean hasHardwareGroup() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The hardware group to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardwareGroup. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getHardwareGroup() { + return hardwareGroup_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance() + : hardwareGroup_; + } + /** + * + * + *
+   * Required. The hardware group to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder + getHardwareGroupOrBuilder() { + return hardwareGroup_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance() + : hardwareGroup_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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, getHardwareGroup()); + } + 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, getHardwareGroup()); + } + 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.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasHardwareGroup() != other.hasHardwareGroup()) return false; + if (hasHardwareGroup()) { + if (!getHardwareGroup().equals(other.getHardwareGroup())) 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 (hasHardwareGroup()) { + hash = (37 * hash) + HARDWARE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getHardwareGroup().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.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest 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.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest + 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.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest 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.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update a hardware group.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest.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(); + getHardwareGroupFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + hardwareGroup_ = null; + if (hardwareGroupBuilder_ != null) { + hardwareGroupBuilder_.dispose(); + hardwareGroupBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest + buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest 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.hardwareGroup_ = + hardwareGroupBuilder_ == null ? hardwareGroup_ : hardwareGroupBuilder_.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.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest + .getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasHardwareGroup()) { + mergeHardwareGroup(other.getHardwareGroup()); + } + 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(getHardwareGroupFieldBuilder().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_; + /** + * + * + *
+     * Required. A mask to specify the fields in the HardwareGroup to overwrite
+     * with this update. The fields specified in the update_mask are relative to
+     * the hardware group, not the full request. A field will be overwritten if it
+     * is in the mask. If you don't provide a mask then all fields will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. A mask to specify the fields in the HardwareGroup to overwrite
+     * with this update. The fields specified in the update_mask are relative to
+     * the hardware group, not the full request. A field will be overwritten if it
+     * is in the mask. If you don't provide a mask then all fields will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A mask to specify the fields in the HardwareGroup to overwrite
+     * with this update. The fields specified in the update_mask are relative to
+     * the hardware group, not the full request. A field will be overwritten if it
+     * is in the mask. If you don't provide a mask then all fields will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the HardwareGroup to overwrite
+     * with this update. The fields specified in the update_mask are relative to
+     * the hardware group, not the full request. A field will be overwritten if it
+     * is in the mask. If you don't provide a mask then all fields will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the HardwareGroup to overwrite
+     * with this update. The fields specified in the update_mask are relative to
+     * the hardware group, not the full request. A field will be overwritten if it
+     * is in the mask. If you don't provide a mask then all fields will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the HardwareGroup to overwrite
+     * with this update. The fields specified in the update_mask are relative to
+     * the hardware group, not the full request. A field will be overwritten if it
+     * is in the mask. If you don't provide a mask then all fields will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the HardwareGroup to overwrite
+     * with this update. The fields specified in the update_mask are relative to
+     * the hardware group, not the full request. A field will be overwritten if it
+     * is in the mask. If you don't provide a mask then all fields will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A mask to specify the fields in the HardwareGroup to overwrite
+     * with this update. The fields specified in the update_mask are relative to
+     * the hardware group, not the full request. A field will be overwritten if it
+     * is in the mask. If you don't provide a mask then all fields will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A mask to specify the fields in the HardwareGroup to overwrite
+     * with this update. The fields specified in the update_mask are relative to
+     * the hardware group, not the full request. A field will be overwritten if it
+     * is in the mask. If you don't provide a mask then all fields will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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.gdchardwaremanagement.v1alpha.HardwareGroup hardwareGroup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder> + hardwareGroupBuilder_; + /** + * + * + *
+     * Required. The hardware group to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardwareGroup field is set. + */ + public boolean hasHardwareGroup() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The hardware group to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardwareGroup. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getHardwareGroup() { + if (hardwareGroupBuilder_ == null) { + return hardwareGroup_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance() + : hardwareGroup_; + } else { + return hardwareGroupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The hardware group to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup value) { + if (hardwareGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hardwareGroup_ = value; + } else { + hardwareGroupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The hardware group to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder builderForValue) { + if (hardwareGroupBuilder_ == null) { + hardwareGroup_ = builderForValue.build(); + } else { + hardwareGroupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The hardware group to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeHardwareGroup( + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup value) { + if (hardwareGroupBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && hardwareGroup_ != null + && hardwareGroup_ + != com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup + .getDefaultInstance()) { + getHardwareGroupBuilder().mergeFrom(value); + } else { + hardwareGroup_ = value; + } + } else { + hardwareGroupBuilder_.mergeFrom(value); + } + if (hardwareGroup_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The hardware group to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearHardwareGroup() { + bitField0_ = (bitField0_ & ~0x00000002); + hardwareGroup_ = null; + if (hardwareGroupBuilder_ != null) { + hardwareGroupBuilder_.dispose(); + hardwareGroupBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The hardware group to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder + getHardwareGroupBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getHardwareGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The hardware group to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder + getHardwareGroupOrBuilder() { + if (hardwareGroupBuilder_ != null) { + return hardwareGroupBuilder_.getMessageOrBuilder(); + } else { + return hardwareGroup_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.getDefaultInstance() + : hardwareGroup_; + } + } + /** + * + * + *
+     * Required. The hardware group to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder> + getHardwareGroupFieldBuilder() { + if (hardwareGroupBuilder_ == null) { + hardwareGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder>( + getHardwareGroup(), getParentForChildren(), isClean()); + hardwareGroup_ = null; + } + return hardwareGroupBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateHardwareGroupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareGroupRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareGroupRequestOrBuilder.java new file mode 100644 index 000000000000..e21d4b0f8609 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareGroupRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface UpdateHardwareGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A mask to specify the fields in the HardwareGroup to overwrite
+   * with this update. The fields specified in the update_mask are relative to
+   * the hardware group, not the full request. A field will be overwritten if it
+   * is in the mask. If you don't provide a mask then all fields will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A mask to specify the fields in the HardwareGroup to overwrite
+   * with this update. The fields specified in the update_mask are relative to
+   * the hardware group, not the full request. A field will be overwritten if it
+   * is in the mask. If you don't provide a mask then all fields will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A mask to specify the fields in the HardwareGroup to overwrite
+   * with this update. The fields specified in the update_mask are relative to
+   * the hardware group, not the full request. A field will be overwritten if it
+   * is in the mask. If you don't provide a mask then all fields will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The hardware group to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardwareGroup field is set. + */ + boolean hasHardwareGroup(); + /** + * + * + *
+   * Required. The hardware group to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardwareGroup. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup getHardwareGroup(); + /** + * + * + *
+   * Required. The hardware group to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup hardware_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupOrBuilder getHardwareGroupOrBuilder(); + + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareRequest.java new file mode 100644 index 000000000000..40817ab69619 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareRequest.java @@ -0,0 +1,1261 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to update hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest} + */ +public final class UpdateHardwareRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest) + UpdateHardwareRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateHardwareRequest.newBuilder() to construct. + private UpdateHardwareRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateHardwareRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateHardwareRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A mask to specify the fields in the Hardware to overwrite with
+   * this update. The fields specified in the update_mask are relative to the
+   * hardware, not the full request. A field will be overwritten if it is in the
+   * mask. If you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. A mask to specify the fields in the Hardware to overwrite with
+   * this update. The fields specified in the update_mask are relative to the
+   * hardware, not the full request. A field will be overwritten if it is in the
+   * mask. If you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A mask to specify the fields in the Hardware to overwrite with
+   * this update. The fields specified in the update_mask are relative to the
+   * hardware, not the full request. A field will be overwritten if it is in the
+   * mask. If you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int HARDWARE_FIELD_NUMBER = 2; + private com.google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware_; + /** + * + * + *
+   * Required. The hardware to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardware field is set. + */ + @java.lang.Override + public boolean hasHardware() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The hardware to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardware. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getHardware() { + return hardware_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance() + : hardware_; + } + /** + * + * + *
+   * Required. The hardware to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder getHardwareOrBuilder() { + return hardware_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance() + : hardware_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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, getHardware()); + } + 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, getHardware()); + } + 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.gdchardwaremanagement.v1alpha.UpdateHardwareRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasHardware() != other.hasHardware()) return false; + if (hasHardware()) { + if (!getHardware().equals(other.getHardware())) 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 (hasHardware()) { + hash = (37 * hash) + HARDWARE_FIELD_NUMBER; + hash = (53 * hash) + getHardware().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.gdchardwaremanagement.v1alpha.UpdateHardwareRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest 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.gdchardwaremanagement.v1alpha.UpdateHardwareRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest + 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.gdchardwaremanagement.v1alpha.UpdateHardwareRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest 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.gdchardwaremanagement.v1alpha.UpdateHardwareRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest.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(); + getHardwareFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + hardware_ = null; + if (hardwareBuilder_ != null) { + hardwareBuilder_.dispose(); + hardwareBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateHardwareRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest 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.hardware_ = hardwareBuilder_ == null ? hardware_ : hardwareBuilder_.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.gdchardwaremanagement.v1alpha.UpdateHardwareRequest) { + return mergeFrom( + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest + .getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasHardware()) { + mergeHardware(other.getHardware()); + } + 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(getHardwareFieldBuilder().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_; + /** + * + * + *
+     * Required. A mask to specify the fields in the Hardware to overwrite with
+     * this update. The fields specified in the update_mask are relative to the
+     * hardware, not the full request. A field will be overwritten if it is in the
+     * mask. If you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Hardware to overwrite with
+     * this update. The fields specified in the update_mask are relative to the
+     * hardware, not the full request. A field will be overwritten if it is in the
+     * mask. If you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Hardware to overwrite with
+     * this update. The fields specified in the update_mask are relative to the
+     * hardware, not the full request. A field will be overwritten if it is in the
+     * mask. If you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Hardware to overwrite with
+     * this update. The fields specified in the update_mask are relative to the
+     * hardware, not the full request. A field will be overwritten if it is in the
+     * mask. If you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Hardware to overwrite with
+     * this update. The fields specified in the update_mask are relative to the
+     * hardware, not the full request. A field will be overwritten if it is in the
+     * mask. If you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Hardware to overwrite with
+     * this update. The fields specified in the update_mask are relative to the
+     * hardware, not the full request. A field will be overwritten if it is in the
+     * mask. If you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Hardware to overwrite with
+     * this update. The fields specified in the update_mask are relative to the
+     * hardware, not the full request. A field will be overwritten if it is in the
+     * mask. If you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Hardware to overwrite with
+     * this update. The fields specified in the update_mask are relative to the
+     * hardware, not the full request. A field will be overwritten if it is in the
+     * mask. If you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Hardware to overwrite with
+     * this update. The fields specified in the update_mask are relative to the
+     * hardware, not the full request. A field will be overwritten if it is in the
+     * mask. If you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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.gdchardwaremanagement.v1alpha.Hardware hardware_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder> + hardwareBuilder_; + /** + * + * + *
+     * Required. The hardware to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardware field is set. + */ + public boolean hasHardware() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The hardware to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardware. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getHardware() { + if (hardwareBuilder_ == null) { + return hardware_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance() + : hardware_; + } else { + return hardwareBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The hardware to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHardware(com.google.cloud.gdchardwaremanagement.v1alpha.Hardware value) { + if (hardwareBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hardware_ = value; + } else { + hardwareBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The hardware to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHardware( + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder builderForValue) { + if (hardwareBuilder_ == null) { + hardware_ = builderForValue.build(); + } else { + hardwareBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The hardware to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeHardware(com.google.cloud.gdchardwaremanagement.v1alpha.Hardware value) { + if (hardwareBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && hardware_ != null + && hardware_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance()) { + getHardwareBuilder().mergeFrom(value); + } else { + hardware_ = value; + } + } else { + hardwareBuilder_.mergeFrom(value); + } + if (hardware_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The hardware to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearHardware() { + bitField0_ = (bitField0_ & ~0x00000002); + hardware_ = null; + if (hardwareBuilder_ != null) { + hardwareBuilder_.dispose(); + hardwareBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The hardware to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder getHardwareBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getHardwareFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The hardware to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder getHardwareOrBuilder() { + if (hardwareBuilder_ != null) { + return hardwareBuilder_.getMessageOrBuilder(); + } else { + return hardware_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.getDefaultInstance() + : hardware_; + } + } + /** + * + * + *
+     * Required. The hardware to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder> + getHardwareFieldBuilder() { + if (hardwareBuilder_ == null) { + hardwareBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware, + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder>( + getHardware(), getParentForChildren(), isClean()); + hardware_ = null; + } + return hardwareBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.UpdateHardwareRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateHardwareRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareRequestOrBuilder.java new file mode 100644 index 000000000000..fb22a3bb91d1 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateHardwareRequestOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface UpdateHardwareRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A mask to specify the fields in the Hardware to overwrite with
+   * this update. The fields specified in the update_mask are relative to the
+   * hardware, not the full request. A field will be overwritten if it is in the
+   * mask. If you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A mask to specify the fields in the Hardware to overwrite with
+   * this update. The fields specified in the update_mask are relative to the
+   * hardware, not the full request. A field will be overwritten if it is in the
+   * mask. If you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A mask to specify the fields in the Hardware to overwrite with
+   * this update. The fields specified in the update_mask are relative to the
+   * hardware, not the full request. A field will be overwritten if it is in the
+   * mask. If you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The hardware to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hardware field is set. + */ + boolean hasHardware(); + /** + * + * + *
+   * Required. The hardware to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hardware. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Hardware getHardware(); + /** + * + * + *
+   * Required. The hardware to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Hardware hardware = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.HardwareOrBuilder getHardwareOrBuilder(); + + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateOrderRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateOrderRequest.java new file mode 100644 index 000000000000..16e42277f6ee --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateOrderRequest.java @@ -0,0 +1,1259 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to update an order.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest} + */ +public final class UpdateOrderRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest) + UpdateOrderRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateOrderRequest.newBuilder() to construct. + private UpdateOrderRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateOrderRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateOrderRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateOrderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateOrderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A mask to specify the fields in the Order to overwrite with this
+   * update. The fields specified in the update_mask are relative to the order,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. A mask to specify the fields in the Order to overwrite with this
+   * update. The fields specified in the update_mask are relative to the order,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A mask to specify the fields in the Order to overwrite with this
+   * update. The fields specified in the update_mask are relative to the order,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int ORDER_FIELD_NUMBER = 2; + private com.google.cloud.gdchardwaremanagement.v1alpha.Order order_; + /** + * + * + *
+   * Required. The order to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the order field is set. + */ + @java.lang.Override + public boolean hasOrder() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The order to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The order. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Order getOrder() { + return order_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance() + : order_; + } + /** + * + * + *
+   * Required. The order to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder getOrderOrBuilder() { + return order_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance() + : order_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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, getOrder()); + } + 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, getOrder()); + } + 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.gdchardwaremanagement.v1alpha.UpdateOrderRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasOrder() != other.hasOrder()) return false; + if (hasOrder()) { + if (!getOrder().equals(other.getOrder())) 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 (hasOrder()) { + hash = (37 * hash) + ORDER_FIELD_NUMBER; + hash = (53 * hash) + getOrder().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.gdchardwaremanagement.v1alpha.UpdateOrderRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest 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.gdchardwaremanagement.v1alpha.UpdateOrderRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest + 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.gdchardwaremanagement.v1alpha.UpdateOrderRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest 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.gdchardwaremanagement.v1alpha.UpdateOrderRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update an order.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateOrderRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateOrderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest.Builder.class); + } + + // Construct using + // com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest.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(); + getOrderFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + order_ = null; + if (orderBuilder_ != null) { + orderBuilder_.dispose(); + orderBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateOrderRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest 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.order_ = orderBuilder_ == null ? order_ : orderBuilder_.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.gdchardwaremanagement.v1alpha.UpdateOrderRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasOrder()) { + mergeOrder(other.getOrder()); + } + 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(getOrderFieldBuilder().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_; + /** + * + * + *
+     * Required. A mask to specify the fields in the Order to overwrite with this
+     * update. The fields specified in the update_mask are relative to the order,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Order to overwrite with this
+     * update. The fields specified in the update_mask are relative to the order,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Order to overwrite with this
+     * update. The fields specified in the update_mask are relative to the order,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Order to overwrite with this
+     * update. The fields specified in the update_mask are relative to the order,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Order to overwrite with this
+     * update. The fields specified in the update_mask are relative to the order,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Order to overwrite with this
+     * update. The fields specified in the update_mask are relative to the order,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Order to overwrite with this
+     * update. The fields specified in the update_mask are relative to the order,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Order to overwrite with this
+     * update. The fields specified in the update_mask are relative to the order,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Order to overwrite with this
+     * update. The fields specified in the update_mask are relative to the order,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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.gdchardwaremanagement.v1alpha.Order order_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Order, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder> + orderBuilder_; + /** + * + * + *
+     * Required. The order to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the order field is set. + */ + public boolean hasOrder() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The order to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The order. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Order getOrder() { + if (orderBuilder_ == null) { + return order_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance() + : order_; + } else { + return orderBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The order to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOrder(com.google.cloud.gdchardwaremanagement.v1alpha.Order value) { + if (orderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + order_ = value; + } else { + orderBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOrder( + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder builderForValue) { + if (orderBuilder_ == null) { + order_ = builderForValue.build(); + } else { + orderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOrder(com.google.cloud.gdchardwaremanagement.v1alpha.Order value) { + if (orderBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && order_ != null + && order_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance()) { + getOrderBuilder().mergeFrom(value); + } else { + order_ = value; + } + } else { + orderBuilder_.mergeFrom(value); + } + if (order_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The order to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOrder() { + bitField0_ = (bitField0_ & ~0x00000002); + order_ = null; + if (orderBuilder_ != null) { + orderBuilder_.dispose(); + orderBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The order to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder getOrderBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOrderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The order to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder getOrderOrBuilder() { + if (orderBuilder_ != null) { + return orderBuilder_.getMessageOrBuilder(); + } else { + return order_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Order.getDefaultInstance() + : order_; + } + } + /** + * + * + *
+     * Required. The order to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Order, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder> + getOrderFieldBuilder() { + if (orderBuilder_ == null) { + orderBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Order, + com.google.cloud.gdchardwaremanagement.v1alpha.Order.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder>( + getOrder(), getParentForChildren(), isClean()); + order_ = null; + } + return orderBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.UpdateOrderRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateOrderRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateOrderRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateOrderRequestOrBuilder.java new file mode 100644 index 000000000000..ca3fd8abd588 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateOrderRequestOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface UpdateOrderRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A mask to specify the fields in the Order to overwrite with this
+   * update. The fields specified in the update_mask are relative to the order,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A mask to specify the fields in the Order to overwrite with this
+   * update. The fields specified in the update_mask are relative to the order,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A mask to specify the fields in the Order to overwrite with this
+   * update. The fields specified in the update_mask are relative to the order,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The order to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the order field is set. + */ + boolean hasOrder(); + /** + * + * + *
+   * Required. The order to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The order. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Order getOrder(); + /** + * + * + *
+   * Required. The order to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.OrderOrBuilder getOrderOrBuilder(); + + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateSiteRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateSiteRequest.java new file mode 100644 index 000000000000..7c9fd0eecae0 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateSiteRequest.java @@ -0,0 +1,1256 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to update a site.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest} + */ +public final class UpdateSiteRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest) + UpdateSiteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateSiteRequest.newBuilder() to construct. + private UpdateSiteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateSiteRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateSiteRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateSiteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateSiteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A mask to specify the fields in the Site to overwrite with this
+   * update. The fields specified in the update_mask are relative to the site,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. A mask to specify the fields in the Site to overwrite with this
+   * update. The fields specified in the update_mask are relative to the site,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A mask to specify the fields in the Site to overwrite with this
+   * update. The fields specified in the update_mask are relative to the site,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int SITE_FIELD_NUMBER = 2; + private com.google.cloud.gdchardwaremanagement.v1alpha.Site site_; + /** + * + * + *
+   * Required. The site to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the site field is set. + */ + @java.lang.Override + public boolean hasSite() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The site to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The site. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Site getSite() { + return site_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance() + : site_; + } + /** + * + * + *
+   * Required. The site to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder getSiteOrBuilder() { + return site_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance() + : site_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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, getSite()); + } + 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, getSite()); + } + 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.gdchardwaremanagement.v1alpha.UpdateSiteRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasSite() != other.hasSite()) return false; + if (hasSite()) { + if (!getSite().equals(other.getSite())) 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 (hasSite()) { + hash = (37 * hash) + SITE_FIELD_NUMBER; + hash = (53 * hash) + getSite().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.gdchardwaremanagement.v1alpha.UpdateSiteRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest 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.gdchardwaremanagement.v1alpha.UpdateSiteRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest 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.gdchardwaremanagement.v1alpha.UpdateSiteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest 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.gdchardwaremanagement.v1alpha.UpdateSiteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update a site.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateSiteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateSiteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest.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(); + getSiteFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + site_ = null; + if (siteBuilder_ != null) { + siteBuilder_.dispose(); + siteBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateSiteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest 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.site_ = siteBuilder_ == null ? site_ : siteBuilder_.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.gdchardwaremanagement.v1alpha.UpdateSiteRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasSite()) { + mergeSite(other.getSite()); + } + 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(getSiteFieldBuilder().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_; + /** + * + * + *
+     * Required. A mask to specify the fields in the Site to overwrite with this
+     * update. The fields specified in the update_mask are relative to the site,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Site to overwrite with this
+     * update. The fields specified in the update_mask are relative to the site,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Site to overwrite with this
+     * update. The fields specified in the update_mask are relative to the site,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Site to overwrite with this
+     * update. The fields specified in the update_mask are relative to the site,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Site to overwrite with this
+     * update. The fields specified in the update_mask are relative to the site,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Site to overwrite with this
+     * update. The fields specified in the update_mask are relative to the site,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Site to overwrite with this
+     * update. The fields specified in the update_mask are relative to the site,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Site to overwrite with this
+     * update. The fields specified in the update_mask are relative to the site,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Site to overwrite with this
+     * update. The fields specified in the update_mask are relative to the site,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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.gdchardwaremanagement.v1alpha.Site site_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Site, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder> + siteBuilder_; + /** + * + * + *
+     * Required. The site to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the site field is set. + */ + public boolean hasSite() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The site to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The site. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Site getSite() { + if (siteBuilder_ == null) { + return site_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance() + : site_; + } else { + return siteBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The site to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSite(com.google.cloud.gdchardwaremanagement.v1alpha.Site value) { + if (siteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + site_ = value; + } else { + siteBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The site to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSite( + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder builderForValue) { + if (siteBuilder_ == null) { + site_ = builderForValue.build(); + } else { + siteBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The site to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSite(com.google.cloud.gdchardwaremanagement.v1alpha.Site value) { + if (siteBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && site_ != null + && site_ != com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance()) { + getSiteBuilder().mergeFrom(value); + } else { + site_ = value; + } + } else { + siteBuilder_.mergeFrom(value); + } + if (site_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The site to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSite() { + bitField0_ = (bitField0_ & ~0x00000002); + site_ = null; + if (siteBuilder_ != null) { + siteBuilder_.dispose(); + siteBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The site to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder getSiteBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSiteFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The site to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder getSiteOrBuilder() { + if (siteBuilder_ != null) { + return siteBuilder_.getMessageOrBuilder(); + } else { + return site_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Site.getDefaultInstance() + : site_; + } + } + /** + * + * + *
+     * Required. The site to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Site, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder> + getSiteFieldBuilder() { + if (siteBuilder_ == null) { + siteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Site, + com.google.cloud.gdchardwaremanagement.v1alpha.Site.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder>( + getSite(), getParentForChildren(), isClean()); + site_ = null; + } + return siteBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.gdchardwaremanagement.v1alpha.UpdateSiteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSiteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateSiteRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateSiteRequestOrBuilder.java new file mode 100644 index 000000000000..96941dda9af0 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateSiteRequestOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface UpdateSiteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A mask to specify the fields in the Site to overwrite with this
+   * update. The fields specified in the update_mask are relative to the site,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A mask to specify the fields in the Site to overwrite with this
+   * update. The fields specified in the update_mask are relative to the site,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A mask to specify the fields in the Site to overwrite with this
+   * update. The fields specified in the update_mask are relative to the site,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The site to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the site field is set. + */ + boolean hasSite(); + /** + * + * + *
+   * Required. The site to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The site. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Site getSite(); + /** + * + * + *
+   * Required. The site to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SiteOrBuilder getSiteOrBuilder(); + + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateZoneRequest.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateZoneRequest.java new file mode 100644 index 000000000000..0eb092468008 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateZoneRequest.java @@ -0,0 +1,1270 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A request to update a zone.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest} + */ +public final class UpdateZoneRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest) + UpdateZoneRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateZoneRequest.newBuilder() to construct. + private UpdateZoneRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateZoneRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateZoneRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A mask to specify the fields in the Zone to overwrite with this
+   * update. The fields specified in the update_mask are relative to the zone,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. A mask to specify the fields in the Zone to overwrite with this
+   * update. The fields specified in the update_mask are relative to the zone,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A mask to specify the fields in the Zone to overwrite with this
+   * update. The fields specified in the update_mask are relative to the zone,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int ZONE_FIELD_NUMBER = 2; + private com.google.cloud.gdchardwaremanagement.v1alpha.Zone zone_; + /** + * + * + *
+   * Required. The zone to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the zone field is set. + */ + @java.lang.Override + public boolean hasZone() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Required. The zone to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The zone. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone getZone() { + return zone_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance() + : zone_; + } + /** + * + * + *
+   * Required. The zone to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder getZoneOrBuilder() { + return zone_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance() + : zone_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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 unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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, getZone()); + } + 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, getZone()); + } + 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.gdchardwaremanagement.v1alpha.UpdateZoneRequest)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest other = + (com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasZone() != other.hasZone()) return false; + if (hasZone()) { + if (!getZone().equals(other.getZone())) 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 (hasZone()) { + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().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.gdchardwaremanagement.v1alpha.UpdateZoneRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest 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.gdchardwaremanagement.v1alpha.UpdateZoneRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest 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.gdchardwaremanagement.v1alpha.UpdateZoneRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest 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.gdchardwaremanagement.v1alpha.UpdateZoneRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to update a zone.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest) + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateZoneRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateZoneRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest.class, + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest.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(); + getZoneFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + zone_ = null; + if (zoneBuilder_ != null) { + zoneBuilder_.dispose(); + zoneBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ServiceProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_UpdateZoneRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest build() { + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest result = + new com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest 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.zone_ = zoneBuilder_ == null ? zone_ : zoneBuilder_.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.gdchardwaremanagement.v1alpha.UpdateZoneRequest) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasZone()) { + mergeZone(other.getZone()); + } + 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(getZoneFieldBuilder().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_; + /** + * + * + *
+     * Required. A mask to specify the fields in the Zone to overwrite with this
+     * update. The fields specified in the update_mask are relative to the zone,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Zone to overwrite with this
+     * update. The fields specified in the update_mask are relative to the zone,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Zone to overwrite with this
+     * update. The fields specified in the update_mask are relative to the zone,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Zone to overwrite with this
+     * update. The fields specified in the update_mask are relative to the zone,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Zone to overwrite with this
+     * update. The fields specified in the update_mask are relative to the zone,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Zone to overwrite with this
+     * update. The fields specified in the update_mask are relative to the zone,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Zone to overwrite with this
+     * update. The fields specified in the update_mask are relative to the zone,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Zone to overwrite with this
+     * update. The fields specified in the update_mask are relative to the zone,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A mask to specify the fields in the Zone to overwrite with this
+     * update. The fields specified in the update_mask are relative to the zone,
+     * not the full request. A field will be overwritten if it is in the mask. If
+     * you don't provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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.gdchardwaremanagement.v1alpha.Zone zone_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Zone, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder> + zoneBuilder_; + /** + * + * + *
+     * Required. The zone to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the zone field is set. + */ + public boolean hasZone() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The zone to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The zone. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone getZone() { + if (zoneBuilder_ == null) { + return zone_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance() + : zone_; + } else { + return zoneBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The zone to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setZone(com.google.cloud.gdchardwaremanagement.v1alpha.Zone value) { + if (zoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + } else { + zoneBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The zone to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setZone( + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder builderForValue) { + if (zoneBuilder_ == null) { + zone_ = builderForValue.build(); + } else { + zoneBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The zone to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeZone(com.google.cloud.gdchardwaremanagement.v1alpha.Zone value) { + if (zoneBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && zone_ != null + && zone_ != com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance()) { + getZoneBuilder().mergeFrom(value); + } else { + zone_ = value; + } + } else { + zoneBuilder_.mergeFrom(value); + } + if (zone_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The zone to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearZone() { + bitField0_ = (bitField0_ & ~0x00000002); + zone_ = null; + if (zoneBuilder_ != null) { + zoneBuilder_.dispose(); + zoneBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The zone to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder getZoneBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getZoneFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The zone to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder getZoneOrBuilder() { + if (zoneBuilder_ != null) { + return zoneBuilder_.getMessageOrBuilder(); + } else { + return zone_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance() + : zone_; + } + } + /** + * + * + *
+     * Required. The zone to update.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Zone, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder> + getZoneFieldBuilder() { + if (zoneBuilder_ == null) { + zoneBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Zone, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder>( + getZone(), getParentForChildren(), isClean()); + zone_ = null; + } + return zoneBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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 unique identifier for this request. See
+     * [AIP-155](https://google.aip.dev/155).
+     * 
+ * + * + * 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.gdchardwaremanagement.v1alpha.UpdateZoneRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateZoneRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateZoneRequestOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateZoneRequestOrBuilder.java new file mode 100644 index 000000000000..6a961de87344 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/UpdateZoneRequestOrBuilder.java @@ -0,0 +1,145 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface UpdateZoneRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A mask to specify the fields in the Zone to overwrite with this
+   * update. The fields specified in the update_mask are relative to the zone,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A mask to specify the fields in the Zone to overwrite with this
+   * update. The fields specified in the update_mask are relative to the zone,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A mask to specify the fields in the Zone to overwrite with this
+   * update. The fields specified in the update_mask are relative to the zone,
+   * not the full request. A field will be overwritten if it is in the mask. If
+   * you don't provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The zone to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the zone field is set. + */ + boolean hasZone(); + /** + * + * + *
+   * Required. The zone to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The zone. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Zone getZone(); + /** + * + * + *
+   * Required. The zone to update.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder getZoneOrBuilder(); + + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional unique identifier for this request. See
+   * [AIP-155](https://google.aip.dev/155).
+   * 
+ * + * + * 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-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Zone.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Zone.java new file mode 100644 index 000000000000..83f4fef279ba --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/Zone.java @@ -0,0 +1,3416 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * A zone holding a set of hardware.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Zone} + */ +public final class Zone extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.Zone) + ZoneOrBuilder { + private static final long serialVersionUID = 0L; + // Use Zone.newBuilder() to construct. + private Zone(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Zone() { + name_ = ""; + displayName_ = ""; + state_ = 0; + contacts_ = java.util.Collections.emptyList(); + ciqUri_ = ""; + globallyUniqueId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Zone(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder.class); + } + + /** + * + * + *
+   * Valid states for a zone.
+   * 
+ * + * Protobuf enum {@code google.cloud.gdchardwaremanagement.v1alpha.Zone.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State of the Zone is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * More information is required from the customer to make progress.
+     * 
+ * + * ADDITIONAL_INFO_NEEDED = 1; + */ + ADDITIONAL_INFO_NEEDED(1), + /** + * + * + *
+     * Google is preparing the Zone.
+     * 
+ * + * PREPARING = 2; + */ + PREPARING(2), + /** + * + * + *
+     * Factory turnup has succeeded.
+     * 
+ * + * READY_FOR_CUSTOMER_FACTORY_TURNUP_CHECKS = 5; + */ + READY_FOR_CUSTOMER_FACTORY_TURNUP_CHECKS(5), + /** + * + * + *
+     * The Zone is ready for site turnup.
+     * 
+ * + * READY_FOR_SITE_TURNUP = 6; + */ + READY_FOR_SITE_TURNUP(6), + /** + * + * + *
+     * The Zone failed in factory turnup checks.
+     * 
+ * + * CUSTOMER_FACTORY_TURNUP_CHECKS_FAILED = 7; + */ + CUSTOMER_FACTORY_TURNUP_CHECKS_FAILED(7), + /** + * + * + *
+     * The Zone is available to use.
+     * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + /** + * + * + *
+     * The Zone has been cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + CANCELLED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State of the Zone is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * More information is required from the customer to make progress.
+     * 
+ * + * ADDITIONAL_INFO_NEEDED = 1; + */ + public static final int ADDITIONAL_INFO_NEEDED_VALUE = 1; + /** + * + * + *
+     * Google is preparing the Zone.
+     * 
+ * + * PREPARING = 2; + */ + public static final int PREPARING_VALUE = 2; + /** + * + * + *
+     * Factory turnup has succeeded.
+     * 
+ * + * READY_FOR_CUSTOMER_FACTORY_TURNUP_CHECKS = 5; + */ + public static final int READY_FOR_CUSTOMER_FACTORY_TURNUP_CHECKS_VALUE = 5; + /** + * + * + *
+     * The Zone is ready for site turnup.
+     * 
+ * + * READY_FOR_SITE_TURNUP = 6; + */ + public static final int READY_FOR_SITE_TURNUP_VALUE = 6; + /** + * + * + *
+     * The Zone failed in factory turnup checks.
+     * 
+ * + * CUSTOMER_FACTORY_TURNUP_CHECKS_FAILED = 7; + */ + public static final int CUSTOMER_FACTORY_TURNUP_CHECKS_FAILED_VALUE = 7; + /** + * + * + *
+     * The Zone is available to use.
+     * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + /** + * + * + *
+     * The Zone has been cancelled.
+     * 
+ * + * CANCELLED = 4; + */ + public static final int CANCELLED_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 ADDITIONAL_INFO_NEEDED; + case 2: + return PREPARING; + case 5: + return READY_FOR_CUSTOMER_FACTORY_TURNUP_CHECKS; + case 6: + return READY_FOR_SITE_TURNUP; + case 7: + return CUSTOMER_FACTORY_TURNUP_CHECKS_FAILED; + case 3: + return ACTIVE; + case 4: + return CANCELLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Zone.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.gdchardwaremanagement.v1alpha.Zone.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. Name of this zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * 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 this zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * 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. Time when this zone was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Time when this zone was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when this zone was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when this zone was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Time when this zone was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when this zone was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_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 associated with this zone as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this zone as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels associated with this zone as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this zone as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 DISPLAY_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. Human friendly display name of this zone.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Human friendly display name of this zone.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_ = 0; + /** + * + * + *
+   * Output only. Current state for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone.State state = 8 [(.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. Current state for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State getState() { + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State result = + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State.forNumber(state_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State.UNRECOGNIZED + : result; + } + + public static final int CONTACTS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List contacts_; + /** + * + * + *
+   * Required. The points of contact.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getContactsList() { + return contacts_; + } + /** + * + * + *
+   * Required. The points of contact.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getContactsOrBuilderList() { + return contacts_; + } + /** + * + * + *
+   * Required. The points of contact.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getContactsCount() { + return contacts_.size(); + } + /** + * + * + *
+   * Required. The points of contact.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact getContacts(int index) { + return contacts_.get(index); + } + /** + * + * + *
+   * Required. The points of contact.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder getContactsOrBuilder( + int index) { + return contacts_.get(index); + } + + public static final int CIQ_URI_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object ciqUri_ = ""; + /** + * + * + *
+   * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+   * zone.
+   * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ciqUri. + */ + @java.lang.Override + public java.lang.String getCiqUri() { + java.lang.Object ref = ciqUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ciqUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+   * zone.
+   * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ciqUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCiqUriBytes() { + java.lang.Object ref = ciqUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ciqUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 11; + private com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig networkConfig_; + /** + * + * + *
+   * Optional. Networking configuration for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Optional. Networking configuration for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig getNetworkConfig() { + return networkConfig_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.getDefaultInstance() + : networkConfig_; + } + /** + * + * + *
+   * Optional. Networking configuration for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfigOrBuilder + getNetworkConfigOrBuilder() { + return networkConfig_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.getDefaultInstance() + : networkConfig_; + } + + public static final int GLOBALLY_UNIQUE_ID_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object globallyUniqueId_ = ""; + /** + * + * + *
+   * Output only. Globally unique identifier generated for this Edge Zone.
+   * 
+ * + * string globally_unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The globallyUniqueId. + */ + @java.lang.Override + public java.lang.String getGloballyUniqueId() { + java.lang.Object ref = globallyUniqueId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + globallyUniqueId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Globally unique identifier generated for this Edge Zone.
+   * 
+ * + * string globally_unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for globallyUniqueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGloballyUniqueIdBytes() { + java.lang.Object ref = globallyUniqueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + globallyUniqueId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); + } + if (state_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, state_); + } + for (int i = 0; i < contacts_.size(); i++) { + output.writeMessage(9, contacts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ciqUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ciqUri_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(11, getNetworkConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(globallyUniqueId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, globallyUniqueId_); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); + } + if (state_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); + } + for (int i = 0; i < contacts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, contacts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ciqUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, ciqUri_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getNetworkConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(globallyUniqueId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, globallyUniqueId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.Zone)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.Zone other = + (com.google.cloud.gdchardwaremanagement.v1alpha.Zone) 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 (!getDisplayName().equals(other.getDisplayName())) return false; + if (state_ != other.state_) return false; + if (!getContactsList().equals(other.getContactsList())) return false; + if (!getCiqUri().equals(other.getCiqUri())) return false; + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; + } + if (!getGloballyUniqueId().equals(other.getGloballyUniqueId())) return false; + if (!getUnknownFields().equals(other.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) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getContactsCount() > 0) { + hash = (37 * hash) + CONTACTS_FIELD_NUMBER; + hash = (53 * hash) + getContactsList().hashCode(); + } + hash = (37 * hash) + CIQ_URI_FIELD_NUMBER; + hash = (53 * hash) + getCiqUri().hashCode(); + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + hash = (37 * hash) + GLOBALLY_UNIQUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getGloballyUniqueId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone 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.gdchardwaremanagement.v1alpha.Zone parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone 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.gdchardwaremanagement.v1alpha.Zone parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone 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.gdchardwaremanagement.v1alpha.Zone prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A zone holding a set of hardware.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.Zone} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.Zone) + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_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.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.class, + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.Zone.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(); + getContactsFieldBuilder(); + getNetworkConfigFieldBuilder(); + } + } + + @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(); + displayName_ = ""; + state_ = 0; + if (contactsBuilder_ == null) { + contacts_ = java.util.Collections.emptyList(); + } else { + contacts_ = null; + contactsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + ciqUri_ = ""; + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + globallyUniqueId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_Zone_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.Zone.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone build() { + com.google.cloud.gdchardwaremanagement.v1alpha.Zone result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.Zone result = + new com.google.cloud.gdchardwaremanagement.v1alpha.Zone(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.gdchardwaremanagement.v1alpha.Zone result) { + if (contactsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + contacts_ = java.util.Collections.unmodifiableList(contacts_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.contacts_ = contacts_; + } else { + result.contacts_ = contactsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.gdchardwaremanagement.v1alpha.Zone 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.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.ciqUri_ = ciqUri_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.networkConfig_ = + networkConfigBuilder_ == null ? networkConfig_ : networkConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.globallyUniqueId_ = globallyUniqueId_; + } + 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.gdchardwaremanagement.v1alpha.Zone) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.Zone) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.gdchardwaremanagement.v1alpha.Zone other) { + if (other == com.google.cloud.gdchardwaremanagement.v1alpha.Zone.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.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (contactsBuilder_ == null) { + if (!other.contacts_.isEmpty()) { + if (contacts_.isEmpty()) { + contacts_ = other.contacts_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureContactsIsMutable(); + contacts_.addAll(other.contacts_); + } + onChanged(); + } + } else { + if (!other.contacts_.isEmpty()) { + if (contactsBuilder_.isEmpty()) { + contactsBuilder_.dispose(); + contactsBuilder_ = null; + contacts_ = other.contacts_; + bitField0_ = (bitField0_ & ~0x00000040); + contactsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContactsFieldBuilder() + : null; + } else { + contactsBuilder_.addAllMessages(other.contacts_); + } + } + } + if (!other.getCiqUri().isEmpty()) { + ciqUri_ = other.ciqUri_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + if (!other.getGloballyUniqueId().isEmpty()) { + globallyUniqueId_ = other.globallyUniqueId_; + bitField0_ |= 0x00000200; + 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 42: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 64: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 64 + case 74: + { + com.google.cloud.gdchardwaremanagement.v1alpha.Contact m = + input.readMessage( + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.parser(), + extensionRegistry); + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(m); + } else { + contactsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + ciqUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 90: + { + input.readMessage(getNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 90 + case 98: + { + globallyUniqueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 98 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Identifier. Name of this zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * 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 this zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * 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 this zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * 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 this zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * 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 this zone.
+     * Format: `projects/{project}/locations/{location}/zones/{zone}`
+     * 
+ * + * 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. Time when this zone was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. Time when this zone was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this zone was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this zone was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this zone was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 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. Time when this zone was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this zone was created.
+     * 
+ * + * + * .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. Time when this zone was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when this zone was created.
+     * 
+ * + * + * .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. Time when this zone was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Time when this zone was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when this zone was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this zone was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when this zone was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 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. Time when this zone was last updated.
+     * 
+ * + * + * .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. Time when this zone was last updated.
+     * 
+ * + * + * .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. Time when this zone was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when this zone was last updated.
+     * 
+ * + * + * .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 associated with this zone as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this zone as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels associated with this zone as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this zone as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this zone as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this zone as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 associated with this zone as key value pairs.
+     * For more information about labels, see [Create and manage
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+     * 
+ * + * 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 java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. Human friendly display name of this zone.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Human friendly display name of this zone.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Human friendly display name of this zone.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Human friendly display name of this zone.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Human friendly display name of this zone.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current state for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone.State state = 8 [(.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. Current state for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone.State state = 8 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State getState() { + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State result = + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State.forNumber(state_); + return result == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Current state for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private java.util.List contacts_ = + java.util.Collections.emptyList(); + + private void ensureContactsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + contacts_ = + new java.util.ArrayList( + contacts_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Contact, + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder> + contactsBuilder_; + + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getContactsList() { + if (contactsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contacts_); + } else { + return contactsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getContactsCount() { + if (contactsBuilder_ == null) { + return contacts_.size(); + } else { + return contactsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact getContacts(int index) { + if (contactsBuilder_ == null) { + return contacts_.get(index); + } else { + return contactsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setContacts( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.set(index, value); + onChanged(); + } else { + contactsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setContacts( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.set(index, builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContacts(com.google.cloud.gdchardwaremanagement.v1alpha.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.add(value); + onChanged(); + } else { + contactsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContacts( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.add(index, value); + onChanged(); + } else { + contactsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContacts( + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addContacts( + int index, com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(index, builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllContacts( + java.lang.Iterable + values) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contacts_); + onChanged(); + } else { + contactsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearContacts() { + if (contactsBuilder_ == null) { + contacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + contactsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeContacts(int index) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.remove(index); + onChanged(); + } else { + contactsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder getContactsBuilder( + int index) { + return getContactsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder getContactsOrBuilder( + int index) { + if (contactsBuilder_ == null) { + return contacts_.get(index); + } else { + return contactsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getContactsOrBuilderList() { + if (contactsBuilder_ != null) { + return contactsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contacts_); + } + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder addContactsBuilder() { + return getContactsFieldBuilder() + .addBuilder(com.google.cloud.gdchardwaremanagement.v1alpha.Contact.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder addContactsBuilder( + int index) { + return getContactsFieldBuilder() + .addBuilder( + index, com.google.cloud.gdchardwaremanagement.v1alpha.Contact.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The points of contact.
+     * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getContactsBuilderList() { + return getContactsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Contact, + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder> + getContactsFieldBuilder() { + if (contactsBuilder_ == null) { + contactsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Contact, + com.google.cloud.gdchardwaremanagement.v1alpha.Contact.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder>( + contacts_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + contacts_ = null; + } + return contactsBuilder_; + } + + private java.lang.Object ciqUri_ = ""; + /** + * + * + *
+     * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+     * zone.
+     * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ciqUri. + */ + public java.lang.String getCiqUri() { + java.lang.Object ref = ciqUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ciqUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+     * zone.
+     * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ciqUri. + */ + public com.google.protobuf.ByteString getCiqUriBytes() { + java.lang.Object ref = ciqUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ciqUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+     * zone.
+     * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The ciqUri to set. + * @return This builder for chaining. + */ + public Builder setCiqUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ciqUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+     * zone.
+     * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCiqUri() { + ciqUri_ = getDefaultInstance().getCiqUri(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+     * zone.
+     * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for ciqUri to set. + * @return This builder for chaining. + */ + public Builder setCiqUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ciqUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfigOrBuilder> + networkConfigBuilder_; + /** + * + * + *
+     * Optional. Networking configuration for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Optional. Networking configuration for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkConfig. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.getDefaultInstance() + : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Networking configuration for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkConfig( + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + } else { + networkConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Networking configuration for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkConfig( + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Networking configuration for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeNetworkConfig( + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && networkConfig_ != null + && networkConfig_ + != com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig + .getDefaultInstance()) { + getNetworkConfigBuilder().mergeFrom(value); + } else { + networkConfig_ = value; + } + } else { + networkConfigBuilder_.mergeFrom(value); + } + if (networkConfig_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Networking configuration for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNetworkConfig() { + bitField0_ = (bitField0_ & ~0x00000100); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Networking configuration for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.Builder + getNetworkConfigBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getNetworkConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Networking configuration for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfigOrBuilder + getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.getDefaultInstance() + : networkConfig_; + } + } + /** + * + * + *
+     * Optional. Networking configuration for this zone.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfigOrBuilder> + getNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfigOrBuilder>( + getNetworkConfig(), getParentForChildren(), isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + + private java.lang.Object globallyUniqueId_ = ""; + /** + * + * + *
+     * Output only. Globally unique identifier generated for this Edge Zone.
+     * 
+ * + * string globally_unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The globallyUniqueId. + */ + public java.lang.String getGloballyUniqueId() { + java.lang.Object ref = globallyUniqueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + globallyUniqueId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Globally unique identifier generated for this Edge Zone.
+     * 
+ * + * string globally_unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for globallyUniqueId. + */ + public com.google.protobuf.ByteString getGloballyUniqueIdBytes() { + java.lang.Object ref = globallyUniqueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + globallyUniqueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Globally unique identifier generated for this Edge Zone.
+     * 
+ * + * string globally_unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The globallyUniqueId to set. + * @return This builder for chaining. + */ + public Builder setGloballyUniqueId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + globallyUniqueId_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Globally unique identifier generated for this Edge Zone.
+     * 
+ * + * string globally_unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGloballyUniqueId() { + globallyUniqueId_ = getDefaultInstance().getGloballyUniqueId(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Globally unique identifier generated for this Edge Zone.
+     * 
+ * + * string globally_unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for globallyUniqueId to set. + * @return This builder for chaining. + */ + public Builder setGloballyUniqueIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + globallyUniqueId_ = value; + bitField0_ |= 0x00000200; + 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.gdchardwaremanagement.v1alpha.Zone) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.Zone) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.Zone DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.Zone(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.Zone getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Zone parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Zone getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneName.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneName.java new file mode 100644 index 000000000000..dad509ffbaca --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneName.java @@ -0,0 +1,217 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha; + +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 ZoneName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ZONE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/zones/{zone}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String zone; + + @Deprecated + protected ZoneName() { + project = null; + location = null; + zone = null; + } + + private ZoneName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + zone = Preconditions.checkNotNull(builder.getZone()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ZoneName of(String project, String location, String zone) { + return newBuilder().setProject(project).setLocation(location).setZone(zone).build(); + } + + public static String format(String project, String location, String zone) { + return newBuilder().setProject(project).setLocation(location).setZone(zone).build().toString(); + } + + public static ZoneName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ZONE.validatedMatch( + formattedString, "ZoneName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("zone")); + } + + 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 (ZoneName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ZONE.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 (zone != null) { + fieldMapBuilder.put("zone", zone); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ZONE.instantiate( + "project", project, "location", location, "zone", zone); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ZoneName that = ((ZoneName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.zone, that.zone); + } + 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(zone); + return h; + } + + /** Builder for projects/{project}/locations/{location}/zones/{zone}. */ + public static class Builder { + private String project; + private String location; + private String zone; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getZone() { + return zone; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setZone(String zone) { + this.zone = zone; + return this; + } + + private Builder(ZoneName zoneName) { + this.project = zoneName.project; + this.location = zoneName.location; + this.zone = zoneName.zone; + } + + public ZoneName build() { + return new ZoneName(this); + } + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneNetworkConfig.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneNetworkConfig.java new file mode 100644 index 000000000000..86572314067a --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneNetworkConfig.java @@ -0,0 +1,1770 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +/** + * + * + *
+ * Networking configuration for a zone.
+ * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig} + */ +public final class ZoneNetworkConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig) + ZoneNetworkConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ZoneNetworkConfig.newBuilder() to construct. + private ZoneNetworkConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ZoneNetworkConfig() { + machineMgmtIpv4Range_ = ""; + kubernetesNodeIpv4Range_ = ""; + kubernetesControlPlaneIpv4Range_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ZoneNetworkConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ZoneNetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ZoneNetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.Builder.class); + } + + private int bitField0_; + public static final int MACHINE_MGMT_IPV4_RANGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineMgmtIpv4Range_ = ""; + /** + * + * + *
+   * Required. An IPv4 address block for machine management.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per machine in the Zone.
+   * Should be in `management_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string machine_mgmt_ipv4_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The machineMgmtIpv4Range. + */ + @java.lang.Override + public java.lang.String getMachineMgmtIpv4Range() { + java.lang.Object ref = machineMgmtIpv4Range_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineMgmtIpv4Range_ = s; + return s; + } + } + /** + * + * + *
+   * Required. An IPv4 address block for machine management.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per machine in the Zone.
+   * Should be in `management_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string machine_mgmt_ipv4_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for machineMgmtIpv4Range. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineMgmtIpv4RangeBytes() { + java.lang.Object ref = machineMgmtIpv4Range_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineMgmtIpv4Range_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KUBERNETES_NODE_IPV4_RANGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object kubernetesNodeIpv4Range_ = ""; + /** + * + * + *
+   * Required. An IPv4 address block for kubernetes nodes.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per machine in the Zone.
+   * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string kubernetes_node_ipv4_range = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The kubernetesNodeIpv4Range. + */ + @java.lang.Override + public java.lang.String getKubernetesNodeIpv4Range() { + java.lang.Object ref = kubernetesNodeIpv4Range_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kubernetesNodeIpv4Range_ = s; + return s; + } + } + /** + * + * + *
+   * Required. An IPv4 address block for kubernetes nodes.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per machine in the Zone.
+   * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string kubernetes_node_ipv4_range = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for kubernetesNodeIpv4Range. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKubernetesNodeIpv4RangeBytes() { + java.lang.Object ref = kubernetesNodeIpv4Range_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kubernetesNodeIpv4Range_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KUBERNETES_CONTROL_PLANE_IPV4_RANGE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object kubernetesControlPlaneIpv4Range_ = ""; + /** + * + * + *
+   * Required. An IPv4 address block for kubernetes control plane.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per cluster in the Zone.
+   * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string kubernetes_control_plane_ipv4_range = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The kubernetesControlPlaneIpv4Range. + */ + @java.lang.Override + public java.lang.String getKubernetesControlPlaneIpv4Range() { + java.lang.Object ref = kubernetesControlPlaneIpv4Range_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kubernetesControlPlaneIpv4Range_ = s; + return s; + } + } + /** + * + * + *
+   * Required. An IPv4 address block for kubernetes control plane.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per cluster in the Zone.
+   * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string kubernetes_control_plane_ipv4_range = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for kubernetesControlPlaneIpv4Range. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKubernetesControlPlaneIpv4RangeBytes() { + java.lang.Object ref = kubernetesControlPlaneIpv4Range_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kubernetesControlPlaneIpv4Range_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MANAGEMENT_IPV4_SUBNET_FIELD_NUMBER = 4; + private com.google.cloud.gdchardwaremanagement.v1alpha.Subnet managementIpv4Subnet_; + /** + * + * + *
+   * Required. An IPv4 subnet for the management network.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the managementIpv4Subnet field is set. + */ + @java.lang.Override + public boolean hasManagementIpv4Subnet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. An IPv4 subnet for the management network.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The managementIpv4Subnet. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Subnet getManagementIpv4Subnet() { + return managementIpv4Subnet_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance() + : managementIpv4Subnet_; + } + /** + * + * + *
+   * Required. An IPv4 subnet for the management network.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder + getManagementIpv4SubnetOrBuilder() { + return managementIpv4Subnet_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance() + : managementIpv4Subnet_; + } + + public static final int KUBERNETES_IPV4_SUBNET_FIELD_NUMBER = 5; + private com.google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetesIpv4Subnet_; + /** + * + * + *
+   * Optional. An IPv4 subnet for the kubernetes network.
+   * If unspecified, the kubernetes subnet will be the same as the management
+   * subnet.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the kubernetesIpv4Subnet field is set. + */ + @java.lang.Override + public boolean hasKubernetesIpv4Subnet() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. An IPv4 subnet for the kubernetes network.
+   * If unspecified, the kubernetes subnet will be the same as the management
+   * subnet.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The kubernetesIpv4Subnet. + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.Subnet getKubernetesIpv4Subnet() { + return kubernetesIpv4Subnet_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance() + : kubernetesIpv4Subnet_; + } + /** + * + * + *
+   * Optional. An IPv4 subnet for the kubernetes network.
+   * If unspecified, the kubernetes subnet will be the same as the management
+   * subnet.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder + getKubernetesIpv4SubnetOrBuilder() { + return kubernetesIpv4Subnet_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance() + : kubernetesIpv4Subnet_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(machineMgmtIpv4Range_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineMgmtIpv4Range_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kubernetesNodeIpv4Range_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kubernetesNodeIpv4Range_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kubernetesControlPlaneIpv4Range_)) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, kubernetesControlPlaneIpv4Range_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getManagementIpv4Subnet()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getKubernetesIpv4Subnet()); + } + 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(machineMgmtIpv4Range_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineMgmtIpv4Range_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kubernetesNodeIpv4Range_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kubernetesNodeIpv4Range_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kubernetesControlPlaneIpv4Range_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 3, kubernetesControlPlaneIpv4Range_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getManagementIpv4Subnet()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getKubernetesIpv4Subnet()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig other = + (com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig) obj; + + if (!getMachineMgmtIpv4Range().equals(other.getMachineMgmtIpv4Range())) return false; + if (!getKubernetesNodeIpv4Range().equals(other.getKubernetesNodeIpv4Range())) return false; + if (!getKubernetesControlPlaneIpv4Range().equals(other.getKubernetesControlPlaneIpv4Range())) + return false; + if (hasManagementIpv4Subnet() != other.hasManagementIpv4Subnet()) return false; + if (hasManagementIpv4Subnet()) { + if (!getManagementIpv4Subnet().equals(other.getManagementIpv4Subnet())) return false; + } + if (hasKubernetesIpv4Subnet() != other.hasKubernetesIpv4Subnet()) return false; + if (hasKubernetesIpv4Subnet()) { + if (!getKubernetesIpv4Subnet().equals(other.getKubernetesIpv4Subnet())) return false; + } + if (!getUnknownFields().equals(other.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) + MACHINE_MGMT_IPV4_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getMachineMgmtIpv4Range().hashCode(); + hash = (37 * hash) + KUBERNETES_NODE_IPV4_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getKubernetesNodeIpv4Range().hashCode(); + hash = (37 * hash) + KUBERNETES_CONTROL_PLANE_IPV4_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getKubernetesControlPlaneIpv4Range().hashCode(); + if (hasManagementIpv4Subnet()) { + hash = (37 * hash) + MANAGEMENT_IPV4_SUBNET_FIELD_NUMBER; + hash = (53 * hash) + getManagementIpv4Subnet().hashCode(); + } + if (hasKubernetesIpv4Subnet()) { + hash = (37 * hash) + KUBERNETES_IPV4_SUBNET_FIELD_NUMBER; + hash = (53 * hash) + getKubernetesIpv4Subnet().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig 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.gdchardwaremanagement.v1alpha.ZoneNetworkConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig 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.gdchardwaremanagement.v1alpha.ZoneNetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig 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.gdchardwaremanagement.v1alpha.ZoneNetworkConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.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; + } + /** + * + * + *
+   * Networking configuration for a zone.
+   * 
+ * + * Protobuf type {@code google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig) + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ZoneNetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ZoneNetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.class, + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.Builder.class); + } + + // Construct using com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getManagementIpv4SubnetFieldBuilder(); + getKubernetesIpv4SubnetFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + machineMgmtIpv4Range_ = ""; + kubernetesNodeIpv4Range_ = ""; + kubernetesControlPlaneIpv4Range_ = ""; + managementIpv4Subnet_ = null; + if (managementIpv4SubnetBuilder_ != null) { + managementIpv4SubnetBuilder_.dispose(); + managementIpv4SubnetBuilder_ = null; + } + kubernetesIpv4Subnet_ = null; + if (kubernetesIpv4SubnetBuilder_ != null) { + kubernetesIpv4SubnetBuilder_.dispose(); + kubernetesIpv4SubnetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ResourcesProto + .internal_static_google_cloud_gdchardwaremanagement_v1alpha_ZoneNetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig + getDefaultInstanceForType() { + return com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig build() { + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig buildPartial() { + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig result = + new com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.machineMgmtIpv4Range_ = machineMgmtIpv4Range_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kubernetesNodeIpv4Range_ = kubernetesNodeIpv4Range_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kubernetesControlPlaneIpv4Range_ = kubernetesControlPlaneIpv4Range_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.managementIpv4Subnet_ = + managementIpv4SubnetBuilder_ == null + ? managementIpv4Subnet_ + : managementIpv4SubnetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.kubernetesIpv4Subnet_ = + kubernetesIpv4SubnetBuilder_ == null + ? kubernetesIpv4Subnet_ + : kubernetesIpv4SubnetBuilder_.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.gdchardwaremanagement.v1alpha.ZoneNetworkConfig) { + return mergeFrom((com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig other) { + if (other + == com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig.getDefaultInstance()) + return this; + if (!other.getMachineMgmtIpv4Range().isEmpty()) { + machineMgmtIpv4Range_ = other.machineMgmtIpv4Range_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKubernetesNodeIpv4Range().isEmpty()) { + kubernetesNodeIpv4Range_ = other.kubernetesNodeIpv4Range_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getKubernetesControlPlaneIpv4Range().isEmpty()) { + kubernetesControlPlaneIpv4Range_ = other.kubernetesControlPlaneIpv4Range_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasManagementIpv4Subnet()) { + mergeManagementIpv4Subnet(other.getManagementIpv4Subnet()); + } + if (other.hasKubernetesIpv4Subnet()) { + mergeKubernetesIpv4Subnet(other.getKubernetesIpv4Subnet()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + machineMgmtIpv4Range_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + kubernetesNodeIpv4Range_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + kubernetesControlPlaneIpv4Range_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getManagementIpv4SubnetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getKubernetesIpv4SubnetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object machineMgmtIpv4Range_ = ""; + /** + * + * + *
+     * Required. An IPv4 address block for machine management.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per machine in the Zone.
+     * Should be in `management_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string machine_mgmt_ipv4_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The machineMgmtIpv4Range. + */ + public java.lang.String getMachineMgmtIpv4Range() { + java.lang.Object ref = machineMgmtIpv4Range_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineMgmtIpv4Range_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. An IPv4 address block for machine management.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per machine in the Zone.
+     * Should be in `management_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string machine_mgmt_ipv4_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for machineMgmtIpv4Range. + */ + public com.google.protobuf.ByteString getMachineMgmtIpv4RangeBytes() { + java.lang.Object ref = machineMgmtIpv4Range_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineMgmtIpv4Range_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. An IPv4 address block for machine management.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per machine in the Zone.
+     * Should be in `management_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string machine_mgmt_ipv4_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The machineMgmtIpv4Range to set. + * @return This builder for chaining. + */ + public Builder setMachineMgmtIpv4Range(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineMgmtIpv4Range_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An IPv4 address block for machine management.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per machine in the Zone.
+     * Should be in `management_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string machine_mgmt_ipv4_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearMachineMgmtIpv4Range() { + machineMgmtIpv4Range_ = getDefaultInstance().getMachineMgmtIpv4Range(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An IPv4 address block for machine management.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per machine in the Zone.
+     * Should be in `management_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string machine_mgmt_ipv4_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for machineMgmtIpv4Range to set. + * @return This builder for chaining. + */ + public Builder setMachineMgmtIpv4RangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineMgmtIpv4Range_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object kubernetesNodeIpv4Range_ = ""; + /** + * + * + *
+     * Required. An IPv4 address block for kubernetes nodes.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per machine in the Zone.
+     * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string kubernetes_node_ipv4_range = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The kubernetesNodeIpv4Range. + */ + public java.lang.String getKubernetesNodeIpv4Range() { + java.lang.Object ref = kubernetesNodeIpv4Range_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kubernetesNodeIpv4Range_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. An IPv4 address block for kubernetes nodes.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per machine in the Zone.
+     * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string kubernetes_node_ipv4_range = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for kubernetesNodeIpv4Range. + */ + public com.google.protobuf.ByteString getKubernetesNodeIpv4RangeBytes() { + java.lang.Object ref = kubernetesNodeIpv4Range_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kubernetesNodeIpv4Range_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. An IPv4 address block for kubernetes nodes.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per machine in the Zone.
+     * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string kubernetes_node_ipv4_range = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The kubernetesNodeIpv4Range to set. + * @return This builder for chaining. + */ + public Builder setKubernetesNodeIpv4Range(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kubernetesNodeIpv4Range_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An IPv4 address block for kubernetes nodes.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per machine in the Zone.
+     * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string kubernetes_node_ipv4_range = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearKubernetesNodeIpv4Range() { + kubernetesNodeIpv4Range_ = getDefaultInstance().getKubernetesNodeIpv4Range(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An IPv4 address block for kubernetes nodes.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per machine in the Zone.
+     * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string kubernetes_node_ipv4_range = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for kubernetesNodeIpv4Range to set. + * @return This builder for chaining. + */ + public Builder setKubernetesNodeIpv4RangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kubernetesNodeIpv4Range_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object kubernetesControlPlaneIpv4Range_ = ""; + /** + * + * + *
+     * Required. An IPv4 address block for kubernetes control plane.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per cluster in the Zone.
+     * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string kubernetes_control_plane_ipv4_range = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The kubernetesControlPlaneIpv4Range. + */ + public java.lang.String getKubernetesControlPlaneIpv4Range() { + java.lang.Object ref = kubernetesControlPlaneIpv4Range_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kubernetesControlPlaneIpv4Range_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. An IPv4 address block for kubernetes control plane.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per cluster in the Zone.
+     * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string kubernetes_control_plane_ipv4_range = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for kubernetesControlPlaneIpv4Range. + */ + public com.google.protobuf.ByteString getKubernetesControlPlaneIpv4RangeBytes() { + java.lang.Object ref = kubernetesControlPlaneIpv4Range_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kubernetesControlPlaneIpv4Range_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. An IPv4 address block for kubernetes control plane.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per cluster in the Zone.
+     * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string kubernetes_control_plane_ipv4_range = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The kubernetesControlPlaneIpv4Range to set. + * @return This builder for chaining. + */ + public Builder setKubernetesControlPlaneIpv4Range(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kubernetesControlPlaneIpv4Range_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An IPv4 address block for kubernetes control plane.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per cluster in the Zone.
+     * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string kubernetes_control_plane_ipv4_range = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearKubernetesControlPlaneIpv4Range() { + kubernetesControlPlaneIpv4Range_ = getDefaultInstance().getKubernetesControlPlaneIpv4Range(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An IPv4 address block for kubernetes control plane.
+     * Should be a private RFC1918 or public CIDR block large enough to allocate
+     * at least one address per cluster in the Zone.
+     * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+     * ranges.
+     * 
+ * + * + * string kubernetes_control_plane_ipv4_range = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for kubernetesControlPlaneIpv4Range to set. + * @return This builder for chaining. + */ + public Builder setKubernetesControlPlaneIpv4RangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kubernetesControlPlaneIpv4Range_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.Subnet managementIpv4Subnet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet, + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder> + managementIpv4SubnetBuilder_; + /** + * + * + *
+     * Required. An IPv4 subnet for the management network.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the managementIpv4Subnet field is set. + */ + public boolean hasManagementIpv4Subnet() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Required. An IPv4 subnet for the management network.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The managementIpv4Subnet. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Subnet getManagementIpv4Subnet() { + if (managementIpv4SubnetBuilder_ == null) { + return managementIpv4Subnet_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance() + : managementIpv4Subnet_; + } else { + return managementIpv4SubnetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. An IPv4 subnet for the management network.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setManagementIpv4Subnet( + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet value) { + if (managementIpv4SubnetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + managementIpv4Subnet_ = value; + } else { + managementIpv4SubnetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An IPv4 subnet for the management network.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setManagementIpv4Subnet( + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder builderForValue) { + if (managementIpv4SubnetBuilder_ == null) { + managementIpv4Subnet_ = builderForValue.build(); + } else { + managementIpv4SubnetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An IPv4 subnet for the management network.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeManagementIpv4Subnet( + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet value) { + if (managementIpv4SubnetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && managementIpv4Subnet_ != null + && managementIpv4Subnet_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance()) { + getManagementIpv4SubnetBuilder().mergeFrom(value); + } else { + managementIpv4Subnet_ = value; + } + } else { + managementIpv4SubnetBuilder_.mergeFrom(value); + } + if (managementIpv4Subnet_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. An IPv4 subnet for the management network.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearManagementIpv4Subnet() { + bitField0_ = (bitField0_ & ~0x00000008); + managementIpv4Subnet_ = null; + if (managementIpv4SubnetBuilder_ != null) { + managementIpv4SubnetBuilder_.dispose(); + managementIpv4SubnetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. An IPv4 subnet for the management network.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder + getManagementIpv4SubnetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getManagementIpv4SubnetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. An IPv4 subnet for the management network.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder + getManagementIpv4SubnetOrBuilder() { + if (managementIpv4SubnetBuilder_ != null) { + return managementIpv4SubnetBuilder_.getMessageOrBuilder(); + } else { + return managementIpv4Subnet_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance() + : managementIpv4Subnet_; + } + } + /** + * + * + *
+     * Required. An IPv4 subnet for the management network.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet, + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder> + getManagementIpv4SubnetFieldBuilder() { + if (managementIpv4SubnetBuilder_ == null) { + managementIpv4SubnetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet, + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder>( + getManagementIpv4Subnet(), getParentForChildren(), isClean()); + managementIpv4Subnet_ = null; + } + return managementIpv4SubnetBuilder_; + } + + private com.google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetesIpv4Subnet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet, + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder> + kubernetesIpv4SubnetBuilder_; + /** + * + * + *
+     * Optional. An IPv4 subnet for the kubernetes network.
+     * If unspecified, the kubernetes subnet will be the same as the management
+     * subnet.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the kubernetesIpv4Subnet field is set. + */ + public boolean hasKubernetesIpv4Subnet() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. An IPv4 subnet for the kubernetes network.
+     * If unspecified, the kubernetes subnet will be the same as the management
+     * subnet.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The kubernetesIpv4Subnet. + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Subnet getKubernetesIpv4Subnet() { + if (kubernetesIpv4SubnetBuilder_ == null) { + return kubernetesIpv4Subnet_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance() + : kubernetesIpv4Subnet_; + } else { + return kubernetesIpv4SubnetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. An IPv4 subnet for the kubernetes network.
+     * If unspecified, the kubernetes subnet will be the same as the management
+     * subnet.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKubernetesIpv4Subnet( + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet value) { + if (kubernetesIpv4SubnetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kubernetesIpv4Subnet_ = value; + } else { + kubernetesIpv4SubnetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An IPv4 subnet for the kubernetes network.
+     * If unspecified, the kubernetes subnet will be the same as the management
+     * subnet.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKubernetesIpv4Subnet( + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder builderForValue) { + if (kubernetesIpv4SubnetBuilder_ == null) { + kubernetesIpv4Subnet_ = builderForValue.build(); + } else { + kubernetesIpv4SubnetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An IPv4 subnet for the kubernetes network.
+     * If unspecified, the kubernetes subnet will be the same as the management
+     * subnet.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeKubernetesIpv4Subnet( + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet value) { + if (kubernetesIpv4SubnetBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && kubernetesIpv4Subnet_ != null + && kubernetesIpv4Subnet_ + != com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance()) { + getKubernetesIpv4SubnetBuilder().mergeFrom(value); + } else { + kubernetesIpv4Subnet_ = value; + } + } else { + kubernetesIpv4SubnetBuilder_.mergeFrom(value); + } + if (kubernetesIpv4Subnet_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. An IPv4 subnet for the kubernetes network.
+     * If unspecified, the kubernetes subnet will be the same as the management
+     * subnet.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearKubernetesIpv4Subnet() { + bitField0_ = (bitField0_ & ~0x00000010); + kubernetesIpv4Subnet_ = null; + if (kubernetesIpv4SubnetBuilder_ != null) { + kubernetesIpv4SubnetBuilder_.dispose(); + kubernetesIpv4SubnetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An IPv4 subnet for the kubernetes network.
+     * If unspecified, the kubernetes subnet will be the same as the management
+     * subnet.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder + getKubernetesIpv4SubnetBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getKubernetesIpv4SubnetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. An IPv4 subnet for the kubernetes network.
+     * If unspecified, the kubernetes subnet will be the same as the management
+     * subnet.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder + getKubernetesIpv4SubnetOrBuilder() { + if (kubernetesIpv4SubnetBuilder_ != null) { + return kubernetesIpv4SubnetBuilder_.getMessageOrBuilder(); + } else { + return kubernetesIpv4Subnet_ == null + ? com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.getDefaultInstance() + : kubernetesIpv4Subnet_; + } + } + /** + * + * + *
+     * Optional. An IPv4 subnet for the kubernetes network.
+     * If unspecified, the kubernetes subnet will be the same as the management
+     * subnet.
+     * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet, + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder> + getKubernetesIpv4SubnetFieldBuilder() { + if (kubernetesIpv4SubnetBuilder_ == null) { + kubernetesIpv4SubnetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet, + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet.Builder, + com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder>( + getKubernetesIpv4Subnet(), getParentForChildren(), isClean()); + kubernetesIpv4Subnet_ = null; + } + return kubernetesIpv4SubnetBuilder_; + } + + @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.gdchardwaremanagement.v1alpha.ZoneNetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig) + private static final com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig(); + } + + public static com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ZoneNetworkConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneNetworkConfigOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneNetworkConfigOrBuilder.java new file mode 100644 index 000000000000..788916f4d7f8 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneNetworkConfigOrBuilder.java @@ -0,0 +1,225 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ZoneNetworkConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. An IPv4 address block for machine management.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per machine in the Zone.
+   * Should be in `management_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string machine_mgmt_ipv4_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The machineMgmtIpv4Range. + */ + java.lang.String getMachineMgmtIpv4Range(); + /** + * + * + *
+   * Required. An IPv4 address block for machine management.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per machine in the Zone.
+   * Should be in `management_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string machine_mgmt_ipv4_range = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for machineMgmtIpv4Range. + */ + com.google.protobuf.ByteString getMachineMgmtIpv4RangeBytes(); + + /** + * + * + *
+   * Required. An IPv4 address block for kubernetes nodes.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per machine in the Zone.
+   * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string kubernetes_node_ipv4_range = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The kubernetesNodeIpv4Range. + */ + java.lang.String getKubernetesNodeIpv4Range(); + /** + * + * + *
+   * Required. An IPv4 address block for kubernetes nodes.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per machine in the Zone.
+   * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string kubernetes_node_ipv4_range = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for kubernetesNodeIpv4Range. + */ + com.google.protobuf.ByteString getKubernetesNodeIpv4RangeBytes(); + + /** + * + * + *
+   * Required. An IPv4 address block for kubernetes control plane.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per cluster in the Zone.
+   * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string kubernetes_control_plane_ipv4_range = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The kubernetesControlPlaneIpv4Range. + */ + java.lang.String getKubernetesControlPlaneIpv4Range(); + /** + * + * + *
+   * Required. An IPv4 address block for kubernetes control plane.
+   * Should be a private RFC1918 or public CIDR block large enough to allocate
+   * at least one address per cluster in the Zone.
+   * Should be in `kubernetes_ipv4_subnet`, and disjoint with other address
+   * ranges.
+   * 
+ * + * + * string kubernetes_control_plane_ipv4_range = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { ... } + * + * + * @return The bytes for kubernetesControlPlaneIpv4Range. + */ + com.google.protobuf.ByteString getKubernetesControlPlaneIpv4RangeBytes(); + + /** + * + * + *
+   * Required. An IPv4 subnet for the management network.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the managementIpv4Subnet field is set. + */ + boolean hasManagementIpv4Subnet(); + /** + * + * + *
+   * Required. An IPv4 subnet for the management network.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The managementIpv4Subnet. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet getManagementIpv4Subnet(); + /** + * + * + *
+   * Required. An IPv4 subnet for the management network.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet management_ipv4_subnet = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder getManagementIpv4SubnetOrBuilder(); + + /** + * + * + *
+   * Optional. An IPv4 subnet for the kubernetes network.
+   * If unspecified, the kubernetes subnet will be the same as the management
+   * subnet.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the kubernetesIpv4Subnet field is set. + */ + boolean hasKubernetesIpv4Subnet(); + /** + * + * + *
+   * Optional. An IPv4 subnet for the kubernetes network.
+   * If unspecified, the kubernetes subnet will be the same as the management
+   * subnet.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The kubernetesIpv4Subnet. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Subnet getKubernetesIpv4Subnet(); + /** + * + * + *
+   * Optional. An IPv4 subnet for the kubernetes network.
+   * If unspecified, the kubernetes subnet will be the same as the management
+   * subnet.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Subnet kubernetes_ipv4_subnet = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.SubnetOrBuilder getKubernetesIpv4SubnetOrBuilder(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneOrBuilder.java b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneOrBuilder.java new file mode 100644 index 000000000000..b0ddf2fd5e49 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/java/com/google/cloud/gdchardwaremanagement/v1alpha/ZoneOrBuilder.java @@ -0,0 +1,407 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.gdchardwaremanagement.v1alpha; + +public interface ZoneOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.gdchardwaremanagement.v1alpha.Zone) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of this zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. Name of this zone.
+   * Format: `projects/{project}/locations/{location}/zones/{zone}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when this zone was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when this zone was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when this zone was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when this zone was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when this zone was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when this zone was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels associated with this zone as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels associated with this zone as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this zone as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels associated with this zone as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * 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 associated with this zone as key value pairs.
+   * For more information about labels, see [Create and manage
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Human friendly display name of this zone.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. Human friendly display name of this zone.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. Current state for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current state for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.Zone.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Zone.State getState(); + + /** + * + * + *
+   * Required. The points of contact.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getContactsList(); + /** + * + * + *
+   * Required. The points of contact.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.Contact getContacts(int index); + /** + * + * + *
+   * Required. The points of contact.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getContactsCount(); + /** + * + * + *
+   * Required. The points of contact.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getContactsOrBuilderList(); + /** + * + * + *
+   * Required. The points of contact.
+   * 
+ * + * + * repeated .google.cloud.gdchardwaremanagement.v1alpha.Contact contacts = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.ContactOrBuilder getContactsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+   * zone.
+   * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ciqUri. + */ + java.lang.String getCiqUri(); + /** + * + * + *
+   * Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this
+   * zone.
+   * 
+ * + * string ciq_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ciqUri. + */ + com.google.protobuf.ByteString getCiqUriBytes(); + + /** + * + * + *
+   * Optional. Networking configuration for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + /** + * + * + *
+   * Optional. Networking configuration for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkConfig. + */ + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig getNetworkConfig(); + /** + * + * + *
+   * Optional. Networking configuration for this zone.
+   * 
+ * + * + * .google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig network_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfigOrBuilder + getNetworkConfigOrBuilder(); + + /** + * + * + *
+   * Output only. Globally unique identifier generated for this Edge Zone.
+   * 
+ * + * string globally_unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The globallyUniqueId. + */ + java.lang.String getGloballyUniqueId(); + /** + * + * + *
+   * Output only. Globally unique identifier generated for this Edge Zone.
+   * 
+ * + * string globally_unique_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for globallyUniqueId. + */ + com.google.protobuf.ByteString getGloballyUniqueIdBytes(); +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/proto/google/cloud/gdchardwaremanagement/v1alpha/resources.proto b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/proto/google/cloud/gdchardwaremanagement/v1alpha/resources.proto new file mode 100644 index 000000000000..86ff44fea196 --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/proto/google/cloud/gdchardwaremanagement/v1alpha/resources.proto @@ -0,0 +1,944 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gdchardwaremanagement.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; +import "google/type/datetime.proto"; +import "google/type/dayofweek.proto"; +import "google/type/postal_address.proto"; +import "google/type/timeofday.proto"; + +option csharp_namespace = "Google.Cloud.GdcHardwareManagement.V1Alpha"; +option go_package = "cloud.google.com/go/gdchardwaremanagement/apiv1alpha/gdchardwaremanagementpb;gdchardwaremanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.cloud.gdchardwaremanagement.v1alpha"; +option php_namespace = "Google\\Cloud\\GdcHardwareManagement\\V1alpha"; +option ruby_package = "Google::Cloud::GDCHardwareManagement::V1alpha"; + +// The power supply options. +enum PowerSupply { + // Power supply is unspecified. + POWER_SUPPLY_UNSPECIFIED = 0; + + // AC power supply. + POWER_SUPPLY_AC = 1; + + // DC power supply. + POWER_SUPPLY_DC = 2; +} + +// An order for GDC hardware. +message Order { + option (google.api.resource) = { + type: "gdchardwaremanagement.googleapis.com/Order" + pattern: "projects/{project}/locations/{location}/orders/{order}" + plural: "orders" + singular: "order" + }; + + // Valid states of an order. + enum State { + // State of the order is unspecified. + STATE_UNSPECIFIED = 0; + + // Order is being drafted by the customer and has not been submitted yet. + DRAFT = 1; + + // Order has been submitted to Google. + SUBMITTED = 2; + + // Order has been accepted by Google. + ACCEPTED = 3; + + // Order needs more information from the customer. + ADDITIONAL_INFO_NEEDED = 4; + + // Google has initiated building hardware for the order. + BUILDING = 5; + + // The hardware has been built and is being shipped. + SHIPPING = 6; + + // The hardware is being installed. + INSTALLING = 7; + + // An error occurred in processing the order and customer intervention is + // required. + FAILED = 8; + + // Order has been partially completed i.e., some hardware have been + // delivered and installed. + PARTIALLY_COMPLETED = 9; + + // Order has been completed. + COMPLETED = 10; + + // Order has been cancelled. + CANCELLED = 11; + } + + // Valid types of an Order. + enum Type { + // Type of the order is unspecified. + TYPE_UNSPECIFIED = 0; + + // Paid by the customer. + PAID = 1; + + // Proof of concept for the customer. + POC = 2; + } + + // Identifier. Name of this order. + // Format: `projects/{project}/locations/{location}/orders/{order}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Display name of this order. + string display_name = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Time when this order was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this order was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels associated with this order as key value pairs. + // For more information about labels, see [Create and manage + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. State of this order. On order creation, state will be set to + // DRAFT. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Customer contact information. + OrganizationContact organization_contact = 6 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Customer specified workloads of interest targeted by this order. + // This must contain <= 20 elements and the length of each element must be <= + // 50 characters. + repeated string target_workloads = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Information about the customer's motivation for this order. The + // length of this field must be <= 1000 characters. + string customer_motivation = 8 [(google.api.field_behavior) = REQUIRED]; + + // Required. Customer specified deadline by when this order should be + // fulfilled. + google.protobuf.Timestamp fulfillment_time = 9 + [(google.api.field_behavior) = REQUIRED]; + + // Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this + // order will be deployed. For a list of valid CLDR region codes, see the + // [Language Subtag + // Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). + string region_code = 10 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Link to the order form. + string order_form_uri = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of this Order. + Type type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the order was submitted. Is auto-populated to the + // current time when an order is submitted. + google.protobuf.Timestamp submit_time = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The Google Cloud Billing ID to be charged for this order. + string billing_id = 15 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Existing hardware to be removed as part of this order. + // Note: any hardware removed will be recycled unless otherwise agreed. + repeated HardwareLocation existing_hardware = 16 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A physical site where hardware will be installed. +message Site { + option (google.api.resource) = { + type: "gdchardwaremanagement.googleapis.com/Site" + pattern: "projects/{project}/locations/{location}/sites/{site}" + plural: "sites" + singular: "site" + }; + + // Identifier. Name of the site. + // Format: `projects/{project}/locations/{location}/sites/{site}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Display name of this Site. + string display_name = 24 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of this Site. + string description = 25 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Time when this site was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this site was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels associated with this site as key value pairs. + // For more information about labels, see [Create and manage + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Contact information for this site. + OrganizationContact organization_contact = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A URL to the Google Maps address location of the site. + // An example value is `https://goo.gl/maps/xxxxxxxxx`. + string google_maps_pin_uri = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The time periods when the site is accessible. + // If this field is empty, the site is accessible at all times. + repeated TimePeriod access_times = 26 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Any additional notes for this Site. Please include information + // about: + // - security or access restrictions + // - any regulations affecting the technicians visiting the site + // - any special process or approval required to move the equipment + // - whether a representative will be available during site visits + string notes = 27 [(google.api.field_behavior) = OPTIONAL]; +} + +// A group of hardware that is part of the same order, has the same SKU, and is +// delivered to the same site. +message HardwareGroup { + option (google.api.resource) = { + type: "gdchardwaremanagement.googleapis.com/HardwareGroup" + pattern: "projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}" + plural: "hardwareGroups" + singular: "hardwareGroup" + }; + + // Valid states of a HardwareGroup. + enum State { + // State of the HardwareGroup is unspecified. + STATE_UNSPECIFIED = 0; + + // More information is required from the customer to make progress. + ADDITIONAL_INFO_NEEDED = 1; + + // Google has initiated building hardware for this HardwareGroup. + BUILDING = 2; + + // The hardware has been built and is being shipped. + SHIPPING = 3; + + // The hardware is being installed. + INSTALLING = 4; + + // Some hardware in the HardwareGroup have been installed. + PARTIALLY_INSTALLED = 5; + + // All hardware in the HardwareGroup have been installed. + INSTALLED = 6; + + // An error occurred and customer intervention is required. + FAILED = 7; + } + + // Identifier. Name of this hardware group. + // Format: + // `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Time when this hardware group was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this hardware group was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels associated with this hardware group as key value pairs. + // For more information about labels, see [Create and manage + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Number of hardware in this HardwareGroup. + int32 hardware_count = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Configuration for hardware in this HardwareGroup. + HardwareConfig config = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the site where the hardware in this HardwareGroup will be + // delivered. + // Format: `projects/{project}/locations/{location}/sites/{site}` + string site = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Site" + } + ]; + + // Output only. Current state of this HardwareGroup. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Name of the zone that the hardware in this HardwareGroup belongs + // to. Format: `projects/{project}/locations/{location}/zones/{zone}` + string zone = 9 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Zone" + } + ]; + + // Optional. Requested installation date for the hardware in this + // HardwareGroup. Filled in by the customer. + google.type.Date requested_installation_date = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An instance of hardware installed at a site. +message Hardware { + option (google.api.resource) = { + type: "gdchardwaremanagement.googleapis.com/Hardware" + pattern: "projects/{project}/locations/{location}/hardware/{hardware}" + plural: "hardware" + singular: "hardware" + }; + + // Valid states for hardware. + enum State { + // State of the Hardware is unspecified. + STATE_UNSPECIFIED = 0; + + // More information is required from the customer to make progress. + ADDITIONAL_INFO_NEEDED = 1; + + // Google has initiated building hardware for this Hardware. + BUILDING = 2; + + // The hardware has been built and is being shipped. + SHIPPING = 3; + + // The hardware is being installed. + INSTALLING = 4; + + // The hardware has been installed. + INSTALLED = 5; + + // An error occurred and customer intervention is required. + FAILED = 6; + } + + // Identifier. Name of this hardware. + // Format: `projects/{project}/locations/{location}/hardware/{hardware}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Display name for this hardware. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Time when this hardware was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this hardware was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels associated with this hardware as key value pairs. + // For more information about labels, see [Create and manage + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Name of the order that this hardware belongs to. + // Format: `projects/{project}/locations/{location}/orders/{order}` + string order = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Order" + } + ]; + + // Output only. Name for the hardware group that this hardware belongs to. + // Format: + // `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + string hardware_group = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/HardwareGroup" + } + ]; + + // Required. Name for the site that this hardware belongs to. + // Format: `projects/{project}/locations/{location}/sites/{site}` + string site = 8 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Site" + } + ]; + + // Output only. Current state for this hardware. + State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this + // Hardware. + string ciq_uri = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Configuration for this hardware. + HardwareConfig config = 11 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Estimated installation date for this hardware. + google.type.Date estimated_installation_date = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Physical properties of this hardware. + HardwarePhysicalInfo physical_info = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information for installation of this hardware. + HardwareInstallationInfo installation_info = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Name for the zone that this hardware belongs to. + // Format: `projects/{project}/locations/{location}/zones/{zone}` + string zone = 15 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Zone" + } + ]; + + // Optional. Requested installation date for this hardware. This is + // auto-populated when the order is accepted, if the hardware's HardwareGroup + // specifies this. It can also be filled in by the customer. + google.type.Date requested_installation_date = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Actual installation date for this hardware. Filled in by + // Google. + google.type.Date actual_installation_date = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A comment on an order. +message Comment { + option (google.api.resource) = { + type: "gdchardwaremanagement.googleapis.com/Comment" + pattern: "projects/{project}/locations/{location}/orders/{order}/comments/{comment}" + plural: "comments" + singular: "comment" + }; + + // Identifier. Name of this comment. + // Format: + // `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Time when this comment was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels associated with this comment as key value pairs. + // For more information about labels, see [Create and manage + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Username of the author of this comment. This is auto-populated + // from the credentials used during creation of the comment. + string author = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Text of this comment. The length of text must be <= 1000 + // characters. + string text = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// A log entry of a change made to an order. +message ChangeLogEntry { + option (google.api.resource) = { + type: "gdchardwaremanagement.googleapis.com/ChangeLogEntry" + pattern: "projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}" + plural: "changeLogEntries" + singular: "changeLogEntry" + }; + + // Identifier. Name of this change log entry. + // Format: + // `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Time when this change log entry was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels associated with this change log entry as key value pairs. + // For more information about labels, see [Create and manage + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Content of this log entry. + string log = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A stock keeping unit (SKU) of GDC hardware. +message Sku { + option (google.api.resource) = { + type: "gdchardwaremanagement.googleapis.com/Sku" + pattern: "projects/{project}/locations/{location}/skus/{sku}" + plural: "skus" + singular: "sku" + }; + + // Valid types of a SKU. + enum Type { + // Type of the SKU is unspecified. This is not an allowed value. + TYPE_UNSPECIFIED = 0; + + // Rack SKU. + RACK = 1; + + // Server SKU. + SERVER = 2; + } + + // Identifier. Name of this SKU. + // Format: `projects/{project}/locations/{location}/skus/{sku}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Display name of this SKU. + string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this SKU was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this SKU was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Configuration for this SKU. + SkuConfig config = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Available instances of this SKU. This field should be used for + // checking availability of a SKU. + repeated SkuInstance instances = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of this SKU. + string description = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The SKU revision ID. + // A new revision is created whenever `config` is updated. The format is an + // 8-character hexadecimal string. + string revision_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Flag to indicate whether or not this revision is active. Only + // an active revision can be used in a new Order. + bool is_active = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of this SKU. + Type type = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The vCPU count associated with this SKU. + int32 vcpu_count = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A zone holding a set of hardware. +message Zone { + option (google.api.resource) = { + type: "gdchardwaremanagement.googleapis.com/Zone" + pattern: "projects/{project}/locations/{location}/zones/{zone}" + plural: "zones" + singular: "zone" + }; + + // Valid states for a zone. + enum State { + // State of the Zone is unspecified. + STATE_UNSPECIFIED = 0; + + // More information is required from the customer to make progress. + ADDITIONAL_INFO_NEEDED = 1; + + // Google is preparing the Zone. + PREPARING = 2; + + // Factory turnup has succeeded. + READY_FOR_CUSTOMER_FACTORY_TURNUP_CHECKS = 5; + + // The Zone is ready for site turnup. + READY_FOR_SITE_TURNUP = 6; + + // The Zone failed in factory turnup checks. + CUSTOMER_FACTORY_TURNUP_CHECKS_FAILED = 7; + + // The Zone is available to use. + ACTIVE = 3; + + // The Zone has been cancelled. + CANCELLED = 4; + } + + // Identifier. Name of this zone. + // Format: `projects/{project}/locations/{location}/zones/{zone}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Time when this zone was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this zone was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels associated with this zone as key value pairs. + // For more information about labels, see [Create and manage + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Human friendly display name of this zone. + string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Current state for this zone. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The points of contact. + repeated Contact contacts = 9 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this + // zone. + string ciq_uri = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Networking configuration for this zone. + ZoneNetworkConfig network_config = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Globally unique identifier generated for this Edge Zone. + string globally_unique_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contact information of the customer organization. +message OrganizationContact { + // Required. The organization's address. + google.type.PostalAddress address = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The organization's email. + string email = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The organization's phone number. + string phone = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The individual points of contact in the organization at this + // location. + repeated Contact contacts = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Contact details of a point of contact. +message Contact { + // Required. Given name of the contact. + string given_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Family name of the contact. + string family_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Email of the contact. + string email = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Phone number of the contact. + string phone = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Time zone of the contact. + google.type.TimeZone time_zone = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The time periods when the contact is reachable. + // If this field is empty, the contact is reachable at all times. + repeated TimePeriod reachable_times = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for GDC hardware. +message HardwareConfig { + // Required. Reference to the SKU for this hardware. This can point to a + // specific SKU revision in the form of `resource_name@revision_id` as defined + // in [AIP-162](https://google.aip.dev/162). If no revision_id is specified, + // it refers to the latest revision. + string sku = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Sku" + } + ]; + + // Required. Power supply type for this hardware. + PowerSupply power_supply = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Subscription duration for the hardware in months. + int32 subscription_duration_months = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for a SKU. +message SkuConfig { + // Information about CPU configuration. + string cpu = 1; + + // Information about GPU configuration. + string gpu = 2; + + // Information about RAM configuration. + string ram = 3; + + // Information about storage configuration. + string storage = 4; +} + +// A specific instance of the SKU. +message SkuInstance { + // The [Unicode CLDR](https://cldr.unicode.org) region code where this + // instance is available. + string region_code = 1; + + // Power supply type for this instance. + PowerSupply power_supply = 2; + + // Reference to the corresponding SKU in the Cloud Billing API. + // The estimated price information can be retrieved using that API. + // Format: `services/{service}/skus/{sku}` + string billing_sku = 3; + + // Reference to the corresponding SKU per vCPU in the Cloud Billing API. + // The estimated price information can be retrieved using that API. + // Format: `services/{service}/skus/{sku}` + string billing_sku_per_vcpu = 4; + + // Subscription duration for the hardware in months. + int32 subscription_duration_months = 5; +} + +// Physical properties of a hardware. +message HardwarePhysicalInfo { + // Valid power receptacle types. + enum PowerReceptacleType { + // Facility plug type is unspecified. + POWER_RECEPTACLE_TYPE_UNSPECIFIED = 0; + + // NEMA 5-15. + NEMA_5_15 = 1; + + // C13. + C_13 = 2; + + // Standard european receptacle. + STANDARD_EU = 3; + } + + // Valid network uplink types. + enum NetworkUplinkType { + // Network uplink type is unspecified. + NETWORK_UPLINK_TYPE_UNSPECIFIED = 0; + + // RJ-45. + RJ_45 = 1; + } + + // Valid voltage values. + enum Voltage { + // Voltage is unspecified. + VOLTAGE_UNSPECIFIED = 0; + + // 120V. + VOLTAGE_110 = 1; + + // 220V. + VOLTAGE_220 = 3; + } + + // Valid amperes values. + enum Amperes { + // Amperes is unspecified. + AMPERES_UNSPECIFIED = 0; + + // 15A. + AMPERES_15 = 1; + } + + // Required. The power receptacle type. + PowerReceptacleType power_receptacle = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Type of the uplink network connection. + NetworkUplinkType network_uplink = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Voltage of the power supply. + Voltage voltage = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Amperes of the power supply. + Amperes amperes = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Information for installation of a Hardware. +message HardwareInstallationInfo { + // Valid rack types. + enum RackType { + // Rack type is unspecified. + RACK_TYPE_UNSPECIFIED = 0; + + // Two post rack. + TWO_POST = 1; + + // Four post rack. + FOUR_POST = 2; + } + + // Optional. Location of the rack in the site e.g. Floor 2, Room 201, Row 7, + // Rack 3. + string rack_location = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Distance from the power outlet in meters. + int32 power_distance_meters = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Distance from the network switch in meters. + int32 switch_distance_meters = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Dimensions of the rack unit. + Dimensions rack_unit_dimensions = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Rack space allocated for the hardware. + RackSpace rack_space = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Type of the rack. + RackType rack_type = 6 [(google.api.field_behavior) = REQUIRED]; +} + +// Networking configuration for a zone. +message ZoneNetworkConfig { + // Required. An IPv4 address block for machine management. + // Should be a private RFC1918 or public CIDR block large enough to allocate + // at least one address per machine in the Zone. + // Should be in `management_ipv4_subnet`, and disjoint with other address + // ranges. + string machine_mgmt_ipv4_range = 1 [ + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. An IPv4 address block for kubernetes nodes. + // Should be a private RFC1918 or public CIDR block large enough to allocate + // at least one address per machine in the Zone. + // Should be in `kubernetes_ipv4_subnet`, and disjoint with other address + // ranges. + string kubernetes_node_ipv4_range = 2 [ + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. An IPv4 address block for kubernetes control plane. + // Should be a private RFC1918 or public CIDR block large enough to allocate + // at least one address per cluster in the Zone. + // Should be in `kubernetes_ipv4_subnet`, and disjoint with other address + // ranges. + string kubernetes_control_plane_ipv4_range = 3 [ + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. An IPv4 subnet for the management network. + Subnet management_ipv4_subnet = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An IPv4 subnet for the kubernetes network. + // If unspecified, the kubernetes subnet will be the same as the management + // subnet. + Subnet kubernetes_ipv4_subnet = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents a subnet. +message Subnet { + // Required. Address range for this subnet in CIDR notation. + string address_range = 1 [ + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Default gateway for this subnet. + string default_gateway_ip_address = 2 [ + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = REQUIRED + ]; +} + +// Represents a time period in a week. +message TimePeriod { + // Required. The start of the time period. + google.type.TimeOfDay start_time = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The end of the time period. + google.type.TimeOfDay end_time = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The days of the week that the time period is active. + repeated google.type.DayOfWeek days = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the dimensions of an object. +message Dimensions { + // Required. Width in inches. + float width_inches = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Height in inches. + float height_inches = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Depth in inches. + float depth_inches = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents contiguous space in a rack. +message RackSpace { + // Required. First rack unit of the rack space (inclusive). + int32 start_rack_unit = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Last rack unit of the rack space (inclusive). + int32 end_rack_unit = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the location of one or many hardware. +message HardwareLocation { + // Required. Name of the site where the hardware are present. + // Format: `projects/{project}/locations/{location}/sites/{site}` + string site = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Site" + } + ]; + + // Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7, + // Rack 3. + string rack_location = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Spaces occupied by the hardware in the rack. + // If unset, this location is assumed to be the entire rack. + repeated RackSpace rack_space = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/proto/google/cloud/gdchardwaremanagement/v1alpha/service.proto b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/proto/google/cloud/gdchardwaremanagement/v1alpha/service.proto new file mode 100644 index 000000000000..572436ccf97a --- /dev/null +++ b/java-gdchardwaremanagement/proto-google-cloud-gdchardwaremanagement-v1alpha/src/main/proto/google/cloud/gdchardwaremanagement/v1alpha/service.proto @@ -0,0 +1,1212 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gdchardwaremanagement.v1alpha; + +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/gdchardwaremanagement/v1alpha/resources.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.GdcHardwareManagement.V1Alpha"; +option go_package = "cloud.google.com/go/gdchardwaremanagement/apiv1alpha/gdchardwaremanagementpb;gdchardwaremanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.gdchardwaremanagement.v1alpha"; +option php_namespace = "Google\\Cloud\\GdcHardwareManagement\\V1alpha"; +option ruby_package = "Google::Cloud::GDCHardwareManagement::V1alpha"; + +// The GDC Hardware Management service. +service GDCHardwareManagement { + option (google.api.default_host) = "gdchardwaremanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists orders in a given project and location. + rpc ListOrders(ListOrdersRequest) returns (ListOrdersResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/orders" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of an order. + rpc GetOrder(GetOrderRequest) returns (Order) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/orders/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new order in a given project and location. + rpc CreateOrder(CreateOrderRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/orders" + body: "order" + }; + option (google.api.method_signature) = "parent,order,order_id"; + option (google.longrunning.operation_info) = { + response_type: "Order" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of an order. + rpc UpdateOrder(UpdateOrderRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{order.name=projects/*/locations/*/orders/*}" + body: "order" + }; + option (google.api.method_signature) = "order,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Order" + metadata_type: "OperationMetadata" + }; + } + + // Deletes an order. + rpc DeleteOrder(DeleteOrderRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/orders/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Submits an order. + rpc SubmitOrder(SubmitOrderRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{name=projects/*/locations/*/orders/*}:submit" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Order" + metadata_type: "OperationMetadata" + }; + } + + // Lists sites in a given project and location. + rpc ListSites(ListSitesRequest) returns (ListSitesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/sites" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a site. + rpc GetSite(GetSiteRequest) returns (Site) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/sites/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new site in a given project and location. + rpc CreateSite(CreateSiteRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/sites" + body: "site" + }; + option (google.api.method_signature) = "parent,site,site_id"; + option (google.longrunning.operation_info) = { + response_type: "Site" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a site. + rpc UpdateSite(UpdateSiteRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{site.name=projects/*/locations/*/sites/*}" + body: "site" + }; + option (google.api.method_signature) = "site,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Site" + metadata_type: "OperationMetadata" + }; + } + + // Lists hardware groups in a given order. + rpc ListHardwareGroups(ListHardwareGroupsRequest) + returns (ListHardwareGroupsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/orders/*}/hardwareGroups" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a hardware group. + rpc GetHardwareGroup(GetHardwareGroupRequest) returns (HardwareGroup) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/orders/*/hardwareGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new hardware group in a given order. + rpc CreateHardwareGroup(CreateHardwareGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/orders/*}/hardwareGroups" + body: "hardware_group" + }; + option (google.api.method_signature) = + "parent,hardware_group,hardware_group_id"; + option (google.longrunning.operation_info) = { + response_type: "HardwareGroup" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a hardware group. + rpc UpdateHardwareGroup(UpdateHardwareGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{hardware_group.name=projects/*/locations/*/orders/*/hardwareGroups/*}" + body: "hardware_group" + }; + option (google.api.method_signature) = "hardware_group,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "HardwareGroup" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a hardware group. + rpc DeleteHardwareGroup(DeleteHardwareGroupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/orders/*/hardwareGroups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists hardware in a given project and location. + rpc ListHardware(ListHardwareRequest) returns (ListHardwareResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/hardware" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets hardware details. + rpc GetHardware(GetHardwareRequest) returns (Hardware) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/hardware/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates new hardware in a given project and location. + rpc CreateHardware(CreateHardwareRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/hardware" + body: "hardware" + }; + option (google.api.method_signature) = "parent,hardware,hardware_id"; + option (google.longrunning.operation_info) = { + response_type: "Hardware" + metadata_type: "OperationMetadata" + }; + } + + // Updates hardware parameters. + rpc UpdateHardware(UpdateHardwareRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{hardware.name=projects/*/locations/*/hardware/*}" + body: "hardware" + }; + option (google.api.method_signature) = "hardware,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Hardware" + metadata_type: "OperationMetadata" + }; + } + + // Deletes hardware. + rpc DeleteHardware(DeleteHardwareRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/hardware/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists the comments on an order. + rpc ListComments(ListCommentsRequest) returns (ListCommentsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/orders/*}/comments" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the content of a comment. + rpc GetComment(GetCommentRequest) returns (Comment) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/orders/*/comments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new comment on an order. + rpc CreateComment(CreateCommentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*/orders/*}/comments" + body: "comment" + }; + option (google.api.method_signature) = "parent,comment,comment_id"; + option (google.longrunning.operation_info) = { + response_type: "Comment" + metadata_type: "OperationMetadata" + }; + } + + // Lists the changes made to an order. + rpc ListChangeLogEntries(ListChangeLogEntriesRequest) + returns (ListChangeLogEntriesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/orders/*}/changeLogEntries" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a change to an order. + rpc GetChangeLogEntry(GetChangeLogEntryRequest) returns (ChangeLogEntry) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/orders/*/changeLogEntries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists SKUs for a given project and location. + rpc ListSkus(ListSkusRequest) returns (ListSkusResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/skus" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of an SKU. + rpc GetSku(GetSkuRequest) returns (Sku) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/skus/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists zones in a given project and location. + rpc ListZones(ListZonesRequest) returns (ListZonesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/zones" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a zone. + rpc GetZone(GetZoneRequest) returns (Zone) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/zones/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new zone in a given project and location. + rpc CreateZone(CreateZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/zones" + body: "zone" + }; + option (google.api.method_signature) = "parent,zone,zone_id"; + option (google.longrunning.operation_info) = { + response_type: "Zone" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a zone. + rpc UpdateZone(UpdateZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{zone.name=projects/*/locations/*/zones/*}" + body: "zone" + }; + option (google.api.method_signature) = "zone,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Zone" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a zone. + rpc DeleteZone(DeleteZoneRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/zones/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Signals the state of a zone. + rpc SignalZoneState(SignalZoneStateRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{name=projects/*/locations/*/zones/*}:signal" + body: "*" + }; + option (google.api.method_signature) = "name,state_signal"; + option (google.longrunning.operation_info) = { + response_type: "Zone" + metadata_type: "OperationMetadata" + }; + } +} + +// A request to list orders. +message ListOrdersRequest { + // Required. The project and location to list orders in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Order" + } + ]; + + // 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 condition. See [AIP-160](https://google.aip.dev/160). + 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]; +} + +// A list of orders. +message ListOrdersResponse { + // The list of orders. + repeated Order orders = 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; +} + +// A request to get an order. +message GetOrderRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Order" + } + ]; +} + +// A request to create an order. +message CreateOrderRequest { + // Required. The project and location to create the order in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Order" + } + ]; + + // Optional. ID used to uniquely identify the Order within its parent scope. + // This field should contain at most 63 characters and must start with + // lowercase characters. + // Only lowercase characters, numbers and `-` are accepted. + // The `-` character cannot be the first or the last one. + // A system generated ID will be used if the field is not set. + // + // The order.name field in the request will be ignored. + string order_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The order to create. + Order order = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to update an order. +message UpdateOrderRequest { + // Required. A mask to specify the fields in the Order to overwrite with this + // update. The fields specified in the update_mask are relative to the order, + // not the full request. A field will be overwritten if it is in the mask. If + // you don't provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The order to update. + Order order = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete an order. +message DeleteOrderRequest { + // Required. The name of the order. + // Format: `projects/{project}/locations/{location}/orders/{order}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Order" + } + ]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An option to delete any nested resources in the Order, such as a + // HardwareGroup. If true, any nested resources for this Order will also be + // deleted. Otherwise, the request will only succeed if the Order has no + // nested resources. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to submit an order. +message SubmitOrderRequest { + // Required. The name of the order. + // Format: `projects/{project}/locations/{location}/orders/{order}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Order" + } + ]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to list sites. +message ListSitesRequest { + // Required. The project and location to list sites in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Site" + } + ]; + + // 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 condition. See [AIP-160](https://google.aip.dev/160). + 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]; +} + +// A list of sites. +message ListSitesResponse { + // The list of sites. + repeated Site sites = 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; +} + +// A request to get a site. +message GetSiteRequest { + // Required. The name of the site. + // Format: `projects/{project}/locations/{location}/sites/{site}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Site" + } + ]; +} + +// A request to create a site. +message CreateSiteRequest { + // Required. The project and location to create the site in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Site" + } + ]; + + // Optional. ID used to uniquely identify the Site within its parent scope. + // This field should contain at most 63 characters and must start with + // lowercase characters. + // Only lowercase characters, numbers and `-` are accepted. + // The `-` character cannot be the first or the last one. + // A system generated ID will be used if the field is not set. + // + // The site.name field in the request will be ignored. + string site_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The site to create. + Site site = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to update a site. +message UpdateSiteRequest { + // Required. A mask to specify the fields in the Site to overwrite with this + // update. The fields specified in the update_mask are relative to the site, + // not the full request. A field will be overwritten if it is in the mask. If + // you don't provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The site to update. + Site site = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to list hardware groups. +message ListHardwareGroupsRequest { + // Required. The order to list hardware groups in. + // Format: `projects/{project}/locations/{location}/orders/{order}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/HardwareGroup" + } + ]; + + // 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 condition. See [AIP-160](https://google.aip.dev/160). + 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]; +} + +// A list of hardware groups. +message ListHardwareGroupsResponse { + // The list of hardware groups. + repeated HardwareGroup hardware_groups = 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; +} + +// A request to get a hardware group. +message GetHardwareGroupRequest { + // Required. The name of the hardware group. + // Format: + // `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/HardwareGroup" + } + ]; +} + +// A request to create a hardware group. +message CreateHardwareGroupRequest { + // Required. The order to create the hardware group in. + // Format: `projects/{project}/locations/{location}/orders/{order}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/HardwareGroup" + } + ]; + + // Optional. ID used to uniquely identify the HardwareGroup within its parent + // scope. This field should contain at most 63 characters and must start with + // lowercase characters. + // Only lowercase characters, numbers and `-` are accepted. + // The `-` character cannot be the first or the last one. + // A system generated ID will be used if the field is not set. + // + // The hardware_group.name field in the request will be ignored. + string hardware_group_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The hardware group to create. + HardwareGroup hardware_group = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to update a hardware group. +message UpdateHardwareGroupRequest { + // Required. A mask to specify the fields in the HardwareGroup to overwrite + // with this update. The fields specified in the update_mask are relative to + // the hardware group, not the full request. A field will be overwritten if it + // is in the mask. If you don't provide a mask then all fields will be + // overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The hardware group to update. + HardwareGroup hardware_group = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete a hardware group. +message DeleteHardwareGroupRequest { + // Required. The name of the hardware group. + // Format: + // `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/HardwareGroup" + } + ]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to list hardware. +message ListHardwareRequest { + // Required. The project and location to list hardware in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Hardware" + } + ]; + + // 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 condition. See [AIP-160](https://google.aip.dev/160). + 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]; +} + +// A list of hardware. +message ListHardwareResponse { + // The list of hardware. + repeated Hardware hardware = 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; +} + +// A request to get hardware. +message GetHardwareRequest { + // Required. The name of the hardware. + // Format: `projects/{project}/locations/{location}/hardware/{hardware}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Hardware" + } + ]; +} + +// A request to create hardware. +message CreateHardwareRequest { + // Required. The project and location to create hardware in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Hardware" + } + ]; + + // Optional. ID used to uniquely identify the Hardware within its parent + // scope. This field should contain at most 63 characters and must start with + // lowercase characters. + // Only lowercase characters, numbers and `-` are accepted. + // The `-` character cannot be the first or the last one. + // A system generated ID will be used if the field is not set. + // + // The hardware.name field in the request will be ignored. + string hardware_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource to create. + Hardware hardware = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request to update hardware. +message UpdateHardwareRequest { + // Required. A mask to specify the fields in the Hardware to overwrite with + // this update. The fields specified in the update_mask are relative to the + // hardware, not the full request. A field will be overwritten if it is in the + // mask. If you don't provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The hardware to update. + Hardware hardware = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete hardware. +message DeleteHardwareRequest { + // Required. The name of the hardware. + // Format: `projects/{project}/locations/{location}/hardware/{hardware}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Hardware" + } + ]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// A request to list comments. +message ListCommentsRequest { + // Required. The order to list comments on. + // Format: `projects/{project}/locations/{location}/orders/{order}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Comment" + } + ]; + + // 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 condition. See [AIP-160](https://google.aip.dev/160). + 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]; +} + +// A request to list comments. +message ListCommentsResponse { + // The list of comments. + repeated Comment comments = 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; +} + +// A request to get a comment. +message GetCommentRequest { + // Required. The name of the comment. + // Format: + // `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Comment" + } + ]; +} + +// A request to create a comment. +message CreateCommentRequest { + // Required. The order to create the comment on. + // Format: `projects/{project}/locations/{location}/orders/{order}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Comment" + } + ]; + + // Optional. ID used to uniquely identify the Comment within its parent scope. + // This field should contain at most 63 characters and must start with + // lowercase characters. + // Only lowercase characters, numbers and `-` are accepted. + // The `-` character cannot be the first or the last one. + // A system generated ID will be used if the field is not set. + // + // The comment.name field in the request will be ignored. + string comment_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The comment to create. + Comment comment = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to list change log entries. +message ListChangeLogEntriesRequest { + // Required. The order to list change log entries for. + // Format: `projects/{project}/locations/{location}/orders/{order}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/ChangeLogEntry" + } + ]; + + // 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 condition. See [AIP-160](https://google.aip.dev/160). + 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]; +} + +// A list of change log entries. +message ListChangeLogEntriesResponse { + // The list of change log entries. + repeated ChangeLogEntry change_log_entries = 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; +} + +// A request to get a change log entry. +message GetChangeLogEntryRequest { + // Required. The name of the change log entry. + // Format: + // `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/ChangeLogEntry" + } + ]; +} + +// A request to list SKUs. +message ListSkusRequest { + // Required. The project and location to list SKUs in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Sku" + } + ]; + + // 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 condition. See [AIP-160](https://google.aip.dev/160). + 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]; +} + +// A list of SKUs. +message ListSkusResponse { + // The list of SKUs. + repeated Sku skus = 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; +} + +// A request to get an SKU. +message GetSkuRequest { + // Required. The name of the SKU. + // Format: `projects/{project}/locations/{location}/skus/{sku}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Sku" + } + ]; +} + +// A request to list zones. +message ListZonesRequest { + // Required. The project and location to list zones in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Zone" + } + ]; + + // 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 condition. See [AIP-160](https://google.aip.dev/160). + 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]; +} + +// A list of zones. +message ListZonesResponse { + // The list of zones. + repeated Zone zones = 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; +} + +// A request to get a zone. +message GetZoneRequest { + // Required. The name of the zone. + // Format: `projects/{project}/locations/{location}/zones/{zone}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Zone" + } + ]; +} + +// A request to create a zone. +message CreateZoneRequest { + // Required. The project and location to create the zone in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gdchardwaremanagement.googleapis.com/Zone" + } + ]; + + // Optional. ID used to uniquely identify the Zone within its parent scope. + // This field should contain at most 63 characters and must start with + // lowercase characters. + // Only lowercase characters, numbers and `-` are accepted. + // The `-` character cannot be the first or the last one. + // A system generated ID will be used if the field is not set. + // + // The zone.name field in the request will be ignored. + string zone_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The zone to create. + Zone zone = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// A request to update a zone. +message UpdateZoneRequest { + // Required. A mask to specify the fields in the Zone to overwrite with this + // update. The fields specified in the update_mask are relative to the zone, + // not the full request. A field will be overwritten if it is in the mask. If + // you don't provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The zone to update. + Zone zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// A request to delete a zone. +message DeleteZoneRequest { + // Required. The name of the zone. + // Format: `projects/{project}/locations/{location}/zones/{zone}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Zone" + } + ]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// A request to signal the state of a zone. +message SignalZoneStateRequest { + // Valid state signals for a zone. + enum StateSignal { + // State signal of the zone is unspecified. + STATE_SIGNAL_UNSPECIFIED = 0; + + // The Zone is ready for site turnup. + READY_FOR_SITE_TURNUP = 1; + + // The Zone failed in factory turnup checks. + FACTORY_TURNUP_CHECKS_FAILED = 2; + } + + // Required. The name of the zone. + // Format: `projects/{project}/locations/{location}/zones/{zone}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gdchardwaremanagement.googleapis.com/Zone" + } + ]; + + // Optional. An optional unique identifier for this request. See + // [AIP-155](https://google.aip.dev/155). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Required. The state signal to send for this zone. + StateSignal state_signal = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the metadata of a 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. 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 [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-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/create/SyncCreateSetCredentialsProvider.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..b6eaf48f3a06 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementSettings; +import com.google.cloud.gdchardwaremanagement.v1alpha.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 + GDCHardwareManagementSettings gDCHardwareManagementSettings = + GDCHardwareManagementSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create(gDCHardwareManagementSettings); + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_Create_SetCredentialsProvider_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/create/SyncCreateSetCredentialsProvider1.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..0fe0ceea12ac --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_Create_SetCredentialsProvider1_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GDCHardwareManagementSettings gDCHardwareManagementSettings = + GDCHardwareManagementSettings.newHttpJsonBuilder().build(); + GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create(gDCHardwareManagementSettings); + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_Create_SetCredentialsProvider1_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/create/SyncCreateSetEndpoint.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..33d7057c915c --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_Create_SetEndpoint_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementSettings; +import com.google.cloud.gdchardwaremanagement.v1alpha.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 + GDCHardwareManagementSettings gDCHardwareManagementSettings = + GDCHardwareManagementSettings.newBuilder().setEndpoint(myEndpoint).build(); + GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create(gDCHardwareManagementSettings); + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_Create_SetEndpoint_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/AsyncCreateComment.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/AsyncCreateComment.java new file mode 100644 index 000000000000..93720ca33a1d --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/AsyncCreateComment.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.longrunning.Operation; + +public class AsyncCreateComment { + + public static void main(String[] args) throws Exception { + asyncCreateComment(); + } + + public static void asyncCreateComment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateCommentRequest request = + CreateCommentRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setCommentId("commentId-1495016486") + .setComment(Comment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.createCommentCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/AsyncCreateCommentLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/AsyncCreateCommentLRO.java new file mode 100644 index 000000000000..2d341fa0cf0f --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/AsyncCreateCommentLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class AsyncCreateCommentLRO { + + public static void main(String[] args) throws Exception { + asyncCreateCommentLRO(); + } + + public static void asyncCreateCommentLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateCommentRequest request = + CreateCommentRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setCommentId("commentId-1495016486") + .setComment(Comment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.createCommentOperationCallable().futureCall(request); + // Do something. + Comment response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/SyncCreateComment.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/SyncCreateComment.java new file mode 100644 index 000000000000..e91ab0ac216a --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/SyncCreateComment.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncCreateComment { + + public static void main(String[] args) throws Exception { + syncCreateComment(); + } + + public static void syncCreateComment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateCommentRequest request = + CreateCommentRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setCommentId("commentId-1495016486") + .setComment(Comment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Comment response = gDCHardwareManagementClient.createCommentAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/SyncCreateCommentOrdernameCommentString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/SyncCreateCommentOrdernameCommentString.java new file mode 100644 index 000000000000..4d7fd42c8a13 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/SyncCreateCommentOrdernameCommentString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_OrdernameCommentString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncCreateCommentOrdernameCommentString { + + public static void main(String[] args) throws Exception { + syncCreateCommentOrdernameCommentString(); + } + + public static void syncCreateCommentOrdernameCommentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + Comment comment = Comment.newBuilder().build(); + String commentId = "commentId-1495016486"; + Comment response = + gDCHardwareManagementClient.createCommentAsync(parent, comment, commentId).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_OrdernameCommentString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/SyncCreateCommentStringCommentString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/SyncCreateCommentStringCommentString.java new file mode 100644 index 000000000000..3929a1223909 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createcomment/SyncCreateCommentStringCommentString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_StringCommentString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncCreateCommentStringCommentString { + + public static void main(String[] args) throws Exception { + syncCreateCommentStringCommentString(); + } + + public static void syncCreateCommentStringCommentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString(); + Comment comment = Comment.newBuilder().build(); + String commentId = "commentId-1495016486"; + Comment response = + gDCHardwareManagementClient.createCommentAsync(parent, comment, commentId).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_StringCommentString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/AsyncCreateHardware.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/AsyncCreateHardware.java new file mode 100644 index 000000000000..b32c30a533f8 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/AsyncCreateHardware.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateHardware { + + public static void main(String[] args) throws Exception { + asyncCreateHardware(); + } + + public static void asyncCreateHardware() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateHardwareRequest request = + CreateHardwareRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHardwareId("hardwareId680924451") + .setHardware(Hardware.newBuilder().build()) + .build(); + ApiFuture future = + gDCHardwareManagementClient.createHardwareCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/AsyncCreateHardwareLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/AsyncCreateHardwareLRO.java new file mode 100644 index 000000000000..b7c789a645b0 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/AsyncCreateHardwareLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; + +public class AsyncCreateHardwareLRO { + + public static void main(String[] args) throws Exception { + asyncCreateHardwareLRO(); + } + + public static void asyncCreateHardwareLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateHardwareRequest request = + CreateHardwareRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHardwareId("hardwareId680924451") + .setHardware(Hardware.newBuilder().build()) + .build(); + OperationFuture future = + gDCHardwareManagementClient.createHardwareOperationCallable().futureCall(request); + // Do something. + Hardware response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/SyncCreateHardware.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/SyncCreateHardware.java new file mode 100644 index 000000000000..6326629c1da1 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/SyncCreateHardware.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; + +public class SyncCreateHardware { + + public static void main(String[] args) throws Exception { + syncCreateHardware(); + } + + public static void syncCreateHardware() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateHardwareRequest request = + CreateHardwareRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHardwareId("hardwareId680924451") + .setHardware(Hardware.newBuilder().build()) + .build(); + Hardware response = gDCHardwareManagementClient.createHardwareAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/SyncCreateHardwareLocationnameHardwareString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/SyncCreateHardwareLocationnameHardwareString.java new file mode 100644 index 000000000000..36a42ffa6e2a --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/SyncCreateHardwareLocationnameHardwareString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_LocationnameHardwareString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; + +public class SyncCreateHardwareLocationnameHardwareString { + + public static void main(String[] args) throws Exception { + syncCreateHardwareLocationnameHardwareString(); + } + + public static void syncCreateHardwareLocationnameHardwareString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Hardware hardware = Hardware.newBuilder().build(); + String hardwareId = "hardwareId680924451"; + Hardware response = + gDCHardwareManagementClient.createHardwareAsync(parent, hardware, hardwareId).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_LocationnameHardwareString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/SyncCreateHardwareStringHardwareString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/SyncCreateHardwareStringHardwareString.java new file mode 100644 index 000000000000..ba45a2a9d4dc --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardware/SyncCreateHardwareStringHardwareString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_StringHardwareString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; + +public class SyncCreateHardwareStringHardwareString { + + public static void main(String[] args) throws Exception { + syncCreateHardwareStringHardwareString(); + } + + public static void syncCreateHardwareStringHardwareString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Hardware hardware = Hardware.newBuilder().build(); + String hardwareId = "hardwareId680924451"; + Hardware response = + gDCHardwareManagementClient.createHardwareAsync(parent, hardware, hardwareId).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_StringHardwareString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/AsyncCreateHardwareGroup.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/AsyncCreateHardwareGroup.java new file mode 100644 index 000000000000..1f670cd8a8cf --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/AsyncCreateHardwareGroup.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.longrunning.Operation; + +public class AsyncCreateHardwareGroup { + + public static void main(String[] args) throws Exception { + asyncCreateHardwareGroup(); + } + + public static void asyncCreateHardwareGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateHardwareGroupRequest request = + CreateHardwareGroupRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroupId("hardwareGroupId-1961682702") + .setHardwareGroup(HardwareGroup.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.createHardwareGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/AsyncCreateHardwareGroupLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/AsyncCreateHardwareGroupLRO.java new file mode 100644 index 000000000000..2c1305d37b7f --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/AsyncCreateHardwareGroupLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class AsyncCreateHardwareGroupLRO { + + public static void main(String[] args) throws Exception { + asyncCreateHardwareGroupLRO(); + } + + public static void asyncCreateHardwareGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateHardwareGroupRequest request = + CreateHardwareGroupRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroupId("hardwareGroupId-1961682702") + .setHardwareGroup(HardwareGroup.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.createHardwareGroupOperationCallable().futureCall(request); + // Do something. + HardwareGroup response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/SyncCreateHardwareGroup.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/SyncCreateHardwareGroup.java new file mode 100644 index 000000000000..0fefc1a72b94 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/SyncCreateHardwareGroup.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncCreateHardwareGroup { + + public static void main(String[] args) throws Exception { + syncCreateHardwareGroup(); + } + + public static void syncCreateHardwareGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateHardwareGroupRequest request = + CreateHardwareGroupRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setHardwareGroupId("hardwareGroupId-1961682702") + .setHardwareGroup(HardwareGroup.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + HardwareGroup response = gDCHardwareManagementClient.createHardwareGroupAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/SyncCreateHardwareGroupOrdernameHardwaregroupString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/SyncCreateHardwareGroupOrdernameHardwaregroupString.java new file mode 100644 index 000000000000..8715eec6e9b6 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/SyncCreateHardwareGroupOrdernameHardwaregroupString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_OrdernameHardwaregroupString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncCreateHardwareGroupOrdernameHardwaregroupString { + + public static void main(String[] args) throws Exception { + syncCreateHardwareGroupOrdernameHardwaregroupString(); + } + + public static void syncCreateHardwareGroupOrdernameHardwaregroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + String hardwareGroupId = "hardwareGroupId-1961682702"; + HardwareGroup response = + gDCHardwareManagementClient + .createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId) + .get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_OrdernameHardwaregroupString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/SyncCreateHardwareGroupStringHardwaregroupString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/SyncCreateHardwareGroupStringHardwaregroupString.java new file mode 100644 index 000000000000..eeb30fa5108d --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createhardwaregroup/SyncCreateHardwareGroupStringHardwaregroupString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_StringHardwaregroupString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncCreateHardwareGroupStringHardwaregroupString { + + public static void main(String[] args) throws Exception { + syncCreateHardwareGroupStringHardwaregroupString(); + } + + public static void syncCreateHardwareGroupStringHardwaregroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString(); + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + String hardwareGroupId = "hardwareGroupId-1961682702"; + HardwareGroup response = + gDCHardwareManagementClient + .createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId) + .get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_StringHardwaregroupString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/AsyncCreateOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/AsyncCreateOrder.java new file mode 100644 index 000000000000..bdc6e3f86eda --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/AsyncCreateOrder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.longrunning.Operation; + +public class AsyncCreateOrder { + + public static void main(String[] args) throws Exception { + asyncCreateOrder(); + } + + public static void asyncCreateOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateOrderRequest request = + CreateOrderRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setOrderId("orderId-1207110391") + .setOrder(Order.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.createOrderCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/AsyncCreateOrderLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/AsyncCreateOrderLRO.java new file mode 100644 index 000000000000..84bd73c6dc03 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/AsyncCreateOrderLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; + +public class AsyncCreateOrderLRO { + + public static void main(String[] args) throws Exception { + asyncCreateOrderLRO(); + } + + public static void asyncCreateOrderLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateOrderRequest request = + CreateOrderRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setOrderId("orderId-1207110391") + .setOrder(Order.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.createOrderOperationCallable().futureCall(request); + // Do something. + Order response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/SyncCreateOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/SyncCreateOrder.java new file mode 100644 index 000000000000..756ed2bbb037 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/SyncCreateOrder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; + +public class SyncCreateOrder { + + public static void main(String[] args) throws Exception { + syncCreateOrder(); + } + + public static void syncCreateOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateOrderRequest request = + CreateOrderRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setOrderId("orderId-1207110391") + .setOrder(Order.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Order response = gDCHardwareManagementClient.createOrderAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/SyncCreateOrderLocationnameOrderString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/SyncCreateOrderLocationnameOrderString.java new file mode 100644 index 000000000000..4c5c38b2b76b --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/SyncCreateOrderLocationnameOrderString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_LocationnameOrderString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; + +public class SyncCreateOrderLocationnameOrderString { + + public static void main(String[] args) throws Exception { + syncCreateOrderLocationnameOrderString(); + } + + public static void syncCreateOrderLocationnameOrderString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Order order = Order.newBuilder().build(); + String orderId = "orderId-1207110391"; + Order response = gDCHardwareManagementClient.createOrderAsync(parent, order, orderId).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_LocationnameOrderString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/SyncCreateOrderStringOrderString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/SyncCreateOrderStringOrderString.java new file mode 100644 index 000000000000..b215bb62927a --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createorder/SyncCreateOrderStringOrderString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_StringOrderString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; + +public class SyncCreateOrderStringOrderString { + + public static void main(String[] args) throws Exception { + syncCreateOrderStringOrderString(); + } + + public static void syncCreateOrderStringOrderString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Order order = Order.newBuilder().build(); + String orderId = "orderId-1207110391"; + Order response = gDCHardwareManagementClient.createOrderAsync(parent, order, orderId).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_StringOrderString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/AsyncCreateSite.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/AsyncCreateSite.java new file mode 100644 index 000000000000..ff4bd0dfa6c1 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/AsyncCreateSite.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.longrunning.Operation; + +public class AsyncCreateSite { + + public static void main(String[] args) throws Exception { + asyncCreateSite(); + } + + public static void asyncCreateSite() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateSiteRequest request = + CreateSiteRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSiteId("siteId-902090046") + .setSite(Site.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.createSiteCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/AsyncCreateSiteLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/AsyncCreateSiteLRO.java new file mode 100644 index 000000000000..86ed33c4d74c --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/AsyncCreateSiteLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; + +public class AsyncCreateSiteLRO { + + public static void main(String[] args) throws Exception { + asyncCreateSiteLRO(); + } + + public static void asyncCreateSiteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateSiteRequest request = + CreateSiteRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSiteId("siteId-902090046") + .setSite(Site.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.createSiteOperationCallable().futureCall(request); + // Do something. + Site response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/SyncCreateSite.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/SyncCreateSite.java new file mode 100644 index 000000000000..237f1aca5c80 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/SyncCreateSite.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; + +public class SyncCreateSite { + + public static void main(String[] args) throws Exception { + syncCreateSite(); + } + + public static void syncCreateSite() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateSiteRequest request = + CreateSiteRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSiteId("siteId-902090046") + .setSite(Site.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Site response = gDCHardwareManagementClient.createSiteAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/SyncCreateSiteLocationnameSiteString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/SyncCreateSiteLocationnameSiteString.java new file mode 100644 index 000000000000..0322e3a2b802 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/SyncCreateSiteLocationnameSiteString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_LocationnameSiteString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; + +public class SyncCreateSiteLocationnameSiteString { + + public static void main(String[] args) throws Exception { + syncCreateSiteLocationnameSiteString(); + } + + public static void syncCreateSiteLocationnameSiteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Site site = Site.newBuilder().build(); + String siteId = "siteId-902090046"; + Site response = gDCHardwareManagementClient.createSiteAsync(parent, site, siteId).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_LocationnameSiteString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/SyncCreateSiteStringSiteString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/SyncCreateSiteStringSiteString.java new file mode 100644 index 000000000000..6ee579ee6bc4 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createsite/SyncCreateSiteStringSiteString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_StringSiteString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; + +public class SyncCreateSiteStringSiteString { + + public static void main(String[] args) throws Exception { + syncCreateSiteStringSiteString(); + } + + public static void syncCreateSiteStringSiteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Site site = Site.newBuilder().build(); + String siteId = "siteId-902090046"; + Site response = gDCHardwareManagementClient.createSiteAsync(parent, site, siteId).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_StringSiteString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/AsyncCreateZone.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/AsyncCreateZone.java new file mode 100644 index 000000000000..ff29514a1052 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/AsyncCreateZone.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.longrunning.Operation; + +public class AsyncCreateZone { + + public static void main(String[] args) throws Exception { + asyncCreateZone(); + } + + public static void asyncCreateZone() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateZoneRequest request = + CreateZoneRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setZoneId("zoneId-696323609") + .setZone(Zone.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.createZoneCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/AsyncCreateZoneLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/AsyncCreateZoneLRO.java new file mode 100644 index 000000000000..57a48ebc5b89 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/AsyncCreateZoneLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; + +public class AsyncCreateZoneLRO { + + public static void main(String[] args) throws Exception { + asyncCreateZoneLRO(); + } + + public static void asyncCreateZoneLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateZoneRequest request = + CreateZoneRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setZoneId("zoneId-696323609") + .setZone(Zone.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.createZoneOperationCallable().futureCall(request); + // Do something. + Zone response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/SyncCreateZone.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/SyncCreateZone.java new file mode 100644 index 000000000000..e267f4a6bfe5 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/SyncCreateZone.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; + +public class SyncCreateZone { + + public static void main(String[] args) throws Exception { + syncCreateZone(); + } + + public static void syncCreateZone() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CreateZoneRequest request = + CreateZoneRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setZoneId("zoneId-696323609") + .setZone(Zone.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Zone response = gDCHardwareManagementClient.createZoneAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/SyncCreateZoneLocationnameZoneString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/SyncCreateZoneLocationnameZoneString.java new file mode 100644 index 000000000000..82d192d42c17 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/SyncCreateZoneLocationnameZoneString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_LocationnameZoneString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; + +public class SyncCreateZoneLocationnameZoneString { + + public static void main(String[] args) throws Exception { + syncCreateZoneLocationnameZoneString(); + } + + public static void syncCreateZoneLocationnameZoneString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Zone zone = Zone.newBuilder().build(); + String zoneId = "zoneId-696323609"; + Zone response = gDCHardwareManagementClient.createZoneAsync(parent, zone, zoneId).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_LocationnameZoneString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/SyncCreateZoneStringZoneString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/SyncCreateZoneStringZoneString.java new file mode 100644 index 000000000000..268b915aa193 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/createzone/SyncCreateZoneStringZoneString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_StringZoneString_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; + +public class SyncCreateZoneStringZoneString { + + public static void main(String[] args) throws Exception { + syncCreateZoneStringZoneString(); + } + + public static void syncCreateZoneStringZoneString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Zone zone = Zone.newBuilder().build(); + String zoneId = "zoneId-696323609"; + Zone response = gDCHardwareManagementClient.createZoneAsync(parent, zone, zoneId).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_StringZoneString_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/AsyncDeleteHardware.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/AsyncDeleteHardware.java new file mode 100644 index 000000000000..e6d229c2aac4 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/AsyncDeleteHardware.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareName; +import com.google.longrunning.Operation; + +public class AsyncDeleteHardware { + + public static void main(String[] args) throws Exception { + asyncDeleteHardware(); + } + + public static void asyncDeleteHardware() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteHardwareRequest request = + DeleteHardwareRequest.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.deleteHardwareCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/AsyncDeleteHardwareLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/AsyncDeleteHardwareLRO.java new file mode 100644 index 000000000000..1426417d11f0 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/AsyncDeleteHardwareLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareName; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteHardwareLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteHardwareLRO(); + } + + public static void asyncDeleteHardwareLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteHardwareRequest request = + DeleteHardwareRequest.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.deleteHardwareOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/SyncDeleteHardware.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/SyncDeleteHardware.java new file mode 100644 index 000000000000..c71347ecb082 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/SyncDeleteHardware.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareName; +import com.google.protobuf.Empty; + +public class SyncDeleteHardware { + + public static void main(String[] args) throws Exception { + syncDeleteHardware(); + } + + public static void syncDeleteHardware() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteHardwareRequest request = + DeleteHardwareRequest.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .setRequestId("requestId693933066") + .build(); + gDCHardwareManagementClient.deleteHardwareAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/SyncDeleteHardwareHardwarename.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/SyncDeleteHardwareHardwarename.java new file mode 100644 index 000000000000..2452eb145a33 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/SyncDeleteHardwareHardwarename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_Hardwarename_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareName; +import com.google.protobuf.Empty; + +public class SyncDeleteHardwareHardwarename { + + public static void main(String[] args) throws Exception { + syncDeleteHardwareHardwarename(); + } + + public static void syncDeleteHardwareHardwarename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]"); + gDCHardwareManagementClient.deleteHardwareAsync(name).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_Hardwarename_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/SyncDeleteHardwareString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/SyncDeleteHardwareString.java new file mode 100644 index 000000000000..cebbe67cacfc --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardware/SyncDeleteHardwareString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareName; +import com.google.protobuf.Empty; + +public class SyncDeleteHardwareString { + + public static void main(String[] args) throws Exception { + syncDeleteHardwareString(); + } + + public static void syncDeleteHardwareString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString(); + gDCHardwareManagementClient.deleteHardwareAsync(name).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/AsyncDeleteHardwareGroup.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/AsyncDeleteHardwareGroup.java new file mode 100644 index 000000000000..bd1341d29bd9 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/AsyncDeleteHardwareGroup.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupName; +import com.google.longrunning.Operation; + +public class AsyncDeleteHardwareGroup { + + public static void main(String[] args) throws Exception { + asyncDeleteHardwareGroup(); + } + + public static void asyncDeleteHardwareGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteHardwareGroupRequest request = + DeleteHardwareGroupRequest.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.deleteHardwareGroupCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/AsyncDeleteHardwareGroupLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/AsyncDeleteHardwareGroupLRO.java new file mode 100644 index 000000000000..6c79d5f296bf --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/AsyncDeleteHardwareGroupLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupName; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteHardwareGroupLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteHardwareGroupLRO(); + } + + public static void asyncDeleteHardwareGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteHardwareGroupRequest request = + DeleteHardwareGroupRequest.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.deleteHardwareGroupOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/SyncDeleteHardwareGroup.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/SyncDeleteHardwareGroup.java new file mode 100644 index 000000000000..93683862a924 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/SyncDeleteHardwareGroup.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupName; +import com.google.protobuf.Empty; + +public class SyncDeleteHardwareGroup { + + public static void main(String[] args) throws Exception { + syncDeleteHardwareGroup(); + } + + public static void syncDeleteHardwareGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteHardwareGroupRequest request = + DeleteHardwareGroupRequest.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .setRequestId("requestId693933066") + .build(); + gDCHardwareManagementClient.deleteHardwareGroupAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/SyncDeleteHardwareGroupHardwaregroupname.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/SyncDeleteHardwareGroupHardwaregroupname.java new file mode 100644 index 000000000000..d4bf639468b2 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/SyncDeleteHardwareGroupHardwaregroupname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_Hardwaregroupname_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupName; +import com.google.protobuf.Empty; + +public class SyncDeleteHardwareGroupHardwaregroupname { + + public static void main(String[] args) throws Exception { + syncDeleteHardwareGroupHardwaregroupname(); + } + + public static void syncDeleteHardwareGroupHardwaregroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + HardwareGroupName name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]"); + gDCHardwareManagementClient.deleteHardwareGroupAsync(name).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_Hardwaregroupname_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/SyncDeleteHardwareGroupString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/SyncDeleteHardwareGroupString.java new file mode 100644 index 000000000000..a0cf253aed8f --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletehardwaregroup/SyncDeleteHardwareGroupString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupName; +import com.google.protobuf.Empty; + +public class SyncDeleteHardwareGroupString { + + public static void main(String[] args) throws Exception { + syncDeleteHardwareGroupString(); + } + + public static void syncDeleteHardwareGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]").toString(); + gDCHardwareManagementClient.deleteHardwareGroupAsync(name).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/AsyncDeleteOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/AsyncDeleteOrder.java new file mode 100644 index 000000000000..bc67f7061e20 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/AsyncDeleteOrder.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.longrunning.Operation; + +public class AsyncDeleteOrder { + + public static void main(String[] args) throws Exception { + asyncDeleteOrder(); + } + + public static void asyncDeleteOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteOrderRequest request = + DeleteOrderRequest.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + ApiFuture future = + gDCHardwareManagementClient.deleteOrderCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/AsyncDeleteOrderLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/AsyncDeleteOrderLRO.java new file mode 100644 index 000000000000..79b02d9e696f --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/AsyncDeleteOrderLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.protobuf.Empty; + +public class AsyncDeleteOrderLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteOrderLRO(); + } + + public static void asyncDeleteOrderLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteOrderRequest request = + DeleteOrderRequest.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + OperationFuture future = + gDCHardwareManagementClient.deleteOrderOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/SyncDeleteOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/SyncDeleteOrder.java new file mode 100644 index 000000000000..1068dcf6d1df --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/SyncDeleteOrder.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.protobuf.Empty; + +public class SyncDeleteOrder { + + public static void main(String[] args) throws Exception { + syncDeleteOrder(); + } + + public static void syncDeleteOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteOrderRequest request = + DeleteOrderRequest.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + gDCHardwareManagementClient.deleteOrderAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/SyncDeleteOrderOrdername.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/SyncDeleteOrderOrdername.java new file mode 100644 index 000000000000..0ab004f33c14 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/SyncDeleteOrderOrdername.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_Ordername_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.protobuf.Empty; + +public class SyncDeleteOrderOrdername { + + public static void main(String[] args) throws Exception { + syncDeleteOrderOrdername(); + } + + public static void syncDeleteOrderOrdername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + gDCHardwareManagementClient.deleteOrderAsync(name).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_Ordername_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/SyncDeleteOrderString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/SyncDeleteOrderString.java new file mode 100644 index 000000000000..cd01350691d6 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deleteorder/SyncDeleteOrderString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.protobuf.Empty; + +public class SyncDeleteOrderString { + + public static void main(String[] args) throws Exception { + syncDeleteOrderString(); + } + + public static void syncDeleteOrderString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString(); + gDCHardwareManagementClient.deleteOrderAsync(name).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/AsyncDeleteZone.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/AsyncDeleteZone.java new file mode 100644 index 000000000000..f7a5cb14bbe7 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/AsyncDeleteZone.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; +import com.google.longrunning.Operation; + +public class AsyncDeleteZone { + + public static void main(String[] args) throws Exception { + asyncDeleteZone(); + } + + public static void asyncDeleteZone() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteZoneRequest request = + DeleteZoneRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.deleteZoneCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/AsyncDeleteZoneLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/AsyncDeleteZoneLRO.java new file mode 100644 index 000000000000..148a31cb3b18 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/AsyncDeleteZoneLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; +import com.google.protobuf.Empty; + +public class AsyncDeleteZoneLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteZoneLRO(); + } + + public static void asyncDeleteZoneLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteZoneRequest request = + DeleteZoneRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.deleteZoneOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/SyncDeleteZone.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/SyncDeleteZone.java new file mode 100644 index 000000000000..598340e1777a --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/SyncDeleteZone.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; +import com.google.protobuf.Empty; + +public class SyncDeleteZone { + + public static void main(String[] args) throws Exception { + syncDeleteZone(); + } + + public static void syncDeleteZone() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + DeleteZoneRequest request = + DeleteZoneRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestId("requestId693933066") + .build(); + gDCHardwareManagementClient.deleteZoneAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/SyncDeleteZoneString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/SyncDeleteZoneString.java new file mode 100644 index 000000000000..88afeb6702ca --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/SyncDeleteZoneString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; +import com.google.protobuf.Empty; + +public class SyncDeleteZoneString { + + public static void main(String[] args) throws Exception { + syncDeleteZoneString(); + } + + public static void syncDeleteZoneString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + gDCHardwareManagementClient.deleteZoneAsync(name).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/SyncDeleteZoneZonename.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/SyncDeleteZoneZonename.java new file mode 100644 index 000000000000..0768c9b0c476 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/deletezone/SyncDeleteZoneZonename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_Zonename_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; +import com.google.protobuf.Empty; + +public class SyncDeleteZoneZonename { + + public static void main(String[] args) throws Exception { + syncDeleteZoneZonename(); + } + + public static void syncDeleteZoneZonename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + gDCHardwareManagementClient.deleteZoneAsync(name).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_Zonename_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/AsyncGetChangeLogEntry.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/AsyncGetChangeLogEntry.java new file mode 100644 index 000000000000..a17b2b97090f --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/AsyncGetChangeLogEntry.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryName; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest; + +public class AsyncGetChangeLogEntry { + + public static void main(String[] args) throws Exception { + asyncGetChangeLogEntry(); + } + + public static void asyncGetChangeLogEntry() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetChangeLogEntryRequest request = + GetChangeLogEntryRequest.newBuilder() + .setName( + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]") + .toString()) + .build(); + ApiFuture future = + gDCHardwareManagementClient.getChangeLogEntryCallable().futureCall(request); + // Do something. + ChangeLogEntry response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/SyncGetChangeLogEntry.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/SyncGetChangeLogEntry.java new file mode 100644 index 000000000000..3fa6417a18a8 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/SyncGetChangeLogEntry.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryName; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest; + +public class SyncGetChangeLogEntry { + + public static void main(String[] args) throws Exception { + syncGetChangeLogEntry(); + } + + public static void syncGetChangeLogEntry() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetChangeLogEntryRequest request = + GetChangeLogEntryRequest.newBuilder() + .setName( + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]") + .toString()) + .build(); + ChangeLogEntry response = gDCHardwareManagementClient.getChangeLogEntry(request); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/SyncGetChangeLogEntryChangelogentryname.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/SyncGetChangeLogEntryChangelogentryname.java new file mode 100644 index 000000000000..8af0abdb2447 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/SyncGetChangeLogEntryChangelogentryname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_Changelogentryname_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryName; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; + +public class SyncGetChangeLogEntryChangelogentryname { + + public static void main(String[] args) throws Exception { + syncGetChangeLogEntryChangelogentryname(); + } + + public static void syncGetChangeLogEntryChangelogentryname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ChangeLogEntryName name = + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]"); + ChangeLogEntry response = gDCHardwareManagementClient.getChangeLogEntry(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_Changelogentryname_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/SyncGetChangeLogEntryString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/SyncGetChangeLogEntryString.java new file mode 100644 index 000000000000..734d780efa93 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getchangelogentry/SyncGetChangeLogEntryString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntryName; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; + +public class SyncGetChangeLogEntryString { + + public static void main(String[] args) throws Exception { + syncGetChangeLogEntryString(); + } + + public static void syncGetChangeLogEntryString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = + ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]") + .toString(); + ChangeLogEntry response = gDCHardwareManagementClient.getChangeLogEntry(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/AsyncGetComment.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/AsyncGetComment.java new file mode 100644 index 000000000000..378d2ac55c08 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/AsyncGetComment.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CommentName; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest; + +public class AsyncGetComment { + + public static void main(String[] args) throws Exception { + asyncGetComment(); + } + + public static void asyncGetComment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetCommentRequest request = + GetCommentRequest.newBuilder() + .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString()) + .build(); + ApiFuture future = + gDCHardwareManagementClient.getCommentCallable().futureCall(request); + // Do something. + Comment response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/SyncGetComment.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/SyncGetComment.java new file mode 100644 index 000000000000..1b76de9c5310 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/SyncGetComment.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CommentName; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest; + +public class SyncGetComment { + + public static void main(String[] args) throws Exception { + syncGetComment(); + } + + public static void syncGetComment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetCommentRequest request = + GetCommentRequest.newBuilder() + .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString()) + .build(); + Comment response = gDCHardwareManagementClient.getComment(request); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/SyncGetCommentCommentname.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/SyncGetCommentCommentname.java new file mode 100644 index 000000000000..75cb109833aa --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/SyncGetCommentCommentname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_Commentname_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CommentName; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; + +public class SyncGetCommentCommentname { + + public static void main(String[] args) throws Exception { + syncGetCommentCommentname(); + } + + public static void syncGetCommentCommentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + CommentName name = CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]"); + Comment response = gDCHardwareManagementClient.getComment(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_Commentname_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/SyncGetCommentString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/SyncGetCommentString.java new file mode 100644 index 000000000000..44fe94d8aaf1 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getcomment/SyncGetCommentString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.CommentName; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; + +public class SyncGetCommentString { + + public static void main(String[] args) throws Exception { + syncGetCommentString(); + } + + public static void syncGetCommentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString(); + Comment response = gDCHardwareManagementClient.getComment(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/AsyncGetHardware.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/AsyncGetHardware.java new file mode 100644 index 000000000000..2cf35536b0b7 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/AsyncGetHardware.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareName; + +public class AsyncGetHardware { + + public static void main(String[] args) throws Exception { + asyncGetHardware(); + } + + public static void asyncGetHardware() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetHardwareRequest request = + GetHardwareRequest.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .build(); + ApiFuture future = + gDCHardwareManagementClient.getHardwareCallable().futureCall(request); + // Do something. + Hardware response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/SyncGetHardware.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/SyncGetHardware.java new file mode 100644 index 000000000000..85dbafe1ae57 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/SyncGetHardware.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareName; + +public class SyncGetHardware { + + public static void main(String[] args) throws Exception { + syncGetHardware(); + } + + public static void syncGetHardware() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetHardwareRequest request = + GetHardwareRequest.newBuilder() + .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString()) + .build(); + Hardware response = gDCHardwareManagementClient.getHardware(request); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/SyncGetHardwareHardwarename.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/SyncGetHardwareHardwarename.java new file mode 100644 index 000000000000..3e37dc9022ad --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/SyncGetHardwareHardwarename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_Hardwarename_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareName; + +public class SyncGetHardwareHardwarename { + + public static void main(String[] args) throws Exception { + syncGetHardwareHardwarename(); + } + + public static void syncGetHardwareHardwarename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]"); + Hardware response = gDCHardwareManagementClient.getHardware(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_Hardwarename_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/SyncGetHardwareString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/SyncGetHardwareString.java new file mode 100644 index 000000000000..2082d5527898 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardware/SyncGetHardwareString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareName; + +public class SyncGetHardwareString { + + public static void main(String[] args) throws Exception { + syncGetHardwareString(); + } + + public static void syncGetHardwareString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString(); + Hardware response = gDCHardwareManagementClient.getHardware(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/AsyncGetHardwareGroup.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/AsyncGetHardwareGroup.java new file mode 100644 index 000000000000..1e6d236d39af --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/AsyncGetHardwareGroup.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupName; + +public class AsyncGetHardwareGroup { + + public static void main(String[] args) throws Exception { + asyncGetHardwareGroup(); + } + + public static void asyncGetHardwareGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetHardwareGroupRequest request = + GetHardwareGroupRequest.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .build(); + ApiFuture future = + gDCHardwareManagementClient.getHardwareGroupCallable().futureCall(request); + // Do something. + HardwareGroup response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/SyncGetHardwareGroup.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/SyncGetHardwareGroup.java new file mode 100644 index 000000000000..b79c0690c99b --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/SyncGetHardwareGroup.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupName; + +public class SyncGetHardwareGroup { + + public static void main(String[] args) throws Exception { + syncGetHardwareGroup(); + } + + public static void syncGetHardwareGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetHardwareGroupRequest request = + GetHardwareGroupRequest.newBuilder() + .setName( + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]") + .toString()) + .build(); + HardwareGroup response = gDCHardwareManagementClient.getHardwareGroup(request); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/SyncGetHardwareGroupHardwaregroupname.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/SyncGetHardwareGroupHardwaregroupname.java new file mode 100644 index 000000000000..d779450bccd9 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/SyncGetHardwareGroupHardwaregroupname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_Hardwaregroupname_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupName; + +public class SyncGetHardwareGroupHardwaregroupname { + + public static void main(String[] args) throws Exception { + syncGetHardwareGroupHardwaregroupname(); + } + + public static void syncGetHardwareGroupHardwaregroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + HardwareGroupName name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]"); + HardwareGroup response = gDCHardwareManagementClient.getHardwareGroup(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_Hardwaregroupname_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/SyncGetHardwareGroupString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/SyncGetHardwareGroupString.java new file mode 100644 index 000000000000..e39db6d98480 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/gethardwaregroup/SyncGetHardwareGroupString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupName; + +public class SyncGetHardwareGroupString { + + public static void main(String[] args) throws Exception { + syncGetHardwareGroupString(); + } + + public static void syncGetHardwareGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = + HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]").toString(); + HardwareGroup response = gDCHardwareManagementClient.getHardwareGroup(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getlocation/AsyncGetLocation.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..93db276ade82 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +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 (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + gDCHardwareManagementClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetLocation_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getlocation/SyncGetLocation.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..8710fb2e8e8e --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetLocation_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +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 (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = gDCHardwareManagementClient.getLocation(request); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetLocation_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/AsyncGetOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/AsyncGetOrder.java new file mode 100644 index 000000000000..3502f39d23fa --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/AsyncGetOrder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class AsyncGetOrder { + + public static void main(String[] args) throws Exception { + asyncGetOrder(); + } + + public static void asyncGetOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetOrderRequest request = + GetOrderRequest.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .build(); + ApiFuture future = gDCHardwareManagementClient.getOrderCallable().futureCall(request); + // Do something. + Order response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/SyncGetOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/SyncGetOrder.java new file mode 100644 index 000000000000..d49b232fea74 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/SyncGetOrder.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncGetOrder { + + public static void main(String[] args) throws Exception { + syncGetOrder(); + } + + public static void syncGetOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetOrderRequest request = + GetOrderRequest.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .build(); + Order response = gDCHardwareManagementClient.getOrder(request); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/SyncGetOrderOrdername.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/SyncGetOrderOrdername.java new file mode 100644 index 000000000000..aa395c1d03c5 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/SyncGetOrderOrdername.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_Ordername_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncGetOrderOrdername { + + public static void main(String[] args) throws Exception { + syncGetOrderOrdername(); + } + + public static void syncGetOrderOrdername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + Order response = gDCHardwareManagementClient.getOrder(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_Ordername_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/SyncGetOrderString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/SyncGetOrderString.java new file mode 100644 index 000000000000..2dd6999428d7 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getorder/SyncGetOrderString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncGetOrderString { + + public static void main(String[] args) throws Exception { + syncGetOrderString(); + } + + public static void syncGetOrderString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString(); + Order response = gDCHardwareManagementClient.getOrder(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/AsyncGetSite.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/AsyncGetSite.java new file mode 100644 index 000000000000..cb98f24ab168 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/AsyncGetSite.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.SiteName; + +public class AsyncGetSite { + + public static void main(String[] args) throws Exception { + asyncGetSite(); + } + + public static void asyncGetSite() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetSiteRequest request = + GetSiteRequest.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .build(); + ApiFuture future = gDCHardwareManagementClient.getSiteCallable().futureCall(request); + // Do something. + Site response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/SyncGetSite.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/SyncGetSite.java new file mode 100644 index 000000000000..e629b9281338 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/SyncGetSite.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.SiteName; + +public class SyncGetSite { + + public static void main(String[] args) throws Exception { + syncGetSite(); + } + + public static void syncGetSite() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetSiteRequest request = + GetSiteRequest.newBuilder() + .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString()) + .build(); + Site response = gDCHardwareManagementClient.getSite(request); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/SyncGetSiteSitename.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/SyncGetSiteSitename.java new file mode 100644 index 000000000000..f3c74c7e9d57 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/SyncGetSiteSitename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_Sitename_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.SiteName; + +public class SyncGetSiteSitename { + + public static void main(String[] args) throws Exception { + syncGetSiteSitename(); + } + + public static void syncGetSiteSitename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + SiteName name = SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]"); + Site response = gDCHardwareManagementClient.getSite(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_Sitename_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/SyncGetSiteString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/SyncGetSiteString.java new file mode 100644 index 000000000000..3c71f3634b36 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsite/SyncGetSiteString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.SiteName; + +public class SyncGetSiteString { + + public static void main(String[] args) throws Exception { + syncGetSiteString(); + } + + public static void syncGetSiteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString(); + Site response = gDCHardwareManagementClient.getSite(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/AsyncGetSku.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/AsyncGetSku.java new file mode 100644 index 000000000000..142596e3d9b0 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/AsyncGetSku.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; +import com.google.cloud.gdchardwaremanagement.v1alpha.SkuName; + +public class AsyncGetSku { + + public static void main(String[] args) throws Exception { + asyncGetSku(); + } + + public static void asyncGetSku() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetSkuRequest request = + GetSkuRequest.newBuilder() + .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString()) + .build(); + ApiFuture future = gDCHardwareManagementClient.getSkuCallable().futureCall(request); + // Do something. + Sku response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/SyncGetSku.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/SyncGetSku.java new file mode 100644 index 000000000000..7aa1da8dc8c5 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/SyncGetSku.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; +import com.google.cloud.gdchardwaremanagement.v1alpha.SkuName; + +public class SyncGetSku { + + public static void main(String[] args) throws Exception { + syncGetSku(); + } + + public static void syncGetSku() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetSkuRequest request = + GetSkuRequest.newBuilder() + .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString()) + .build(); + Sku response = gDCHardwareManagementClient.getSku(request); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/SyncGetSkuSkuname.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/SyncGetSkuSkuname.java new file mode 100644 index 000000000000..36f16871f36b --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/SyncGetSkuSkuname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_Skuname_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; +import com.google.cloud.gdchardwaremanagement.v1alpha.SkuName; + +public class SyncGetSkuSkuname { + + public static void main(String[] args) throws Exception { + syncGetSkuSkuname(); + } + + public static void syncGetSkuSkuname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + SkuName name = SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]"); + Sku response = gDCHardwareManagementClient.getSku(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_Skuname_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/SyncGetSkuString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/SyncGetSkuString.java new file mode 100644 index 000000000000..3d8cf0eeae8e --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getsku/SyncGetSkuString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; +import com.google.cloud.gdchardwaremanagement.v1alpha.SkuName; + +public class SyncGetSkuString { + + public static void main(String[] args) throws Exception { + syncGetSkuString(); + } + + public static void syncGetSkuString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString(); + Sku response = gDCHardwareManagementClient.getSku(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/AsyncGetZone.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/AsyncGetZone.java new file mode 100644 index 000000000000..d2fa4cb327fd --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/AsyncGetZone.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; + +public class AsyncGetZone { + + public static void main(String[] args) throws Exception { + asyncGetZone(); + } + + public static void asyncGetZone() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetZoneRequest request = + GetZoneRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .build(); + ApiFuture future = gDCHardwareManagementClient.getZoneCallable().futureCall(request); + // Do something. + Zone response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/SyncGetZone.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/SyncGetZone.java new file mode 100644 index 000000000000..34005b0aac49 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/SyncGetZone.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; + +public class SyncGetZone { + + public static void main(String[] args) throws Exception { + syncGetZone(); + } + + public static void syncGetZone() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + GetZoneRequest request = + GetZoneRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .build(); + Zone response = gDCHardwareManagementClient.getZone(request); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/SyncGetZoneString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/SyncGetZoneString.java new file mode 100644 index 000000000000..c692539700f4 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/SyncGetZoneString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; + +public class SyncGetZoneString { + + public static void main(String[] args) throws Exception { + syncGetZoneString(); + } + + public static void syncGetZoneString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + Zone response = gDCHardwareManagementClient.getZone(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/SyncGetZoneZonename.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/SyncGetZoneZonename.java new file mode 100644 index 000000000000..1a18eddc528b --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/getzone/SyncGetZoneZonename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_Zonename_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; + +public class SyncGetZoneZonename { + + public static void main(String[] args) throws Exception { + syncGetZoneZonename(); + } + + public static void syncGetZoneZonename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + Zone response = gDCHardwareManagementClient.getZone(name); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_Zonename_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/AsyncListChangeLogEntries.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/AsyncListChangeLogEntries.java new file mode 100644 index 000000000000..d211a96824b3 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/AsyncListChangeLogEntries.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class AsyncListChangeLogEntries { + + public static void main(String[] args) throws Exception { + asyncListChangeLogEntries(); + } + + public static void asyncListChangeLogEntries() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListChangeLogEntriesRequest request = + ListChangeLogEntriesRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + gDCHardwareManagementClient.listChangeLogEntriesPagedCallable().futureCall(request); + // Do something. + for (ChangeLogEntry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/AsyncListChangeLogEntriesPaged.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/AsyncListChangeLogEntriesPaged.java new file mode 100644 index 000000000000..ab9f69594df0 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/AsyncListChangeLogEntriesPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_Paged_async] +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.common.base.Strings; + +public class AsyncListChangeLogEntriesPaged { + + public static void main(String[] args) throws Exception { + asyncListChangeLogEntriesPaged(); + } + + public static void asyncListChangeLogEntriesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListChangeLogEntriesRequest request = + ListChangeLogEntriesRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListChangeLogEntriesResponse response = + gDCHardwareManagementClient.listChangeLogEntriesCallable().call(request); + for (ChangeLogEntry element : response.getChangeLogEntriesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_Paged_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/SyncListChangeLogEntries.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/SyncListChangeLogEntries.java new file mode 100644 index 000000000000..c6cdf80e44ee --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/SyncListChangeLogEntries.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncListChangeLogEntries { + + public static void main(String[] args) throws Exception { + syncListChangeLogEntries(); + } + + public static void syncListChangeLogEntries() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListChangeLogEntriesRequest request = + ListChangeLogEntriesRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (ChangeLogEntry element : + gDCHardwareManagementClient.listChangeLogEntries(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/SyncListChangeLogEntriesOrdername.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/SyncListChangeLogEntriesOrdername.java new file mode 100644 index 000000000000..463db01f8238 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/SyncListChangeLogEntriesOrdername.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_Ordername_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncListChangeLogEntriesOrdername { + + public static void main(String[] args) throws Exception { + syncListChangeLogEntriesOrdername(); + } + + public static void syncListChangeLogEntriesOrdername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + for (ChangeLogEntry element : + gDCHardwareManagementClient.listChangeLogEntries(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_Ordername_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/SyncListChangeLogEntriesString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/SyncListChangeLogEntriesString.java new file mode 100644 index 000000000000..db9f34617f75 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listchangelogentries/SyncListChangeLogEntriesString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncListChangeLogEntriesString { + + public static void main(String[] args) throws Exception { + syncListChangeLogEntriesString(); + } + + public static void syncListChangeLogEntriesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString(); + for (ChangeLogEntry element : + gDCHardwareManagementClient.listChangeLogEntries(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/AsyncListComments.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/AsyncListComments.java new file mode 100644 index 000000000000..454ad441d0d0 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/AsyncListComments.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class AsyncListComments { + + public static void main(String[] args) throws Exception { + asyncListComments(); + } + + public static void asyncListComments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListCommentsRequest request = + ListCommentsRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + gDCHardwareManagementClient.listCommentsPagedCallable().futureCall(request); + // Do something. + for (Comment element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/AsyncListCommentsPaged.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/AsyncListCommentsPaged.java new file mode 100644 index 000000000000..2fccc9466247 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/AsyncListCommentsPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_Paged_async] +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.common.base.Strings; + +public class AsyncListCommentsPaged { + + public static void main(String[] args) throws Exception { + asyncListCommentsPaged(); + } + + public static void asyncListCommentsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListCommentsRequest request = + ListCommentsRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListCommentsResponse response = + gDCHardwareManagementClient.listCommentsCallable().call(request); + for (Comment element : response.getCommentsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_Paged_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/SyncListComments.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/SyncListComments.java new file mode 100644 index 000000000000..951b5651e2e5 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/SyncListComments.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncListComments { + + public static void main(String[] args) throws Exception { + syncListComments(); + } + + public static void syncListComments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListCommentsRequest request = + ListCommentsRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Comment element : gDCHardwareManagementClient.listComments(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/SyncListCommentsOrdername.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/SyncListCommentsOrdername.java new file mode 100644 index 000000000000..f4825ca4c1cd --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/SyncListCommentsOrdername.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_Ordername_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncListCommentsOrdername { + + public static void main(String[] args) throws Exception { + syncListCommentsOrdername(); + } + + public static void syncListCommentsOrdername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + for (Comment element : gDCHardwareManagementClient.listComments(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_Ordername_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/SyncListCommentsString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/SyncListCommentsString.java new file mode 100644 index 000000000000..f46ebbbf1989 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listcomments/SyncListCommentsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.Comment; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncListCommentsString { + + public static void main(String[] args) throws Exception { + syncListCommentsString(); + } + + public static void syncListCommentsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString(); + for (Comment element : gDCHardwareManagementClient.listComments(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/AsyncListHardware.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/AsyncListHardware.java new file mode 100644 index 000000000000..c8a585b86d3b --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/AsyncListHardware.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; + +public class AsyncListHardware { + + public static void main(String[] args) throws Exception { + asyncListHardware(); + } + + public static void asyncListHardware() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListHardwareRequest request = + ListHardwareRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + gDCHardwareManagementClient.listHardwarePagedCallable().futureCall(request); + // Do something. + for (Hardware element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/AsyncListHardwarePaged.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/AsyncListHardwarePaged.java new file mode 100644 index 000000000000..61126cd1b55f --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/AsyncListHardwarePaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_Paged_async] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.common.base.Strings; + +public class AsyncListHardwarePaged { + + public static void main(String[] args) throws Exception { + asyncListHardwarePaged(); + } + + public static void asyncListHardwarePaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListHardwareRequest request = + ListHardwareRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListHardwareResponse response = + gDCHardwareManagementClient.listHardwareCallable().call(request); + for (Hardware element : response.getHardwareList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_Paged_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/SyncListHardware.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/SyncListHardware.java new file mode 100644 index 000000000000..c7abd609aa66 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/SyncListHardware.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; + +public class SyncListHardware { + + public static void main(String[] args) throws Exception { + syncListHardware(); + } + + public static void syncListHardware() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListHardwareRequest request = + ListHardwareRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Hardware element : gDCHardwareManagementClient.listHardware(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/SyncListHardwareLocationname.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/SyncListHardwareLocationname.java new file mode 100644 index 000000000000..c1d872b619fa --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/SyncListHardwareLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_Locationname_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; + +public class SyncListHardwareLocationname { + + public static void main(String[] args) throws Exception { + syncListHardwareLocationname(); + } + + public static void syncListHardwareLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Hardware element : gDCHardwareManagementClient.listHardware(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_Locationname_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/SyncListHardwareString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/SyncListHardwareString.java new file mode 100644 index 000000000000..9bb16124fd9a --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardware/SyncListHardwareString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; + +public class SyncListHardwareString { + + public static void main(String[] args) throws Exception { + syncListHardwareString(); + } + + public static void syncListHardwareString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Hardware element : gDCHardwareManagementClient.listHardware(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/AsyncListHardwareGroups.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/AsyncListHardwareGroups.java new file mode 100644 index 000000000000..9bb243d9d60f --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/AsyncListHardwareGroups.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class AsyncListHardwareGroups { + + public static void main(String[] args) throws Exception { + asyncListHardwareGroups(); + } + + public static void asyncListHardwareGroups() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListHardwareGroupsRequest request = + ListHardwareGroupsRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + gDCHardwareManagementClient.listHardwareGroupsPagedCallable().futureCall(request); + // Do something. + for (HardwareGroup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/AsyncListHardwareGroupsPaged.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/AsyncListHardwareGroupsPaged.java new file mode 100644 index 000000000000..1cad6b3dbf12 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/AsyncListHardwareGroupsPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_Paged_async] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.common.base.Strings; + +public class AsyncListHardwareGroupsPaged { + + public static void main(String[] args) throws Exception { + asyncListHardwareGroupsPaged(); + } + + public static void asyncListHardwareGroupsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListHardwareGroupsRequest request = + ListHardwareGroupsRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListHardwareGroupsResponse response = + gDCHardwareManagementClient.listHardwareGroupsCallable().call(request); + for (HardwareGroup element : response.getHardwareGroupsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_Paged_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/SyncListHardwareGroups.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/SyncListHardwareGroups.java new file mode 100644 index 000000000000..f87127647cd9 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/SyncListHardwareGroups.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncListHardwareGroups { + + public static void main(String[] args) throws Exception { + syncListHardwareGroups(); + } + + public static void syncListHardwareGroups() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListHardwareGroupsRequest request = + ListHardwareGroupsRequest.newBuilder() + .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (HardwareGroup element : + gDCHardwareManagementClient.listHardwareGroups(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/SyncListHardwareGroupsOrdername.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/SyncListHardwareGroupsOrdername.java new file mode 100644 index 000000000000..584c2e42d389 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/SyncListHardwareGroupsOrdername.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_Ordername_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncListHardwareGroupsOrdername { + + public static void main(String[] args) throws Exception { + syncListHardwareGroupsOrdername(); + } + + public static void syncListHardwareGroupsOrdername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + for (HardwareGroup element : + gDCHardwareManagementClient.listHardwareGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_Ordername_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/SyncListHardwareGroupsString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/SyncListHardwareGroupsString.java new file mode 100644 index 000000000000..6cd09c60a8ed --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listhardwaregroups/SyncListHardwareGroupsString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncListHardwareGroupsString { + + public static void main(String[] args) throws Exception { + syncListHardwareGroupsString(); + } + + public static void syncListHardwareGroupsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString(); + for (HardwareGroup element : + gDCHardwareManagementClient.listHardwareGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listlocations/AsyncListLocations.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..8c77c2b2a48b --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +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 (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + gDCHardwareManagementClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListLocations_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listlocations/AsyncListLocationsPaged.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..23c1658866fe --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListLocations_Paged_async] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +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 (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + gDCHardwareManagementClient.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListLocations_Paged_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listlocations/SyncListLocations.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..048f99e0aba7 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listlocations/SyncListLocations.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListLocations_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +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 (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : gDCHardwareManagementClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListLocations_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/AsyncListOrders.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/AsyncListOrders.java new file mode 100644 index 000000000000..8059e1b657fe --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/AsyncListOrders.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; + +public class AsyncListOrders { + + public static void main(String[] args) throws Exception { + asyncListOrders(); + } + + public static void asyncListOrders() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListOrdersRequest request = + ListOrdersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + gDCHardwareManagementClient.listOrdersPagedCallable().futureCall(request); + // Do something. + for (Order element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/AsyncListOrdersPaged.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/AsyncListOrdersPaged.java new file mode 100644 index 000000000000..345f8bd9bfe3 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/AsyncListOrdersPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_Paged_async] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.common.base.Strings; + +public class AsyncListOrdersPaged { + + public static void main(String[] args) throws Exception { + asyncListOrdersPaged(); + } + + public static void asyncListOrdersPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListOrdersRequest request = + ListOrdersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListOrdersResponse response = + gDCHardwareManagementClient.listOrdersCallable().call(request); + for (Order element : response.getOrdersList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_Paged_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/SyncListOrders.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/SyncListOrders.java new file mode 100644 index 000000000000..8f36c398a4be --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/SyncListOrders.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; + +public class SyncListOrders { + + public static void main(String[] args) throws Exception { + syncListOrders(); + } + + public static void syncListOrders() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListOrdersRequest request = + ListOrdersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Order element : gDCHardwareManagementClient.listOrders(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/SyncListOrdersLocationname.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/SyncListOrdersLocationname.java new file mode 100644 index 000000000000..87baf4cf58ac --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/SyncListOrdersLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_Locationname_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; + +public class SyncListOrdersLocationname { + + public static void main(String[] args) throws Exception { + syncListOrdersLocationname(); + } + + public static void syncListOrdersLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Order element : gDCHardwareManagementClient.listOrders(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_Locationname_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/SyncListOrdersString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/SyncListOrdersString.java new file mode 100644 index 000000000000..72bd81b7201c --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listorders/SyncListOrdersString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; + +public class SyncListOrdersString { + + public static void main(String[] args) throws Exception { + syncListOrdersString(); + } + + public static void syncListOrdersString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Order element : gDCHardwareManagementClient.listOrders(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/AsyncListSites.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/AsyncListSites.java new file mode 100644 index 000000000000..eb7ad1949be0 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/AsyncListSites.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; + +public class AsyncListSites { + + public static void main(String[] args) throws Exception { + asyncListSites(); + } + + public static void asyncListSites() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListSitesRequest request = + ListSitesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + gDCHardwareManagementClient.listSitesPagedCallable().futureCall(request); + // Do something. + for (Site element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/AsyncListSitesPaged.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/AsyncListSitesPaged.java new file mode 100644 index 000000000000..83d96a6ac431 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/AsyncListSitesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_Paged_async] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.common.base.Strings; + +public class AsyncListSitesPaged { + + public static void main(String[] args) throws Exception { + asyncListSitesPaged(); + } + + public static void asyncListSitesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListSitesRequest request = + ListSitesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListSitesResponse response = gDCHardwareManagementClient.listSitesCallable().call(request); + for (Site element : response.getSitesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_Paged_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/SyncListSites.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/SyncListSites.java new file mode 100644 index 000000000000..694efb45d276 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/SyncListSites.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; + +public class SyncListSites { + + public static void main(String[] args) throws Exception { + syncListSites(); + } + + public static void syncListSites() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListSitesRequest request = + ListSitesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Site element : gDCHardwareManagementClient.listSites(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/SyncListSitesLocationname.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/SyncListSitesLocationname.java new file mode 100644 index 000000000000..0c092213382f --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/SyncListSitesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_Locationname_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; + +public class SyncListSitesLocationname { + + public static void main(String[] args) throws Exception { + syncListSitesLocationname(); + } + + public static void syncListSitesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Site element : gDCHardwareManagementClient.listSites(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_Locationname_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/SyncListSitesString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/SyncListSitesString.java new file mode 100644 index 000000000000..a5597095cc81 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listsites/SyncListSitesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; + +public class SyncListSitesString { + + public static void main(String[] args) throws Exception { + syncListSitesString(); + } + + public static void syncListSitesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Site element : gDCHardwareManagementClient.listSites(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/AsyncListSkus.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/AsyncListSkus.java new file mode 100644 index 000000000000..831e02e624a7 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/AsyncListSkus.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; + +public class AsyncListSkus { + + public static void main(String[] args) throws Exception { + asyncListSkus(); + } + + public static void asyncListSkus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListSkusRequest request = + ListSkusRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + gDCHardwareManagementClient.listSkusPagedCallable().futureCall(request); + // Do something. + for (Sku element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/AsyncListSkusPaged.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/AsyncListSkusPaged.java new file mode 100644 index 000000000000..34a7eac7cde5 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/AsyncListSkusPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_Paged_async] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; +import com.google.common.base.Strings; + +public class AsyncListSkusPaged { + + public static void main(String[] args) throws Exception { + asyncListSkusPaged(); + } + + public static void asyncListSkusPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListSkusRequest request = + ListSkusRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListSkusResponse response = gDCHardwareManagementClient.listSkusCallable().call(request); + for (Sku element : response.getSkusList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_Paged_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/SyncListSkus.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/SyncListSkus.java new file mode 100644 index 000000000000..01e33f38d359 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/SyncListSkus.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; + +public class SyncListSkus { + + public static void main(String[] args) throws Exception { + syncListSkus(); + } + + public static void syncListSkus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListSkusRequest request = + ListSkusRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Sku element : gDCHardwareManagementClient.listSkus(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/SyncListSkusLocationname.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/SyncListSkusLocationname.java new file mode 100644 index 000000000000..e98db09f0b33 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/SyncListSkusLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_Locationname_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; + +public class SyncListSkusLocationname { + + public static void main(String[] args) throws Exception { + syncListSkusLocationname(); + } + + public static void syncListSkusLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Sku element : gDCHardwareManagementClient.listSkus(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_Locationname_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/SyncListSkusString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/SyncListSkusString.java new file mode 100644 index 000000000000..93098790049e --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listskus/SyncListSkusString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Sku; + +public class SyncListSkusString { + + public static void main(String[] args) throws Exception { + syncListSkusString(); + } + + public static void syncListSkusString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Sku element : gDCHardwareManagementClient.listSkus(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/AsyncListZones.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/AsyncListZones.java new file mode 100644 index 000000000000..1e784a21cf09 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/AsyncListZones.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; + +public class AsyncListZones { + + public static void main(String[] args) throws Exception { + asyncListZones(); + } + + public static void asyncListZones() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListZonesRequest request = + ListZonesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + gDCHardwareManagementClient.listZonesPagedCallable().futureCall(request); + // Do something. + for (Zone element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/AsyncListZonesPaged.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/AsyncListZonesPaged.java new file mode 100644 index 000000000000..19e0cb04264f --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/AsyncListZonesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_Paged_async] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.common.base.Strings; + +public class AsyncListZonesPaged { + + public static void main(String[] args) throws Exception { + asyncListZonesPaged(); + } + + public static void asyncListZonesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListZonesRequest request = + ListZonesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListZonesResponse response = gDCHardwareManagementClient.listZonesCallable().call(request); + for (Zone element : response.getZonesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_Paged_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/SyncListZones.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/SyncListZones.java new file mode 100644 index 000000000000..0cc7418eb722 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/SyncListZones.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; + +public class SyncListZones { + + public static void main(String[] args) throws Exception { + syncListZones(); + } + + public static void syncListZones() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ListZonesRequest request = + ListZonesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Zone element : gDCHardwareManagementClient.listZones(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/SyncListZonesLocationname.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/SyncListZonesLocationname.java new file mode 100644 index 000000000000..347d0baa9aa6 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/SyncListZonesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_Locationname_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; + +public class SyncListZonesLocationname { + + public static void main(String[] args) throws Exception { + syncListZonesLocationname(); + } + + public static void syncListZonesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Zone element : gDCHardwareManagementClient.listZones(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_Locationname_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/SyncListZonesString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/SyncListZonesString.java new file mode 100644 index 000000000000..792c7db417c5 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/listzones/SyncListZonesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.LocationName; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; + +public class SyncListZonesString { + + public static void main(String[] args) throws Exception { + syncListZonesString(); + } + + public static void syncListZonesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Zone element : gDCHardwareManagementClient.listZones(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/AsyncSignalZoneState.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/AsyncSignalZoneState.java new file mode 100644 index 000000000000..0a5a8fab71f1 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/AsyncSignalZoneState.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; +import com.google.longrunning.Operation; + +public class AsyncSignalZoneState { + + public static void main(String[] args) throws Exception { + asyncSignalZoneState(); + } + + public static void asyncSignalZoneState() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + SignalZoneStateRequest request = + SignalZoneStateRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.signalZoneStateCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/AsyncSignalZoneStateLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/AsyncSignalZoneStateLRO.java new file mode 100644 index 000000000000..0f995f5ad735 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/AsyncSignalZoneStateLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; + +public class AsyncSignalZoneStateLRO { + + public static void main(String[] args) throws Exception { + asyncSignalZoneStateLRO(); + } + + public static void asyncSignalZoneStateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + SignalZoneStateRequest request = + SignalZoneStateRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.signalZoneStateOperationCallable().futureCall(request); + // Do something. + Zone response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/SyncSignalZoneState.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/SyncSignalZoneState.java new file mode 100644 index 000000000000..db5ec069d293 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/SyncSignalZoneState.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; + +public class SyncSignalZoneState { + + public static void main(String[] args) throws Exception { + syncSignalZoneState(); + } + + public static void syncSignalZoneState() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + SignalZoneStateRequest request = + SignalZoneStateRequest.newBuilder() + .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) + .setRequestId("requestId693933066") + .build(); + Zone response = gDCHardwareManagementClient.signalZoneStateAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/SyncSignalZoneStateStringSignalzonestaterequeststatesignal.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/SyncSignalZoneStateStringSignalzonestaterequeststatesignal.java new file mode 100644 index 000000000000..8c689eac023d --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/SyncSignalZoneStateStringSignalzonestaterequeststatesignal.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_StringSignalzonestaterequeststatesignal_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; + +public class SyncSignalZoneStateStringSignalzonestaterequeststatesignal { + + public static void main(String[] args) throws Exception { + syncSignalZoneStateStringSignalzonestaterequeststatesignal(); + } + + public static void syncSignalZoneStateStringSignalzonestaterequeststatesignal() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); + SignalZoneStateRequest.StateSignal stateSignal = + SignalZoneStateRequest.StateSignal.forNumber(0); + Zone response = gDCHardwareManagementClient.signalZoneStateAsync(name, stateSignal).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_StringSignalzonestaterequeststatesignal_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/SyncSignalZoneStateZonenameSignalzonestaterequeststatesignal.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/SyncSignalZoneStateZonenameSignalzonestaterequeststatesignal.java new file mode 100644 index 000000000000..7f189073f75c --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/signalzonestate/SyncSignalZoneStateZonenameSignalzonestaterequeststatesignal.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_ZonenameSignalzonestaterequeststatesignal_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.cloud.gdchardwaremanagement.v1alpha.ZoneName; + +public class SyncSignalZoneStateZonenameSignalzonestaterequeststatesignal { + + public static void main(String[] args) throws Exception { + syncSignalZoneStateZonenameSignalzonestaterequeststatesignal(); + } + + public static void syncSignalZoneStateZonenameSignalzonestaterequeststatesignal() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); + SignalZoneStateRequest.StateSignal stateSignal = + SignalZoneStateRequest.StateSignal.forNumber(0); + Zone response = gDCHardwareManagementClient.signalZoneStateAsync(name, stateSignal).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_ZonenameSignalzonestaterequeststatesignal_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/AsyncSubmitOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/AsyncSubmitOrder.java new file mode 100644 index 000000000000..9f3f1c87d768 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/AsyncSubmitOrder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest; +import com.google.longrunning.Operation; + +public class AsyncSubmitOrder { + + public static void main(String[] args) throws Exception { + asyncSubmitOrder(); + } + + public static void asyncSubmitOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + SubmitOrderRequest request = + SubmitOrderRequest.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.submitOrderCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/AsyncSubmitOrderLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/AsyncSubmitOrderLRO.java new file mode 100644 index 000000000000..7dd55db6686e --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/AsyncSubmitOrderLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest; + +public class AsyncSubmitOrderLRO { + + public static void main(String[] args) throws Exception { + asyncSubmitOrderLRO(); + } + + public static void asyncSubmitOrderLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + SubmitOrderRequest request = + SubmitOrderRequest.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.submitOrderOperationCallable().futureCall(request); + // Do something. + Order response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/SyncSubmitOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/SyncSubmitOrder.java new file mode 100644 index 000000000000..bc09fa48a178 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/SyncSubmitOrder.java @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; +import com.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest; + +public class SyncSubmitOrder { + + public static void main(String[] args) throws Exception { + syncSubmitOrder(); + } + + public static void syncSubmitOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + SubmitOrderRequest request = + SubmitOrderRequest.newBuilder() + .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + .setRequestId("requestId693933066") + .build(); + Order response = gDCHardwareManagementClient.submitOrderAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/SyncSubmitOrderOrdername.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/SyncSubmitOrderOrdername.java new file mode 100644 index 000000000000..1c2ce39cbb76 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/SyncSubmitOrderOrdername.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_Ordername_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncSubmitOrderOrdername { + + public static void main(String[] args) throws Exception { + syncSubmitOrderOrdername(); + } + + public static void syncSubmitOrderOrdername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + Order response = gDCHardwareManagementClient.submitOrderAsync(name).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_Ordername_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/SyncSubmitOrderString.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/SyncSubmitOrderString.java new file mode 100644 index 000000000000..084107f300e3 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/submitorder/SyncSubmitOrderString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_String_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.OrderName; + +public class SyncSubmitOrderString { + + public static void main(String[] args) throws Exception { + syncSubmitOrderString(); + } + + public static void syncSubmitOrderString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + String name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString(); + Order response = gDCHardwareManagementClient.submitOrderAsync(name).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_String_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/AsyncUpdateHardware.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/AsyncUpdateHardware.java new file mode 100644 index 000000000000..c4872bdb4ca9 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/AsyncUpdateHardware.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateHardware { + + public static void main(String[] args) throws Exception { + asyncUpdateHardware(); + } + + public static void asyncUpdateHardware() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateHardwareRequest request = + UpdateHardwareRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHardware(Hardware.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.updateHardwareCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/AsyncUpdateHardwareLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/AsyncUpdateHardwareLRO.java new file mode 100644 index 000000000000..b15e16fb630b --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/AsyncUpdateHardwareLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateHardwareLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateHardwareLRO(); + } + + public static void asyncUpdateHardwareLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateHardwareRequest request = + UpdateHardwareRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHardware(Hardware.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.updateHardwareOperationCallable().futureCall(request); + // Do something. + Hardware response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/SyncUpdateHardware.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/SyncUpdateHardware.java new file mode 100644 index 000000000000..6e69a4188356 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/SyncUpdateHardware.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateHardware { + + public static void main(String[] args) throws Exception { + syncUpdateHardware(); + } + + public static void syncUpdateHardware() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateHardwareRequest request = + UpdateHardwareRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHardware(Hardware.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Hardware response = gDCHardwareManagementClient.updateHardwareAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/SyncUpdateHardwareHardwareFieldmask.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/SyncUpdateHardwareHardwareFieldmask.java new file mode 100644 index 000000000000..2a52096f51d5 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardware/SyncUpdateHardwareHardwareFieldmask.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_HardwareFieldmask_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Hardware; +import com.google.protobuf.FieldMask; + +public class SyncUpdateHardwareHardwareFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateHardwareHardwareFieldmask(); + } + + public static void syncUpdateHardwareHardwareFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + Hardware hardware = Hardware.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Hardware response = + gDCHardwareManagementClient.updateHardwareAsync(hardware, updateMask).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_HardwareFieldmask_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/AsyncUpdateHardwareGroup.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/AsyncUpdateHardwareGroup.java new file mode 100644 index 000000000000..b246521ffc94 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/AsyncUpdateHardwareGroup.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateHardwareGroup { + + public static void main(String[] args) throws Exception { + asyncUpdateHardwareGroup(); + } + + public static void asyncUpdateHardwareGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateHardwareGroupRequest request = + UpdateHardwareGroupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHardwareGroup(HardwareGroup.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.updateHardwareGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/AsyncUpdateHardwareGroupLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/AsyncUpdateHardwareGroupLRO.java new file mode 100644 index 000000000000..a0626ba35da9 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/AsyncUpdateHardwareGroupLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateHardwareGroupLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateHardwareGroupLRO(); + } + + public static void asyncUpdateHardwareGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateHardwareGroupRequest request = + UpdateHardwareGroupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHardwareGroup(HardwareGroup.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.updateHardwareGroupOperationCallable().futureCall(request); + // Do something. + HardwareGroup response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/SyncUpdateHardwareGroup.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/SyncUpdateHardwareGroup.java new file mode 100644 index 000000000000..46d3fb1bc700 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/SyncUpdateHardwareGroup.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateHardwareGroup { + + public static void main(String[] args) throws Exception { + syncUpdateHardwareGroup(); + } + + public static void syncUpdateHardwareGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateHardwareGroupRequest request = + UpdateHardwareGroupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHardwareGroup(HardwareGroup.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + HardwareGroup response = gDCHardwareManagementClient.updateHardwareGroupAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/SyncUpdateHardwareGroupHardwaregroupFieldmask.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/SyncUpdateHardwareGroupHardwaregroupFieldmask.java new file mode 100644 index 000000000000..79437b0142d0 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatehardwaregroup/SyncUpdateHardwareGroupHardwaregroupFieldmask.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_HardwaregroupFieldmask_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup; +import com.google.protobuf.FieldMask; + +public class SyncUpdateHardwareGroupHardwaregroupFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateHardwareGroupHardwaregroupFieldmask(); + } + + public static void syncUpdateHardwareGroupHardwaregroupFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + HardwareGroup response = + gDCHardwareManagementClient.updateHardwareGroupAsync(hardwareGroup, updateMask).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_HardwaregroupFieldmask_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/AsyncUpdateOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/AsyncUpdateOrder.java new file mode 100644 index 000000000000..c1d3ec64e100 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/AsyncUpdateOrder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateOrder { + + public static void main(String[] args) throws Exception { + asyncUpdateOrder(); + } + + public static void asyncUpdateOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateOrderRequest request = + UpdateOrderRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setOrder(Order.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.updateOrderCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/AsyncUpdateOrderLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/AsyncUpdateOrderLRO.java new file mode 100644 index 000000000000..b7518c7bbf5a --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/AsyncUpdateOrderLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateOrderLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateOrderLRO(); + } + + public static void asyncUpdateOrderLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateOrderRequest request = + UpdateOrderRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setOrder(Order.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.updateOrderOperationCallable().futureCall(request); + // Do something. + Order response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/SyncUpdateOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/SyncUpdateOrder.java new file mode 100644 index 000000000000..7d6d403fa6c7 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/SyncUpdateOrder.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateOrder { + + public static void main(String[] args) throws Exception { + syncUpdateOrder(); + } + + public static void syncUpdateOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateOrderRequest request = + UpdateOrderRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setOrder(Order.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Order response = gDCHardwareManagementClient.updateOrderAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/SyncUpdateOrderOrderFieldmask.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/SyncUpdateOrderOrderFieldmask.java new file mode 100644 index 000000000000..21fa269a9b79 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updateorder/SyncUpdateOrderOrderFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_OrderFieldmask_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Order; +import com.google.protobuf.FieldMask; + +public class SyncUpdateOrderOrderFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateOrderOrderFieldmask(); + } + + public static void syncUpdateOrderOrderFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + Order order = Order.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Order response = gDCHardwareManagementClient.updateOrderAsync(order, updateMask).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_OrderFieldmask_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/AsyncUpdateSite.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/AsyncUpdateSite.java new file mode 100644 index 000000000000..257481dfb984 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/AsyncUpdateSite.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSite { + + public static void main(String[] args) throws Exception { + asyncUpdateSite(); + } + + public static void asyncUpdateSite() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateSiteRequest request = + UpdateSiteRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSite(Site.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.updateSiteCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/AsyncUpdateSiteLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/AsyncUpdateSiteLRO.java new file mode 100644 index 000000000000..19a9e83e00fc --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/AsyncUpdateSiteLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSiteLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateSiteLRO(); + } + + public static void asyncUpdateSiteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateSiteRequest request = + UpdateSiteRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSite(Site.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.updateSiteOperationCallable().futureCall(request); + // Do something. + Site response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/SyncUpdateSite.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/SyncUpdateSite.java new file mode 100644 index 000000000000..ae3b827816fb --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/SyncUpdateSite.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSite { + + public static void main(String[] args) throws Exception { + syncUpdateSite(); + } + + public static void syncUpdateSite() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateSiteRequest request = + UpdateSiteRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSite(Site.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Site response = gDCHardwareManagementClient.updateSiteAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/SyncUpdateSiteSiteFieldmask.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/SyncUpdateSiteSiteFieldmask.java new file mode 100644 index 000000000000..7e036a8727f3 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatesite/SyncUpdateSiteSiteFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_SiteFieldmask_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Site; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSiteSiteFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSiteSiteFieldmask(); + } + + public static void syncUpdateSiteSiteFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + Site site = Site.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Site response = gDCHardwareManagementClient.updateSiteAsync(site, updateMask).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_SiteFieldmask_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/AsyncUpdateZone.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/AsyncUpdateZone.java new file mode 100644 index 000000000000..6d5fa6565bbd --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/AsyncUpdateZone.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateZone { + + public static void main(String[] args) throws Exception { + asyncUpdateZone(); + } + + public static void asyncUpdateZone() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateZoneRequest request = + UpdateZoneRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setZone(Zone.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + gDCHardwareManagementClient.updateZoneCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/AsyncUpdateZoneLRO.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/AsyncUpdateZoneLRO.java new file mode 100644 index 000000000000..5612e8315a71 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/AsyncUpdateZoneLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateZoneLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateZoneLRO(); + } + + public static void asyncUpdateZoneLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateZoneRequest request = + UpdateZoneRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setZone(Zone.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + gDCHardwareManagementClient.updateZoneOperationCallable().futureCall(request); + // Do something. + Zone response = future.get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_LRO_async] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/SyncUpdateZone.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/SyncUpdateZone.java new file mode 100644 index 000000000000..ce2b5bd1e3bf --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/SyncUpdateZone.java @@ -0,0 +1,49 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.protobuf.FieldMask; + +public class SyncUpdateZone { + + public static void main(String[] args) throws Exception { + syncUpdateZone(); + } + + public static void syncUpdateZone() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + UpdateZoneRequest request = + UpdateZoneRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setZone(Zone.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Zone response = gDCHardwareManagementClient.updateZoneAsync(request).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/SyncUpdateZoneZoneFieldmask.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/SyncUpdateZoneZoneFieldmask.java new file mode 100644 index 000000000000..59d96832937b --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagement/updatezone/SyncUpdateZoneZoneFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_ZoneFieldmask_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient; +import com.google.cloud.gdchardwaremanagement.v1alpha.Zone; +import com.google.protobuf.FieldMask; + +public class SyncUpdateZoneZoneFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateZoneZoneFieldmask(); + } + + public static void syncUpdateZoneZoneFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (GDCHardwareManagementClient gDCHardwareManagementClient = + GDCHardwareManagementClient.create()) { + Zone zone = Zone.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Zone response = gDCHardwareManagementClient.updateZoneAsync(zone, updateMask).get(); + } + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_ZoneFieldmask_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagementsettings/getorder/SyncGetOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagementsettings/getorder/SyncGetOrder.java new file mode 100644 index 000000000000..c432cb08e016 --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/gdchardwaremanagementsettings/getorder/SyncGetOrder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagementSettings_GetOrder_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementSettings; +import java.time.Duration; + +public class SyncGetOrder { + + public static void main(String[] args) throws Exception { + syncGetOrder(); + } + + public static void syncGetOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GDCHardwareManagementSettings.Builder gDCHardwareManagementSettingsBuilder = + GDCHardwareManagementSettings.newBuilder(); + gDCHardwareManagementSettingsBuilder + .getOrderSettings() + .setRetrySettings( + gDCHardwareManagementSettingsBuilder + .getOrderSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GDCHardwareManagementSettings gDCHardwareManagementSettings = + gDCHardwareManagementSettingsBuilder.build(); + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagementSettings_GetOrder_sync] diff --git a/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/stub/gdchardwaremanagementstubsettings/getorder/SyncGetOrder.java b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/stub/gdchardwaremanagementstubsettings/getorder/SyncGetOrder.java new file mode 100644 index 000000000000..68c4abfcb0eb --- /dev/null +++ b/java-gdchardwaremanagement/samples/snippets/generated/com/google/cloud/gdchardwaremanagement/v1alpha/stub/gdchardwaremanagementstubsettings/getorder/SyncGetOrder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.gdchardwaremanagement.v1alpha.stub.samples; + +// [START gdchardwaremanagement_v1alpha_generated_GDCHardwareManagementStubSettings_GetOrder_sync] +import com.google.cloud.gdchardwaremanagement.v1alpha.stub.GDCHardwareManagementStubSettings; +import java.time.Duration; + +public class SyncGetOrder { + + public static void main(String[] args) throws Exception { + syncGetOrder(); + } + + public static void syncGetOrder() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + GDCHardwareManagementStubSettings.Builder gDCHardwareManagementSettingsBuilder = + GDCHardwareManagementStubSettings.newBuilder(); + gDCHardwareManagementSettingsBuilder + .getOrderSettings() + .setRetrySettings( + gDCHardwareManagementSettingsBuilder + .getOrderSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GDCHardwareManagementStubSettings gDCHardwareManagementSettings = + gDCHardwareManagementSettingsBuilder.build(); + } +} +// [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagementStubSettings_GetOrder_sync] diff --git a/pom.xml b/pom.xml index f7c98c76192a..43fbf9c62083 100644 --- a/pom.xml +++ b/pom.xml @@ -97,6 +97,7 @@ java-eventarc-publishing java-filestore java-functions + java-gdchardwaremanagement java-gke-backup java-gke-connect-gateway java-gke-multi-cloud diff --git a/versions.txt b/versions.txt index 77567948fd30..04b5c14f3fc8 100644 --- a/versions.txt +++ b/versions.txt @@ -797,3 +797,6 @@ grpc-google-cloud-networkservices-v1:0.1.0:0.2.0-SNAPSHOT google-shopping-merchant-products:0.1.0:0.2.0-SNAPSHOT proto-google-shopping-merchant-products-v1beta:0.1.0:0.2.0-SNAPSHOT grpc-google-shopping-merchant-products-v1beta:0.1.0:0.2.0-SNAPSHOT +google-cloud-gdchardwaremanagement:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-gdchardwaremanagement-v1alpha:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-gdchardwaremanagement-v1alpha:0.0.0:0.0.1-SNAPSHOT