diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 7e3e5abe964e..c6972399bbad 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -672,6 +672,13 @@ pom import + + com.google.shopping + google-shopping-merchant-reports-bom + 0.0.1-SNAPSHOT + pom + import + com.google.cloud google-cloud-migrationcenter-bom diff --git a/java-merchantapi/.OwlBot.yaml b/java-merchantapi/.OwlBot.yaml new file mode 100644 index 000000000000..a412cf5c3509 --- /dev/null +++ b/java-merchantapi/.OwlBot.yaml @@ -0,0 +1,36 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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-merchantapi/grpc-google-.*/src" +- "/java-merchantapi/proto-google-.*/src" +- "/java-merchantapi/google-.*/src" +- "/java-merchantapi/samples/snippets/generated" + +deep-preserve-regex: +- "/java-merchantapi/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/shopping/merchant/reports/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-merchantapi/$1/proto-google-shopping-merchant-reports-$1/src" +- source: "/google/shopping/merchant/reports/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-merchantapi/$1/grpc-google-shopping-merchant-reports-$1/src" +- source: "/google/shopping/merchant/reports/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-merchantapi/$1/google-shopping-merchant-reports/src" +- source: "/google/shopping/merchant/reports/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-merchantapi/$1/samples/snippets/generated" + + +api-name: merchantapi \ No newline at end of file diff --git a/java-merchantapi/.repo-metadata.json b/java-merchantapi/.repo-metadata.json new file mode 100644 index 000000000000..1452444d1fc4 --- /dev/null +++ b/java-merchantapi/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "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-reports/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-merchantapi", + "repo_short": "java-merchantapi", + "distribution_name": "com.google.shopping:google-shopping-merchant-reports", + "api_id": "merchantapi.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-merchantapi/README.md b/java-merchantapi/README.md new file mode 100644 index 000000000000..8cb002d0dec6 --- /dev/null +++ b/java-merchantapi/README.md @@ -0,0 +1,225 @@ +# Google Merchant API Client for Java + +Java idiomatic client for [Merchant 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.22.0 + pom + import + + + + + + + com.google.shopping + google-shopping-merchant-reports + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + + +```xml + + com.google.shopping + google-shopping-merchant-reports + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.shopping:google-shopping-merchant-reports:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.shopping" % "google-shopping-merchant-reports" % "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 Merchant API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Merchant API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Merchant API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Merchant 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-shopping-merchant-reports` library. See the [Quickstart](#quickstart) section +to add `google-shopping-merchant-reports` as a dependency in your code. + +## About Merchant API + + +[Merchant API][product-docs] Programmatically manage your Merchant Center accounts. + +See the [Merchant API client library docs][javadocs] to learn how to +use this Merchant API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Merchant API uses gRPC 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://developers.google.com/merchant/api +[javadocs]: https://cloud.google.com/java/docs/reference/google-shopping-merchant-reports/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-merchantapi/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-merchantapi/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-merchantapi/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-merchantapi/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-merchantapi/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-merchantapi/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-merchantapi/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-merchantapi/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-merchantapi/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-merchantapi/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.shopping/google-shopping-merchant-reports.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-reports/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/java-merchantapi/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-merchantapi/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-merchantapi/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=merchantapi.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-merchantapi/google-shopping-merchant-reports-bom/pom.xml b/java-merchantapi/google-shopping-merchant-reports-bom/pom.xml new file mode 100644 index 000000000000..d6e629aa47e6 --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports-bom/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + com.google.shopping + google-shopping-merchant-reports-bom + 0.0.1-SNAPSHOT + pom + + + com.google.cloud + google-cloud-pom-parent + 1.18.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Merchant API BOM + + BOM for Merchant API + + + + true + + + + + + com.google.shopping + google-shopping-merchant-reports + 0.0.1-SNAPSHOT + + + com.google.shopping.api.grpc + grpc-google-shopping-merchant-reports-v1beta + 0.0.1-SNAPSHOT + + + com.google.shopping.api.grpc + proto-google-shopping-merchant-reports-v1beta + 0.0.1-SNAPSHOT + + + + diff --git a/java-merchantapi/google-shopping-merchant-reports/pom.xml b/java-merchantapi/google-shopping-merchant-reports/pom.xml new file mode 100644 index 000000000000..2407bb61f851 --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.shopping + google-shopping-merchant-reports + 0.0.1-SNAPSHOT + jar + Google Merchant API + Merchant API Programmatically manage your Merchant Center accounts. + + com.google.shopping + google-shopping-merchant-reports-parent + 0.0.1-SNAPSHOT + + + google-shopping-merchant-reports + + + + 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.shopping.api.grpc + proto-google-shopping-merchant-reports-v1beta + + + 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.shopping.api.grpc + grpc-google-shopping-merchant-reports-v1beta + 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-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportServiceClient.java b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportServiceClient.java new file mode 100644 index 000000000000..faab42f4dbe8 --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportServiceClient.java @@ -0,0 +1,412 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta; + +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.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.shopping.merchant.reports.v1beta.stub.ReportServiceStub; +import com.google.shopping.merchant.reports.v1beta.stub.ReportServiceStubSettings; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for retrieving reports and insights about your products, their + * performance, and their competitive environment on Google. + * + *

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 (ReportServiceClient reportServiceClient = ReportServiceClient.create()) {
+ *   String parent = "parent-995424086";
+ *   for (ReportRow element : reportServiceClient.search(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

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

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

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 ReportServiceSettings 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
+ * ReportServiceSettings reportServiceSettings =
+ *     ReportServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ReportServiceClient reportServiceClient = ReportServiceClient.create(reportServiceSettings);
+ * }
+ * + *

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
+ * ReportServiceSettings reportServiceSettings =
+ *     ReportServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ReportServiceClient reportServiceClient = ReportServiceClient.create(reportServiceSettings);
+ * }
+ * + *

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
+ * ReportServiceSettings reportServiceSettings =
+ *     ReportServiceSettings.newHttpJsonBuilder().build();
+ * ReportServiceClient reportServiceClient = ReportServiceClient.create(reportServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ReportServiceClient implements BackgroundResource { + private final ReportServiceSettings settings; + private final ReportServiceStub stub; + + /** Constructs an instance of ReportServiceClient with default settings. */ + public static final ReportServiceClient create() throws IOException { + return create(ReportServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ReportServiceClient, 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 ReportServiceClient create(ReportServiceSettings settings) + throws IOException { + return new ReportServiceClient(settings); + } + + /** + * Constructs an instance of ReportServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ReportServiceSettings). + */ + public static final ReportServiceClient create(ReportServiceStub stub) { + return new ReportServiceClient(stub); + } + + /** + * Constructs an instance of ReportServiceClient, 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 ReportServiceClient(ReportServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ReportServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected ReportServiceClient(ReportServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ReportServiceSettings getSettings() { + return settings; + } + + public ReportServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a report defined by a search query. The response might contain fewer rows than + * specified by `page_size`. Rely on `next_page_token` to determine if there are more rows to be + * requested. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ReportServiceClient reportServiceClient = ReportServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (ReportRow element : reportServiceClient.search(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Id of the account making the call. Must be a standalone account or an + * MCA subaccount. Format: accounts/{account} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchPagedResponse search(String parent) { + SearchRequest request = SearchRequest.newBuilder().setParent(parent).build(); + return search(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a report defined by a search query. The response might contain fewer rows than + * specified by `page_size`. Rely on `next_page_token` to determine if there are more rows to be + * requested. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ReportServiceClient reportServiceClient = ReportServiceClient.create()) {
+   *   SearchRequest request =
+   *       SearchRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ReportRow element : reportServiceClient.search(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 SearchPagedResponse search(SearchRequest request) { + return searchPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a report defined by a search query. The response might contain fewer rows than + * specified by `page_size`. Rely on `next_page_token` to determine if there are more rows to be + * requested. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ReportServiceClient reportServiceClient = ReportServiceClient.create()) {
+   *   SearchRequest request =
+   *       SearchRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = reportServiceClient.searchPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ReportRow element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable searchPagedCallable() { + return stub.searchPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a report defined by a search query. The response might contain fewer rows than + * specified by `page_size`. Rely on `next_page_token` to determine if there are more rows to be + * requested. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ReportServiceClient reportServiceClient = ReportServiceClient.create()) {
+   *   SearchRequest request =
+   *       SearchRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     SearchResponse response = reportServiceClient.searchCallable().call(request);
+   *     for (ReportRow element : response.getResultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable searchCallable() { + return stub.searchCallable(); + } + + @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 SearchPagedResponse + extends AbstractPagedListResponse< + SearchRequest, SearchResponse, ReportRow, SearchPage, SearchFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new SearchPagedResponse(input), MoreExecutors.directExecutor()); + } + + private SearchPagedResponse(SearchPage page) { + super(page, SearchFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchPage + extends AbstractPage { + + private SearchPage( + PageContext context, SearchResponse response) { + super(context, response); + } + + private static SearchPage createEmptyPage() { + return new SearchPage(null, null); + } + + @Override + protected SearchPage createPage( + PageContext context, SearchResponse response) { + return new SearchPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchRequest, SearchResponse, ReportRow, SearchPage, SearchFixedSizeCollection> { + + private SearchFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchFixedSizeCollection createEmptyCollection() { + return new SearchFixedSizeCollection(null, 0); + } + + @Override + protected SearchFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportServiceSettings.java b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportServiceSettings.java new file mode 100644 index 000000000000..ee20b5a4f2cd --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportServiceSettings.java @@ -0,0 +1,209 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta; + +import static com.google.shopping.merchant.reports.v1beta.ReportServiceClient.SearchPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.shopping.merchant.reports.v1beta.stub.ReportServiceStubSettings; +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 ReportServiceClient}. + * + *

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

    + *
  • The default service address (merchantapi.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 search 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
+ * ReportServiceSettings.Builder reportServiceSettingsBuilder = ReportServiceSettings.newBuilder();
+ * reportServiceSettingsBuilder
+ *     .searchSettings()
+ *     .setRetrySettings(
+ *         reportServiceSettingsBuilder
+ *             .searchSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ReportServiceSettings reportServiceSettings = reportServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ReportServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to search. */ + public PagedCallSettings searchSettings() { + return ((ReportServiceStubSettings) getStubSettings()).searchSettings(); + } + + public static final ReportServiceSettings create(ReportServiceStubSettings stub) + throws IOException { + return new ReportServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ReportServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ReportServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ReportServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ReportServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ReportServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ReportServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ReportServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ReportServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + 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 ReportServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ReportServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ReportServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ReportServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ReportServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ReportServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ReportServiceStubSettings.newHttpJsonBuilder()); + } + + public ReportServiceStubSettings.Builder getStubSettingsBuilder() { + return ((ReportServiceStubSettings.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 search. */ + public PagedCallSettings.Builder + searchSettings() { + return getStubSettingsBuilder().searchSettings(); + } + + @Override + public ReportServiceSettings build() throws IOException { + return new ReportServiceSettings(this); + } + } +} diff --git a/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/gapic_metadata.json b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/gapic_metadata.json new file mode 100644 index 000000000000..43048e5748f6 --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/gapic_metadata.json @@ -0,0 +1,21 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.shopping.merchant.reports.v1beta", + "libraryPackage": "com.google.shopping.merchant.reports.v1beta", + "services": { + "ReportService": { + "clients": { + "grpc": { + "libraryClient": "ReportServiceClient", + "rpcs": { + "Search": { + "methods": ["search", "search", "searchPagedCallable", "searchCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/package-info.java b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/package-info.java new file mode 100644 index 000000000000..80ba2fdf48af --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/package-info.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 Merchant API + * + *

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

======================= ReportServiceClient ======================= + * + *

Service Description: Service for retrieving reports and insights about your products, their + * performance, and their competitive environment on Google. + * + *

Sample for ReportServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReportServiceClient reportServiceClient = ReportServiceClient.create()) {
+ *   String parent = "parent-995424086";
+ *   for (ReportRow element : reportServiceClient.search(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.shopping.merchant.reports.v1beta; + +import javax.annotation.Generated; diff --git a/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/GrpcReportServiceCallableFactory.java b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/GrpcReportServiceCallableFactory.java new file mode 100644 index 000000000000..79b3d37bc768 --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/GrpcReportServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta.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 ReportService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcReportServiceCallableFactory 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-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/GrpcReportServiceStub.java b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/GrpcReportServiceStub.java new file mode 100644 index 000000000000..6101b79cab09 --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/GrpcReportServiceStub.java @@ -0,0 +1,171 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta.stub; + +import static com.google.shopping.merchant.reports.v1beta.ReportServiceClient.SearchPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.shopping.merchant.reports.v1beta.SearchRequest; +import com.google.shopping.merchant.reports.v1beta.SearchResponse; +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 ReportService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcReportServiceStub extends ReportServiceStub { + private static final MethodDescriptor searchMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.shopping.merchant.reports.v1beta.ReportService/Search") + .setRequestMarshaller(ProtoUtils.marshaller(SearchRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable searchCallable; + private final UnaryCallable searchPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcReportServiceStub create(ReportServiceStubSettings settings) + throws IOException { + return new GrpcReportServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcReportServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcReportServiceStub(ReportServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcReportServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcReportServiceStub( + ReportServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcReportServiceStub, 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 GrpcReportServiceStub(ReportServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcReportServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcReportServiceStub, 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 GrpcReportServiceStub( + ReportServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings searchTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.searchCallable = + callableFactory.createUnaryCallable( + searchTransportSettings, settings.searchSettings(), clientContext); + this.searchPagedCallable = + callableFactory.createPagedCallable( + searchTransportSettings, settings.searchSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable searchCallable() { + return searchCallable; + } + + @Override + public UnaryCallable searchPagedCallable() { + return searchPagedCallable; + } + + @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-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/HttpJsonReportServiceCallableFactory.java b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/HttpJsonReportServiceCallableFactory.java new file mode 100644 index 000000000000..cdfb290d3fd1 --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/HttpJsonReportServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta.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 ReportService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonReportServiceCallableFactory + 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); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @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-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/HttpJsonReportServiceStub.java b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/HttpJsonReportServiceStub.java new file mode 100644 index 000000000000..4a3e48abff1c --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/HttpJsonReportServiceStub.java @@ -0,0 +1,212 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta.stub; + +import static com.google.shopping.merchant.reports.v1beta.ReportServiceClient.SearchPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.TypeRegistry; +import com.google.shopping.merchant.reports.v1beta.SearchRequest; +import com.google.shopping.merchant.reports.v1beta.SearchResponse; +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 ReportService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonReportServiceStub extends ReportServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor searchMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.shopping.merchant.reports.v1beta.ReportService/Search") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/reports/v1beta/{parent=accounts/*}/reports:search", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable searchCallable; + private final UnaryCallable searchPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonReportServiceStub create(ReportServiceStubSettings settings) + throws IOException { + return new HttpJsonReportServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonReportServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonReportServiceStub( + ReportServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonReportServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonReportServiceStub( + ReportServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonReportServiceStub, 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 HttpJsonReportServiceStub( + ReportServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonReportServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonReportServiceStub, 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 HttpJsonReportServiceStub( + ReportServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings searchTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.searchCallable = + callableFactory.createUnaryCallable( + searchTransportSettings, settings.searchSettings(), clientContext); + this.searchPagedCallable = + callableFactory.createPagedCallable( + searchTransportSettings, settings.searchSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(searchMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable searchCallable() { + return searchCallable; + } + + @Override + public UnaryCallable searchPagedCallable() { + return searchPagedCallable; + } + + @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-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/ReportServiceStub.java b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/ReportServiceStub.java new file mode 100644 index 000000000000..db99b791aa3f --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/ReportServiceStub.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta.stub; + +import static com.google.shopping.merchant.reports.v1beta.ReportServiceClient.SearchPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.shopping.merchant.reports.v1beta.SearchRequest; +import com.google.shopping.merchant.reports.v1beta.SearchResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ReportService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ReportServiceStub implements BackgroundResource { + + public UnaryCallable searchPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchPagedCallable()"); + } + + public UnaryCallable searchCallable() { + throw new UnsupportedOperationException("Not implemented: searchCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/ReportServiceStubSettings.java b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/ReportServiceStubSettings.java new file mode 100644 index 000000000000..173197e35b6c --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/java/com/google/shopping/merchant/reports/v1beta/stub/ReportServiceStubSettings.java @@ -0,0 +1,390 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta.stub; + +import static com.google.shopping.merchant.reports.v1beta.ReportServiceClient.SearchPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +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.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.shopping.merchant.reports.v1beta.ReportRow; +import com.google.shopping.merchant.reports.v1beta.SearchRequest; +import com.google.shopping.merchant.reports.v1beta.SearchResponse; +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 ReportServiceStub}. + * + *

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

    + *
  • The default service address (merchantapi.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 search 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
+ * ReportServiceStubSettings.Builder reportServiceSettingsBuilder =
+ *     ReportServiceStubSettings.newBuilder();
+ * reportServiceSettingsBuilder
+ *     .searchSettings()
+ *     .setRetrySettings(
+ *         reportServiceSettingsBuilder
+ *             .searchSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ReportServiceStubSettings reportServiceSettings = reportServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ReportServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/content").build(); + + private final PagedCallSettings + searchSettings; + + private static final PagedListDescriptor + SEARCH_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchRequest injectToken(SearchRequest payload, String token) { + return SearchRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchRequest injectPageSize(SearchRequest payload, int pageSize) { + return SearchRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(SearchResponse payload) { + return payload.getResultsList() == null + ? ImmutableList.of() + : payload.getResultsList(); + } + }; + + private static final PagedListResponseFactory + SEARCH_PAGE_STR_FACT = + new PagedListResponseFactory() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, SEARCH_PAGE_STR_DESC, request, context); + return SearchPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to search. */ + public PagedCallSettings searchSettings() { + return searchSettings; + } + + public ReportServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcReportServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonReportServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** 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 "merchantapi.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "merchantapi.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(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ReportServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ReportServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ReportServiceStubSettings.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 ReportServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + searchSettings = settingsBuilder.searchSettings().build(); + } + + /** Builder for ReportServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder + searchSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .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); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + searchSettings = PagedCallSettings.newBuilder(SEARCH_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of(searchSettings); + initDefaults(this); + } + + protected Builder(ReportServiceStubSettings settings) { + super(settings); + + searchSettings = settings.searchSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(searchSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + 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.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .searchSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to search. */ + public PagedCallSettings.Builder + searchSettings() { + return searchSettings; + } + + @Override + public ReportServiceStubSettings build() throws IOException { + return new ReportServiceStubSettings(this); + } + } +} diff --git a/java-merchantapi/google-shopping-merchant-reports/src/main/resources/META-INF/native-image/com.google.shopping.merchant.reports.v1beta/reflect-config.json b/java-merchantapi/google-shopping-merchant-reports/src/main/resources/META-INF/native-image/com.google.shopping.merchant.reports.v1beta/reflect-config.json new file mode 100644 index 000000000000..ace99628cdc3 --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/main/resources/META-INF/native-image/com.google.shopping.merchant.reports.v1beta/reflect-config.json @@ -0,0 +1,1451 @@ +[ + { + "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.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.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$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$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$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.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.shopping.merchant.reports.v1beta.BestSellersBrandView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.BestSellersBrandView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.BestSellersProductClusterView$InventoryStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityBenchmarkView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityBenchmarkView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityCompetitorView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityCompetitorView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityTopMerchantView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.CompetitiveVisibilityTopMerchantView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.NonProductPerformanceView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.PriceCompetitivenessProductView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.PriceCompetitivenessProductView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.PriceInsightsProductView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.PriceInsightsProductView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductPerformanceView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductPerformanceView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$AggregatedDestinationStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueResolution", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueSeverity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueSeverity$AggregatedIssueSeverity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueSeverity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueSeverity$IssueSeverityPerDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueSeverity$IssueSeverityPerDestination$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ProductView$ItemIssue$ItemIssueType$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.RelativeDemand", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.RelativeDemandChangeType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ReportGranularity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ReportRow", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.ReportRow$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.SearchRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.SearchRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.SearchResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.SearchResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reports.v1beta.TrafficSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.CustomAttribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.CustomAttribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Destination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Price", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Price$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 + } +] \ No newline at end of file diff --git a/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/MockReportService.java b/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/MockReportService.java new file mode 100644 index 000000000000..7da4c2fdd1ba --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/MockReportService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta; + +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 MockReportService implements MockGrpcService { + private final MockReportServiceImpl serviceImpl; + + public MockReportService() { + serviceImpl = new MockReportServiceImpl(); + } + + @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-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/MockReportServiceImpl.java b/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/MockReportServiceImpl.java new file mode 100644 index 000000000000..b8ae87743834 --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/MockReportServiceImpl.java @@ -0,0 +1,80 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta; + +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import com.google.shopping.merchant.reports.v1beta.ReportServiceGrpc.ReportServiceImplBase; +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 MockReportServiceImpl extends ReportServiceImplBase { + private List requests; + private Queue responses; + + public MockReportServiceImpl() { + 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 search(SearchRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchResponse) { + requests.add(request); + responseObserver.onNext(((SearchResponse) 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 Search, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/ReportServiceClientHttpJsonTest.java b/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/ReportServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..80836ec4158e --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/ReportServiceClientHttpJsonTest.java @@ -0,0 +1,127 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta; + +import static com.google.shopping.merchant.reports.v1beta.ReportServiceClient.SearchPagedResponse; + +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.common.collect.Lists; +import com.google.shopping.merchant.reports.v1beta.stub.HttpJsonReportServiceStub; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ReportServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static ReportServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonReportServiceStub.getMethodDescriptors(), + ReportServiceSettings.getDefaultEndpoint()); + ReportServiceSettings settings = + ReportServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ReportServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ReportServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void searchTest() throws Exception { + ReportRow responsesElement = ReportRow.newBuilder().build(); + SearchResponse expectedResponse = + SearchResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "accounts/account-4811"; + + SearchPagedResponse pagedListResponse = client.search(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().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 searchExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "accounts/account-4811"; + client.search(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/ReportServiceClientTest.java b/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/ReportServiceClientTest.java new file mode 100644 index 000000000000..24698fc182fb --- /dev/null +++ b/java-merchantapi/google-shopping-merchant-reports/src/test/java/com/google/shopping/merchant/reports/v1beta/ReportServiceClientTest.java @@ -0,0 +1,124 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.shopping.merchant.reports.v1beta; + +import static com.google.shopping.merchant.reports.v1beta.ReportServiceClient.SearchPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ReportServiceClientTest { + private static MockReportService mockReportService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ReportServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockReportService = new MockReportService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockReportService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ReportServiceSettings settings = + ReportServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ReportServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void searchTest() throws Exception { + ReportRow responsesElement = ReportRow.newBuilder().build(); + SearchResponse expectedResponse = + SearchResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockReportService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + SearchPagedResponse pagedListResponse = client.search(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockReportService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchRequest actualRequest = ((SearchRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReportService.addException(exception); + + try { + String parent = "parent-995424086"; + client.search(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-merchantapi/grpc-google-shopping-merchant-reports-v1beta/pom.xml b/java-merchantapi/grpc-google-shopping-merchant-reports-v1beta/pom.xml new file mode 100644 index 000000000000..2809e67a0623 --- /dev/null +++ b/java-merchantapi/grpc-google-shopping-merchant-reports-v1beta/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.shopping.api.grpc + grpc-google-shopping-merchant-reports-v1beta + 0.0.1-SNAPSHOT + grpc-google-shopping-merchant-reports-v1beta + GRPC library for google-shopping-merchant-reports + + com.google.shopping + google-shopping-merchant-reports-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.shopping.api.grpc + proto-google-shopping-merchant-reports-v1beta + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-merchantapi/grpc-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportServiceGrpc.java b/java-merchantapi/grpc-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportServiceGrpc.java new file mode 100644 index 000000000000..5380e9f904bf --- /dev/null +++ b/java-merchantapi/grpc-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/ReportServiceGrpc.java @@ -0,0 +1,389 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.shopping.merchant.reports.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for retrieving reports and insights about your products, their
+ * performance, and their competitive environment on Google.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/shopping/merchant/reports/v1beta/reports.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ReportServiceGrpc { + + private ReportServiceGrpc() {} + + public static final String SERVICE_NAME = "google.shopping.merchant.reports.v1beta.ReportService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.shopping.merchant.reports.v1beta.SearchRequest, + com.google.shopping.merchant.reports.v1beta.SearchResponse> + getSearchMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Search", + requestType = com.google.shopping.merchant.reports.v1beta.SearchRequest.class, + responseType = com.google.shopping.merchant.reports.v1beta.SearchResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.shopping.merchant.reports.v1beta.SearchRequest, + com.google.shopping.merchant.reports.v1beta.SearchResponse> + getSearchMethod() { + io.grpc.MethodDescriptor< + com.google.shopping.merchant.reports.v1beta.SearchRequest, + com.google.shopping.merchant.reports.v1beta.SearchResponse> + getSearchMethod; + if ((getSearchMethod = ReportServiceGrpc.getSearchMethod) == null) { + synchronized (ReportServiceGrpc.class) { + if ((getSearchMethod = ReportServiceGrpc.getSearchMethod) == null) { + ReportServiceGrpc.getSearchMethod = + getSearchMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Search")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.shopping.merchant.reports.v1beta.SearchRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.shopping.merchant.reports.v1beta.SearchResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ReportServiceMethodDescriptorSupplier("Search")) + .build(); + } + } + } + return getSearchMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ReportServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ReportServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReportServiceStub(channel, callOptions); + } + }; + return ReportServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ReportServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ReportServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReportServiceBlockingStub(channel, callOptions); + } + }; + return ReportServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ReportServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ReportServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReportServiceFutureStub(channel, callOptions); + } + }; + return ReportServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for retrieving reports and insights about your products, their
+   * performance, and their competitive environment on Google.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Retrieves a report defined by a search query. The response might contain
+     * fewer rows than specified by `page_size`. Rely on `next_page_token` to
+     * determine if there are more rows to be requested.
+     * 
+ */ + default void search( + com.google.shopping.merchant.reports.v1beta.SearchRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service ReportService. + * + *
+   * Service for retrieving reports and insights about your products, their
+   * performance, and their competitive environment on Google.
+   * 
+ */ + public abstract static class ReportServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return ReportServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service ReportService. + * + *
+   * Service for retrieving reports and insights about your products, their
+   * performance, and their competitive environment on Google.
+   * 
+ */ + public static final class ReportServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ReportServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ReportServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReportServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves a report defined by a search query. The response might contain
+     * fewer rows than specified by `page_size`. Rely on `next_page_token` to
+     * determine if there are more rows to be requested.
+     * 
+ */ + public void search( + com.google.shopping.merchant.reports.v1beta.SearchRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service ReportService. + * + *
+   * Service for retrieving reports and insights about your products, their
+   * performance, and their competitive environment on Google.
+   * 
+ */ + public static final class ReportServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ReportServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ReportServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReportServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves a report defined by a search query. The response might contain
+     * fewer rows than specified by `page_size`. Rely on `next_page_token` to
+     * determine if there are more rows to be requested.
+     * 
+ */ + public com.google.shopping.merchant.reports.v1beta.SearchResponse search( + com.google.shopping.merchant.reports.v1beta.SearchRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service ReportService. + * + *
+   * Service for retrieving reports and insights about your products, their
+   * performance, and their competitive environment on Google.
+   * 
+ */ + public static final class ReportServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ReportServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ReportServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ReportServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Retrieves a report defined by a search query. The response might contain
+     * fewer rows than specified by `page_size`. Rely on `next_page_token` to
+     * determine if there are more rows to be requested.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.shopping.merchant.reports.v1beta.SearchResponse> + search(com.google.shopping.merchant.reports.v1beta.SearchRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SEARCH = 0; + + 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_SEARCH: + serviceImpl.search( + (com.google.shopping.merchant.reports.v1beta.SearchRequest) request, + (io.grpc.stub.StreamObserver< + com.google.shopping.merchant.reports.v1beta.SearchResponse>) + 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( + getSearchMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.shopping.merchant.reports.v1beta.SearchRequest, + com.google.shopping.merchant.reports.v1beta.SearchResponse>( + service, METHODID_SEARCH))) + .build(); + } + + private abstract static class ReportServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ReportServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.shopping.merchant.reports.v1beta.ReportsProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ReportService"); + } + } + + private static final class ReportServiceFileDescriptorSupplier + extends ReportServiceBaseDescriptorSupplier { + ReportServiceFileDescriptorSupplier() {} + } + + private static final class ReportServiceMethodDescriptorSupplier + extends ReportServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ReportServiceMethodDescriptorSupplier(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 (ReportServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ReportServiceFileDescriptorSupplier()) + .addMethod(getSearchMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-merchantapi/owlbot.py b/java-merchantapi/owlbot.py new file mode 100644 index 000000000000..03c0f6686d3f --- /dev/null +++ b/java-merchantapi/owlbot.py @@ -0,0 +1,36 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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-merchantapi/pom.xml b/java-merchantapi/pom.xml new file mode 100644 index 000000000000..65e4c9b5cdf1 --- /dev/null +++ b/java-merchantapi/pom.xml @@ -0,0 +1,54 @@ + + + 4.0.0 + com.google.shopping + google-shopping-merchant-reports-parent + pom + 0.0.1-SNAPSHOT + Google Merchant API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.18.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-shopping-merchant-reports-parent + + + + + + com.google.shopping + google-shopping-merchant-reports + 0.0.1-SNAPSHOT + + + com.google.shopping.api.grpc + grpc-google-shopping-merchant-reports-v1beta + 0.0.1-SNAPSHOT + + + com.google.shopping.api.grpc + proto-google-shopping-merchant-reports-v1beta + 0.0.1-SNAPSHOT + + + + + + google-shopping-merchant-reports + grpc-google-shopping-merchant-reports-v1beta + proto-google-shopping-merchant-reports-v1beta + google-shopping-merchant-reports-bom + + + diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/clirr-ignored-differences.xml b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/clirr-ignored-differences.xml new file mode 100644 index 000000000000..2761fb5431ab --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/clirr-ignored-differences.xml @@ -0,0 +1,47 @@ + + + + + 7012 + com/google/api/*OrBuilder + * get*(*) + + + 7012 + com/google/api/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/api/*OrBuilder + boolean has*(*) + + 7012 + com/google/shopping/merchant/reports/v1beta/*OrBuilder + * get*(*) + + + 7012 + com/google/shopping/merchant/reports/v1beta/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/shopping/merchant/reports/v1beta/*OrBuilder + boolean has*(*) + + 7012 + com/google/shopping/type/*OrBuilder + * get*(*) + + + 7012 + com/google/shopping/type/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/shopping/type/*OrBuilder + boolean has*(*) + + diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/pom.xml b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/pom.xml new file mode 100644 index 000000000000..1bc887b9fceb --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.shopping.api.grpc + proto-google-shopping-merchant-reports-v1beta + 0.0.1-SNAPSHOT + proto-google-shopping-merchant-reports-v1beta + Proto library for google-shopping-merchant-reports + + com.google.shopping + google-shopping-merchant-reports-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-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Advice.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Advice.java new file mode 100644 index 000000000000..b508b654bae8 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Advice.java @@ -0,0 +1,622 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/config_change.proto + +package com.google.api; + +/** + * + * + *
+ * Generated advice about this change, used for providing more
+ * information about how a change will affect the existing service.
+ * 
+ * + * Protobuf type {@code google.api.Advice} + */ +public final class Advice extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Advice) + AdviceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Advice.newBuilder() to construct. + private Advice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Advice() { + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Advice(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ConfigChangeProto.internal_static_google_api_Advice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ConfigChangeProto.internal_static_google_api_Advice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Advice.class, com.google.api.Advice.Builder.class); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Useful description for why this advice was applied and what actions should
+   * be taken to mitigate any implied risks.
+   * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+   * Useful description for why this advice was applied and what actions should
+   * be taken to mitigate any implied risks.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + 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(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.Advice)) { + return super.equals(obj); + } + com.google.api.Advice other = (com.google.api.Advice) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Advice parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Advice parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Advice parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Advice 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.api.Advice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Advice parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Advice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Advice 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.api.Advice parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Advice 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.api.Advice parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Advice 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.api.Advice 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; + } + /** + * + * + *
+   * Generated advice about this change, used for providing more
+   * information about how a change will affect the existing service.
+   * 
+ * + * Protobuf type {@code google.api.Advice} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Advice) + com.google.api.AdviceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ConfigChangeProto.internal_static_google_api_Advice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ConfigChangeProto.internal_static_google_api_Advice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Advice.class, com.google.api.Advice.Builder.class); + } + + // Construct using com.google.api.Advice.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ConfigChangeProto.internal_static_google_api_Advice_descriptor; + } + + @java.lang.Override + public com.google.api.Advice getDefaultInstanceForType() { + return com.google.api.Advice.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Advice build() { + com.google.api.Advice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Advice buildPartial() { + com.google.api.Advice result = new com.google.api.Advice(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Advice result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + } + } + + @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.api.Advice) { + return mergeFrom((com.google.api.Advice) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Advice other) { + if (other == com.google.api.Advice.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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 description_ = ""; + /** + * + * + *
+     * Useful description for why this advice was applied and what actions should
+     * be taken to mitigate any implied risks.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+     * Useful description for why this advice was applied and what actions should
+     * be taken to mitigate any implied risks.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+     * Useful description for why this advice was applied and what actions should
+     * be taken to mitigate any implied risks.
+     * 
+ * + * string description = 2; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Useful description for why this advice was applied and what actions should
+     * be taken to mitigate any implied risks.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Useful description for why this advice was applied and what actions should
+     * be taken to mitigate any implied risks.
+     * 
+ * + * string description = 2; + * + * @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_ |= 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.api.Advice) + } + + // @@protoc_insertion_point(class_scope:google.api.Advice) + private static final com.google.api.Advice DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Advice(); + } + + public static com.google.api.Advice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Advice 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.api.Advice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AdviceOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AdviceOrBuilder.java new file mode 100644 index 000000000000..9c0f0eced3f0 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AdviceOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/config_change.proto + +package com.google.api; + +public interface AdviceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Advice) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Useful description for why this advice was applied and what actions should
+   * be taken to mitigate any implied risks.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Useful description for why this advice was applied and what actions should
+   * be taken to mitigate any implied risks.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AnnotationsProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AnnotationsProto.java new file mode 100644 index 000000000000..4ed0731ac3f5 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AnnotationsProto.java @@ -0,0 +1,78 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/annotations.proto + +package com.google.api; + +public final class AnnotationsProto { + private AnnotationsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.google.api.AnnotationsProto.http); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static final int HTTP_FIELD_NUMBER = 72295728; + /** + * + * + *
+   * See `HttpRule`.
+   * 
+ * + * extend .google.protobuf.MethodOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, com.google.api.HttpRule> + http = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + com.google.api.HttpRule.class, com.google.api.HttpRule.getDefaultInstance()); + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\034google/api/annotations.proto\022\ngoogle.a" + + "pi\032\025google/api/http.proto\032 google/protob" + + "uf/descriptor.proto:E\n\004http\022\036.google.pro" + + "tobuf.MethodOptions\030\260\312\274\" \001(\0132\024.google.ap" + + "i.HttpRuleBn\n\016com.google.apiB\020Annotation" + + "sProtoP\001ZAgoogle.golang.org/genproto/goo" + + "gleapis/api/annotations;annotations\242\002\004GA" + + "PIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.HttpProto.getDescriptor(), + com.google.protobuf.DescriptorProtos.getDescriptor(), + }); + http.internalInit(descriptor.getExtensions().get(0)); + com.google.api.HttpProto.getDescriptor(); + com.google.protobuf.DescriptorProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthProto.java new file mode 100644 index 000000000000..05a613cf0c70 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthProto.java @@ -0,0 +1,135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public final class AuthProto { + private AuthProto() {} + + 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_api_Authentication_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Authentication_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_AuthenticationRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_AuthenticationRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_JwtLocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_JwtLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_AuthProvider_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_AuthProvider_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_OAuthRequirements_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_OAuthRequirements_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_AuthRequirement_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_AuthRequirement_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\025google/api/auth.proto\022\ngoogle.api\"l\n\016A" + + "uthentication\022-\n\005rules\030\003 \003(\0132\036.google.ap" + + "i.AuthenticationRule\022+\n\tproviders\030\004 \003(\0132" + + "\030.google.api.AuthProvider\"\251\001\n\022Authentica" + + "tionRule\022\020\n\010selector\030\001 \001(\t\022,\n\005oauth\030\002 \001(" + + "\0132\035.google.api.OAuthRequirements\022 \n\030allo" + + "w_without_credential\030\005 \001(\010\0221\n\014requiremen" + + "ts\030\007 \003(\0132\033.google.api.AuthRequirement\"^\n" + + "\013JwtLocation\022\020\n\006header\030\001 \001(\tH\000\022\017\n\005query\030" + + "\002 \001(\tH\000\022\020\n\006cookie\030\004 \001(\tH\000\022\024\n\014value_prefi" + + "x\030\003 \001(\tB\004\n\002in\"\232\001\n\014AuthProvider\022\n\n\002id\030\001 \001" + + "(\t\022\016\n\006issuer\030\002 \001(\t\022\020\n\010jwks_uri\030\003 \001(\t\022\021\n\t" + + "audiences\030\004 \001(\t\022\031\n\021authorization_url\030\005 \001" + + "(\t\022.\n\rjwt_locations\030\006 \003(\0132\027.google.api.J" + + "wtLocation\"-\n\021OAuthRequirements\022\030\n\020canon" + + "ical_scopes\030\001 \001(\t\"9\n\017AuthRequirement\022\023\n\013" + + "provider_id\030\001 \001(\t\022\021\n\taudiences\030\002 \001(\tBk\n\016" + + "com.google.apiB\tAuthProtoP\001ZEgoogle.gola" + + "ng.org/genproto/googleapis/api/serviceco" + + "nfig;serviceconfig\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_Authentication_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Authentication_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Authentication_descriptor, + new java.lang.String[] { + "Rules", "Providers", + }); + internal_static_google_api_AuthenticationRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_AuthenticationRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_AuthenticationRule_descriptor, + new java.lang.String[] { + "Selector", "Oauth", "AllowWithoutCredential", "Requirements", + }); + internal_static_google_api_JwtLocation_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_google_api_JwtLocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_JwtLocation_descriptor, + new java.lang.String[] { + "Header", "Query", "Cookie", "ValuePrefix", "In", + }); + internal_static_google_api_AuthProvider_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_google_api_AuthProvider_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_AuthProvider_descriptor, + new java.lang.String[] { + "Id", "Issuer", "JwksUri", "Audiences", "AuthorizationUrl", "JwtLocations", + }); + internal_static_google_api_OAuthRequirements_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_api_OAuthRequirements_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_OAuthRequirements_descriptor, + new java.lang.String[] { + "CanonicalScopes", + }); + internal_static_google_api_AuthRequirement_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_api_AuthRequirement_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_AuthRequirement_descriptor, + new java.lang.String[] { + "ProviderId", "Audiences", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthProvider.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthProvider.java new file mode 100644 index 000000000000..932056902f79 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthProvider.java @@ -0,0 +1,2476 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * + * + *
+ * Configuration for an authentication provider, including support for
+ * [JSON Web Token
+ * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
+ * 
+ * + * Protobuf type {@code google.api.AuthProvider} + */ +public final class AuthProvider extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.AuthProvider) + AuthProviderOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthProvider.newBuilder() to construct. + private AuthProvider(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuthProvider() { + id_ = ""; + issuer_ = ""; + jwksUri_ = ""; + audiences_ = ""; + authorizationUrl_ = ""; + jwtLocations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthProvider(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthProvider_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthProvider_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthProvider.class, com.google.api.AuthProvider.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * The unique identifier of the auth provider. It will be referred to by
+   * `AuthRequirement.provider_id`.
+   *
+   * Example: "bookstore_auth".
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the auth provider. It will be referred to by
+   * `AuthRequirement.provider_id`.
+   *
+   * Example: "bookstore_auth".
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISSUER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object issuer_ = ""; + /** + * + * + *
+   * Identifies the principal that issued the JWT. See
+   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+   * Usually a URL or an email address.
+   *
+   * Example: https://securetoken.google.com
+   * Example: 1234567-compute@developer.gserviceaccount.com
+   * 
+ * + * string issuer = 2; + * + * @return The issuer. + */ + @java.lang.Override + public java.lang.String getIssuer() { + java.lang.Object ref = issuer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issuer_ = s; + return s; + } + } + /** + * + * + *
+   * Identifies the principal that issued the JWT. See
+   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+   * Usually a URL or an email address.
+   *
+   * Example: https://securetoken.google.com
+   * Example: 1234567-compute@developer.gserviceaccount.com
+   * 
+ * + * string issuer = 2; + * + * @return The bytes for issuer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIssuerBytes() { + java.lang.Object ref = issuer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + issuer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JWKS_URI_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object jwksUri_ = ""; + /** + * + * + *
+   * URL of the provider's public key set to validate signature of the JWT. See
+   * [OpenID
+   * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+   * Optional if the key set document:
+   *  - can be retrieved from
+   *    [OpenID
+   *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+   *    of the issuer.
+   *  - can be inferred from the email domain of the issuer (e.g. a Google
+   *  service account).
+   *
+   * Example: https://www.googleapis.com/oauth2/v1/certs
+   * 
+ * + * string jwks_uri = 3; + * + * @return The jwksUri. + */ + @java.lang.Override + public java.lang.String getJwksUri() { + java.lang.Object ref = jwksUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jwksUri_ = s; + return s; + } + } + /** + * + * + *
+   * URL of the provider's public key set to validate signature of the JWT. See
+   * [OpenID
+   * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+   * Optional if the key set document:
+   *  - can be retrieved from
+   *    [OpenID
+   *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+   *    of the issuer.
+   *  - can be inferred from the email domain of the issuer (e.g. a Google
+   *  service account).
+   *
+   * Example: https://www.googleapis.com/oauth2/v1/certs
+   * 
+ * + * string jwks_uri = 3; + * + * @return The bytes for jwksUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJwksUriBytes() { + java.lang.Object ref = jwksUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jwksUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUDIENCES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object audiences_ = ""; + /** + * + * + *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, JWTs with audiences:
+   *   - "https://[service.name]/[google.protobuf.Api.name]"
+   *   - "https://[service.name]/"
+   * will be accepted.
+   * For example, if no audiences are in the setting, LibraryService API will
+   * accept JWTs with the following audiences:
+   *   -
+   *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
+   *   - https://library-example.googleapis.com/
+   *
+   * Example:
+   *
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ * + * string audiences = 4; + * + * @return The audiences. + */ + @java.lang.Override + public java.lang.String getAudiences() { + java.lang.Object ref = audiences_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audiences_ = s; + return s; + } + } + /** + * + * + *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, JWTs with audiences:
+   *   - "https://[service.name]/[google.protobuf.Api.name]"
+   *   - "https://[service.name]/"
+   * will be accepted.
+   * For example, if no audiences are in the setting, LibraryService API will
+   * accept JWTs with the following audiences:
+   *   -
+   *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
+   *   - https://library-example.googleapis.com/
+   *
+   * Example:
+   *
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ * + * string audiences = 4; + * + * @return The bytes for audiences. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudiencesBytes() { + java.lang.Object ref = audiences_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audiences_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHORIZATION_URL_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object authorizationUrl_ = ""; + /** + * + * + *
+   * Redirect URL if JWT token is required but not present or is expired.
+   * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+   * 
+ * + * string authorization_url = 5; + * + * @return The authorizationUrl. + */ + @java.lang.Override + public java.lang.String getAuthorizationUrl() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizationUrl_ = s; + return s; + } + } + /** + * + * + *
+   * Redirect URL if JWT token is required but not present or is expired.
+   * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+   * 
+ * + * string authorization_url = 5; + * + * @return The bytes for authorizationUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthorizationUrlBytes() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authorizationUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JWT_LOCATIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List jwtLocations_; + /** + * + * + *
+   * Defines the locations to extract the JWT.  For now it is only used by the
+   * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+   * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+   *
+   * JWT locations can be one of HTTP headers, URL query parameters or
+   * cookies. The rule is that the first match wins.
+   *
+   * If not specified,  default to use following 3 locations:
+   *    1) Authorization: Bearer
+   *    2) x-goog-iap-jwt-assertion
+   *    3) access_token query parameter
+   *
+   * Default locations can be specified as followings:
+   *    jwt_locations:
+   *    - header: Authorization
+   *      value_prefix: "Bearer "
+   *    - header: x-goog-iap-jwt-assertion
+   *    - query: access_token
+   * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + @java.lang.Override + public java.util.List getJwtLocationsList() { + return jwtLocations_; + } + /** + * + * + *
+   * Defines the locations to extract the JWT.  For now it is only used by the
+   * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+   * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+   *
+   * JWT locations can be one of HTTP headers, URL query parameters or
+   * cookies. The rule is that the first match wins.
+   *
+   * If not specified,  default to use following 3 locations:
+   *    1) Authorization: Bearer
+   *    2) x-goog-iap-jwt-assertion
+   *    3) access_token query parameter
+   *
+   * Default locations can be specified as followings:
+   *    jwt_locations:
+   *    - header: Authorization
+   *      value_prefix: "Bearer "
+   *    - header: x-goog-iap-jwt-assertion
+   *    - query: access_token
+   * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + @java.lang.Override + public java.util.List + getJwtLocationsOrBuilderList() { + return jwtLocations_; + } + /** + * + * + *
+   * Defines the locations to extract the JWT.  For now it is only used by the
+   * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+   * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+   *
+   * JWT locations can be one of HTTP headers, URL query parameters or
+   * cookies. The rule is that the first match wins.
+   *
+   * If not specified,  default to use following 3 locations:
+   *    1) Authorization: Bearer
+   *    2) x-goog-iap-jwt-assertion
+   *    3) access_token query parameter
+   *
+   * Default locations can be specified as followings:
+   *    jwt_locations:
+   *    - header: Authorization
+   *      value_prefix: "Bearer "
+   *    - header: x-goog-iap-jwt-assertion
+   *    - query: access_token
+   * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + @java.lang.Override + public int getJwtLocationsCount() { + return jwtLocations_.size(); + } + /** + * + * + *
+   * Defines the locations to extract the JWT.  For now it is only used by the
+   * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+   * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+   *
+   * JWT locations can be one of HTTP headers, URL query parameters or
+   * cookies. The rule is that the first match wins.
+   *
+   * If not specified,  default to use following 3 locations:
+   *    1) Authorization: Bearer
+   *    2) x-goog-iap-jwt-assertion
+   *    3) access_token query parameter
+   *
+   * Default locations can be specified as followings:
+   *    jwt_locations:
+   *    - header: Authorization
+   *      value_prefix: "Bearer "
+   *    - header: x-goog-iap-jwt-assertion
+   *    - query: access_token
+   * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + @java.lang.Override + public com.google.api.JwtLocation getJwtLocations(int index) { + return jwtLocations_.get(index); + } + /** + * + * + *
+   * Defines the locations to extract the JWT.  For now it is only used by the
+   * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+   * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+   *
+   * JWT locations can be one of HTTP headers, URL query parameters or
+   * cookies. The rule is that the first match wins.
+   *
+   * If not specified,  default to use following 3 locations:
+   *    1) Authorization: Bearer
+   *    2) x-goog-iap-jwt-assertion
+   *    3) access_token query parameter
+   *
+   * Default locations can be specified as followings:
+   *    jwt_locations:
+   *    - header: Authorization
+   *      value_prefix: "Bearer "
+   *    - header: x-goog-iap-jwt-assertion
+   *    - query: access_token
+   * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + @java.lang.Override + public com.google.api.JwtLocationOrBuilder getJwtLocationsOrBuilder(int index) { + return jwtLocations_.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(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issuer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, issuer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jwksUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jwksUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audiences_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, audiences_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizationUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, authorizationUrl_); + } + for (int i = 0; i < jwtLocations_.size(); i++) { + output.writeMessage(6, jwtLocations_.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(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issuer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, issuer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jwksUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jwksUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audiences_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, audiences_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizationUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, authorizationUrl_); + } + for (int i = 0; i < jwtLocations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, jwtLocations_.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.api.AuthProvider)) { + return super.equals(obj); + } + com.google.api.AuthProvider other = (com.google.api.AuthProvider) obj; + + if (!getId().equals(other.getId())) return false; + if (!getIssuer().equals(other.getIssuer())) return false; + if (!getJwksUri().equals(other.getJwksUri())) return false; + if (!getAudiences().equals(other.getAudiences())) return false; + if (!getAuthorizationUrl().equals(other.getAuthorizationUrl())) return false; + if (!getJwtLocationsList().equals(other.getJwtLocationsList())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + ISSUER_FIELD_NUMBER; + hash = (53 * hash) + getIssuer().hashCode(); + hash = (37 * hash) + JWKS_URI_FIELD_NUMBER; + hash = (53 * hash) + getJwksUri().hashCode(); + hash = (37 * hash) + AUDIENCES_FIELD_NUMBER; + hash = (53 * hash) + getAudiences().hashCode(); + hash = (37 * hash) + AUTHORIZATION_URL_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizationUrl().hashCode(); + if (getJwtLocationsCount() > 0) { + hash = (37 * hash) + JWT_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getJwtLocationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.AuthProvider parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.AuthProvider parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.AuthProvider parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.AuthProvider 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.api.AuthProvider parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.AuthProvider parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.AuthProvider parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.AuthProvider 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.api.AuthProvider parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.AuthProvider 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.api.AuthProvider parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.AuthProvider 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.api.AuthProvider 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 an authentication provider, including support for
+   * [JSON Web Token
+   * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
+   * 
+ * + * Protobuf type {@code google.api.AuthProvider} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.AuthProvider) + com.google.api.AuthProviderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthProvider_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthProvider_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthProvider.class, com.google.api.AuthProvider.Builder.class); + } + + // Construct using com.google.api.AuthProvider.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + issuer_ = ""; + jwksUri_ = ""; + audiences_ = ""; + authorizationUrl_ = ""; + if (jwtLocationsBuilder_ == null) { + jwtLocations_ = java.util.Collections.emptyList(); + } else { + jwtLocations_ = null; + jwtLocationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_AuthProvider_descriptor; + } + + @java.lang.Override + public com.google.api.AuthProvider getDefaultInstanceForType() { + return com.google.api.AuthProvider.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.AuthProvider build() { + com.google.api.AuthProvider result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.AuthProvider buildPartial() { + com.google.api.AuthProvider result = new com.google.api.AuthProvider(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.AuthProvider result) { + if (jwtLocationsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + jwtLocations_ = java.util.Collections.unmodifiableList(jwtLocations_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.jwtLocations_ = jwtLocations_; + } else { + result.jwtLocations_ = jwtLocationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.AuthProvider result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.issuer_ = issuer_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.jwksUri_ = jwksUri_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.audiences_ = audiences_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.authorizationUrl_ = authorizationUrl_; + } + } + + @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.api.AuthProvider) { + return mergeFrom((com.google.api.AuthProvider) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.AuthProvider other) { + if (other == com.google.api.AuthProvider.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIssuer().isEmpty()) { + issuer_ = other.issuer_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getJwksUri().isEmpty()) { + jwksUri_ = other.jwksUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAudiences().isEmpty()) { + audiences_ = other.audiences_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getAuthorizationUrl().isEmpty()) { + authorizationUrl_ = other.authorizationUrl_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (jwtLocationsBuilder_ == null) { + if (!other.jwtLocations_.isEmpty()) { + if (jwtLocations_.isEmpty()) { + jwtLocations_ = other.jwtLocations_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureJwtLocationsIsMutable(); + jwtLocations_.addAll(other.jwtLocations_); + } + onChanged(); + } + } else { + if (!other.jwtLocations_.isEmpty()) { + if (jwtLocationsBuilder_.isEmpty()) { + jwtLocationsBuilder_.dispose(); + jwtLocationsBuilder_ = null; + jwtLocations_ = other.jwtLocations_; + bitField0_ = (bitField0_ & ~0x00000020); + jwtLocationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getJwtLocationsFieldBuilder() + : null; + } else { + jwtLocationsBuilder_.addAllMessages(other.jwtLocations_); + } + } + } + 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: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + issuer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + jwksUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + audiences_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + authorizationUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.api.JwtLocation m = + input.readMessage(com.google.api.JwtLocation.parser(), extensionRegistry); + if (jwtLocationsBuilder_ == null) { + ensureJwtLocationsIsMutable(); + jwtLocations_.add(m); + } else { + jwtLocationsBuilder_.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 id_ = ""; + /** + * + * + *
+     * The unique identifier of the auth provider. It will be referred to by
+     * `AuthRequirement.provider_id`.
+     *
+     * Example: "bookstore_auth".
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the auth provider. It will be referred to by
+     * `AuthRequirement.provider_id`.
+     *
+     * Example: "bookstore_auth".
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the auth provider. It will be referred to by
+     * `AuthRequirement.provider_id`.
+     *
+     * Example: "bookstore_auth".
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the auth provider. It will be referred to by
+     * `AuthRequirement.provider_id`.
+     *
+     * Example: "bookstore_auth".
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the auth provider. It will be referred to by
+     * `AuthRequirement.provider_id`.
+     *
+     * Example: "bookstore_auth".
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object issuer_ = ""; + /** + * + * + *
+     * Identifies the principal that issued the JWT. See
+     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+     * Usually a URL or an email address.
+     *
+     * Example: https://securetoken.google.com
+     * Example: 1234567-compute@developer.gserviceaccount.com
+     * 
+ * + * string issuer = 2; + * + * @return The issuer. + */ + public java.lang.String getIssuer() { + java.lang.Object ref = issuer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + issuer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifies the principal that issued the JWT. See
+     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+     * Usually a URL or an email address.
+     *
+     * Example: https://securetoken.google.com
+     * Example: 1234567-compute@developer.gserviceaccount.com
+     * 
+ * + * string issuer = 2; + * + * @return The bytes for issuer. + */ + public com.google.protobuf.ByteString getIssuerBytes() { + java.lang.Object ref = issuer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + issuer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifies the principal that issued the JWT. See
+     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+     * Usually a URL or an email address.
+     *
+     * Example: https://securetoken.google.com
+     * Example: 1234567-compute@developer.gserviceaccount.com
+     * 
+ * + * string issuer = 2; + * + * @param value The issuer to set. + * @return This builder for chaining. + */ + public Builder setIssuer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + issuer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifies the principal that issued the JWT. See
+     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+     * Usually a URL or an email address.
+     *
+     * Example: https://securetoken.google.com
+     * Example: 1234567-compute@developer.gserviceaccount.com
+     * 
+ * + * string issuer = 2; + * + * @return This builder for chaining. + */ + public Builder clearIssuer() { + issuer_ = getDefaultInstance().getIssuer(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifies the principal that issued the JWT. See
+     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+     * Usually a URL or an email address.
+     *
+     * Example: https://securetoken.google.com
+     * Example: 1234567-compute@developer.gserviceaccount.com
+     * 
+ * + * string issuer = 2; + * + * @param value The bytes for issuer to set. + * @return This builder for chaining. + */ + public Builder setIssuerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + issuer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object jwksUri_ = ""; + /** + * + * + *
+     * URL of the provider's public key set to validate signature of the JWT. See
+     * [OpenID
+     * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+     * Optional if the key set document:
+     *  - can be retrieved from
+     *    [OpenID
+     *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+     *    of the issuer.
+     *  - can be inferred from the email domain of the issuer (e.g. a Google
+     *  service account).
+     *
+     * Example: https://www.googleapis.com/oauth2/v1/certs
+     * 
+ * + * string jwks_uri = 3; + * + * @return The jwksUri. + */ + public java.lang.String getJwksUri() { + java.lang.Object ref = jwksUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jwksUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URL of the provider's public key set to validate signature of the JWT. See
+     * [OpenID
+     * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+     * Optional if the key set document:
+     *  - can be retrieved from
+     *    [OpenID
+     *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+     *    of the issuer.
+     *  - can be inferred from the email domain of the issuer (e.g. a Google
+     *  service account).
+     *
+     * Example: https://www.googleapis.com/oauth2/v1/certs
+     * 
+ * + * string jwks_uri = 3; + * + * @return The bytes for jwksUri. + */ + public com.google.protobuf.ByteString getJwksUriBytes() { + java.lang.Object ref = jwksUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jwksUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URL of the provider's public key set to validate signature of the JWT. See
+     * [OpenID
+     * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+     * Optional if the key set document:
+     *  - can be retrieved from
+     *    [OpenID
+     *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+     *    of the issuer.
+     *  - can be inferred from the email domain of the issuer (e.g. a Google
+     *  service account).
+     *
+     * Example: https://www.googleapis.com/oauth2/v1/certs
+     * 
+ * + * string jwks_uri = 3; + * + * @param value The jwksUri to set. + * @return This builder for chaining. + */ + public Builder setJwksUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + jwksUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * URL of the provider's public key set to validate signature of the JWT. See
+     * [OpenID
+     * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+     * Optional if the key set document:
+     *  - can be retrieved from
+     *    [OpenID
+     *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+     *    of the issuer.
+     *  - can be inferred from the email domain of the issuer (e.g. a Google
+     *  service account).
+     *
+     * Example: https://www.googleapis.com/oauth2/v1/certs
+     * 
+ * + * string jwks_uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearJwksUri() { + jwksUri_ = getDefaultInstance().getJwksUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * URL of the provider's public key set to validate signature of the JWT. See
+     * [OpenID
+     * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+     * Optional if the key set document:
+     *  - can be retrieved from
+     *    [OpenID
+     *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+     *    of the issuer.
+     *  - can be inferred from the email domain of the issuer (e.g. a Google
+     *  service account).
+     *
+     * Example: https://www.googleapis.com/oauth2/v1/certs
+     * 
+ * + * string jwks_uri = 3; + * + * @param value The bytes for jwksUri to set. + * @return This builder for chaining. + */ + public Builder setJwksUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + jwksUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object audiences_ = ""; + /** + * + * + *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, JWTs with audiences:
+     *   - "https://[service.name]/[google.protobuf.Api.name]"
+     *   - "https://[service.name]/"
+     * will be accepted.
+     * For example, if no audiences are in the setting, LibraryService API will
+     * accept JWTs with the following audiences:
+     *   -
+     *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
+     *   - https://library-example.googleapis.com/
+     *
+     * Example:
+     *
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ * + * string audiences = 4; + * + * @return The audiences. + */ + public java.lang.String getAudiences() { + java.lang.Object ref = audiences_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audiences_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, JWTs with audiences:
+     *   - "https://[service.name]/[google.protobuf.Api.name]"
+     *   - "https://[service.name]/"
+     * will be accepted.
+     * For example, if no audiences are in the setting, LibraryService API will
+     * accept JWTs with the following audiences:
+     *   -
+     *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
+     *   - https://library-example.googleapis.com/
+     *
+     * Example:
+     *
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ * + * string audiences = 4; + * + * @return The bytes for audiences. + */ + public com.google.protobuf.ByteString getAudiencesBytes() { + java.lang.Object ref = audiences_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audiences_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, JWTs with audiences:
+     *   - "https://[service.name]/[google.protobuf.Api.name]"
+     *   - "https://[service.name]/"
+     * will be accepted.
+     * For example, if no audiences are in the setting, LibraryService API will
+     * accept JWTs with the following audiences:
+     *   -
+     *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
+     *   - https://library-example.googleapis.com/
+     *
+     * Example:
+     *
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ * + * string audiences = 4; + * + * @param value The audiences to set. + * @return This builder for chaining. + */ + public Builder setAudiences(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + audiences_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, JWTs with audiences:
+     *   - "https://[service.name]/[google.protobuf.Api.name]"
+     *   - "https://[service.name]/"
+     * will be accepted.
+     * For example, if no audiences are in the setting, LibraryService API will
+     * accept JWTs with the following audiences:
+     *   -
+     *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
+     *   - https://library-example.googleapis.com/
+     *
+     * Example:
+     *
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ * + * string audiences = 4; + * + * @return This builder for chaining. + */ + public Builder clearAudiences() { + audiences_ = getDefaultInstance().getAudiences(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, JWTs with audiences:
+     *   - "https://[service.name]/[google.protobuf.Api.name]"
+     *   - "https://[service.name]/"
+     * will be accepted.
+     * For example, if no audiences are in the setting, LibraryService API will
+     * accept JWTs with the following audiences:
+     *   -
+     *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
+     *   - https://library-example.googleapis.com/
+     *
+     * Example:
+     *
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ * + * string audiences = 4; + * + * @param value The bytes for audiences to set. + * @return This builder for chaining. + */ + public Builder setAudiencesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + audiences_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object authorizationUrl_ = ""; + /** + * + * + *
+     * Redirect URL if JWT token is required but not present or is expired.
+     * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+     * 
+ * + * string authorization_url = 5; + * + * @return The authorizationUrl. + */ + public java.lang.String getAuthorizationUrl() { + java.lang.Object ref = authorizationUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizationUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Redirect URL if JWT token is required but not present or is expired.
+     * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+     * 
+ * + * string authorization_url = 5; + * + * @return The bytes for authorizationUrl. + */ + public com.google.protobuf.ByteString getAuthorizationUrlBytes() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authorizationUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Redirect URL if JWT token is required but not present or is expired.
+     * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+     * 
+ * + * string authorization_url = 5; + * + * @param value The authorizationUrl to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + authorizationUrl_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Redirect URL if JWT token is required but not present or is expired.
+     * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+     * 
+ * + * string authorization_url = 5; + * + * @return This builder for chaining. + */ + public Builder clearAuthorizationUrl() { + authorizationUrl_ = getDefaultInstance().getAuthorizationUrl(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Redirect URL if JWT token is required but not present or is expired.
+     * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+     * 
+ * + * string authorization_url = 5; + * + * @param value The bytes for authorizationUrl to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + authorizationUrl_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.util.List jwtLocations_ = + java.util.Collections.emptyList(); + + private void ensureJwtLocationsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + jwtLocations_ = new java.util.ArrayList(jwtLocations_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.JwtLocation, + com.google.api.JwtLocation.Builder, + com.google.api.JwtLocationOrBuilder> + jwtLocationsBuilder_; + + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public java.util.List getJwtLocationsList() { + if (jwtLocationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jwtLocations_); + } else { + return jwtLocationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public int getJwtLocationsCount() { + if (jwtLocationsBuilder_ == null) { + return jwtLocations_.size(); + } else { + return jwtLocationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public com.google.api.JwtLocation getJwtLocations(int index) { + if (jwtLocationsBuilder_ == null) { + return jwtLocations_.get(index); + } else { + return jwtLocationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public Builder setJwtLocations(int index, com.google.api.JwtLocation value) { + if (jwtLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJwtLocationsIsMutable(); + jwtLocations_.set(index, value); + onChanged(); + } else { + jwtLocationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public Builder setJwtLocations(int index, com.google.api.JwtLocation.Builder builderForValue) { + if (jwtLocationsBuilder_ == null) { + ensureJwtLocationsIsMutable(); + jwtLocations_.set(index, builderForValue.build()); + onChanged(); + } else { + jwtLocationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public Builder addJwtLocations(com.google.api.JwtLocation value) { + if (jwtLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJwtLocationsIsMutable(); + jwtLocations_.add(value); + onChanged(); + } else { + jwtLocationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public Builder addJwtLocations(int index, com.google.api.JwtLocation value) { + if (jwtLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJwtLocationsIsMutable(); + jwtLocations_.add(index, value); + onChanged(); + } else { + jwtLocationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public Builder addJwtLocations(com.google.api.JwtLocation.Builder builderForValue) { + if (jwtLocationsBuilder_ == null) { + ensureJwtLocationsIsMutable(); + jwtLocations_.add(builderForValue.build()); + onChanged(); + } else { + jwtLocationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public Builder addJwtLocations(int index, com.google.api.JwtLocation.Builder builderForValue) { + if (jwtLocationsBuilder_ == null) { + ensureJwtLocationsIsMutable(); + jwtLocations_.add(index, builderForValue.build()); + onChanged(); + } else { + jwtLocationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public Builder addAllJwtLocations( + java.lang.Iterable values) { + if (jwtLocationsBuilder_ == null) { + ensureJwtLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jwtLocations_); + onChanged(); + } else { + jwtLocationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public Builder clearJwtLocations() { + if (jwtLocationsBuilder_ == null) { + jwtLocations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + jwtLocationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public Builder removeJwtLocations(int index) { + if (jwtLocationsBuilder_ == null) { + ensureJwtLocationsIsMutable(); + jwtLocations_.remove(index); + onChanged(); + } else { + jwtLocationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public com.google.api.JwtLocation.Builder getJwtLocationsBuilder(int index) { + return getJwtLocationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public com.google.api.JwtLocationOrBuilder getJwtLocationsOrBuilder(int index) { + if (jwtLocationsBuilder_ == null) { + return jwtLocations_.get(index); + } else { + return jwtLocationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public java.util.List + getJwtLocationsOrBuilderList() { + if (jwtLocationsBuilder_ != null) { + return jwtLocationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jwtLocations_); + } + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public com.google.api.JwtLocation.Builder addJwtLocationsBuilder() { + return getJwtLocationsFieldBuilder() + .addBuilder(com.google.api.JwtLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public com.google.api.JwtLocation.Builder addJwtLocationsBuilder(int index) { + return getJwtLocationsFieldBuilder() + .addBuilder(index, com.google.api.JwtLocation.getDefaultInstance()); + } + /** + * + * + *
+     * Defines the locations to extract the JWT.  For now it is only used by the
+     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+     *
+     * JWT locations can be one of HTTP headers, URL query parameters or
+     * cookies. The rule is that the first match wins.
+     *
+     * If not specified,  default to use following 3 locations:
+     *    1) Authorization: Bearer
+     *    2) x-goog-iap-jwt-assertion
+     *    3) access_token query parameter
+     *
+     * Default locations can be specified as followings:
+     *    jwt_locations:
+     *    - header: Authorization
+     *      value_prefix: "Bearer "
+     *    - header: x-goog-iap-jwt-assertion
+     *    - query: access_token
+     * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + public java.util.List getJwtLocationsBuilderList() { + return getJwtLocationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.JwtLocation, + com.google.api.JwtLocation.Builder, + com.google.api.JwtLocationOrBuilder> + getJwtLocationsFieldBuilder() { + if (jwtLocationsBuilder_ == null) { + jwtLocationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.JwtLocation, + com.google.api.JwtLocation.Builder, + com.google.api.JwtLocationOrBuilder>( + jwtLocations_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + jwtLocations_ = null; + } + return jwtLocationsBuilder_; + } + + @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.api.AuthProvider) + } + + // @@protoc_insertion_point(class_scope:google.api.AuthProvider) + private static final com.google.api.AuthProvider DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.AuthProvider(); + } + + public static com.google.api.AuthProvider getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthProvider 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.api.AuthProvider getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthProviderOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthProviderOrBuilder.java new file mode 100644 index 000000000000..ef7565a15498 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthProviderOrBuilder.java @@ -0,0 +1,358 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface AuthProviderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.AuthProvider) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the auth provider. It will be referred to by
+   * `AuthRequirement.provider_id`.
+   *
+   * Example: "bookstore_auth".
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * The unique identifier of the auth provider. It will be referred to by
+   * `AuthRequirement.provider_id`.
+   *
+   * Example: "bookstore_auth".
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Identifies the principal that issued the JWT. See
+   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+   * Usually a URL or an email address.
+   *
+   * Example: https://securetoken.google.com
+   * Example: 1234567-compute@developer.gserviceaccount.com
+   * 
+ * + * string issuer = 2; + * + * @return The issuer. + */ + java.lang.String getIssuer(); + /** + * + * + *
+   * Identifies the principal that issued the JWT. See
+   * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
+   * Usually a URL or an email address.
+   *
+   * Example: https://securetoken.google.com
+   * Example: 1234567-compute@developer.gserviceaccount.com
+   * 
+ * + * string issuer = 2; + * + * @return The bytes for issuer. + */ + com.google.protobuf.ByteString getIssuerBytes(); + + /** + * + * + *
+   * URL of the provider's public key set to validate signature of the JWT. See
+   * [OpenID
+   * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+   * Optional if the key set document:
+   *  - can be retrieved from
+   *    [OpenID
+   *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+   *    of the issuer.
+   *  - can be inferred from the email domain of the issuer (e.g. a Google
+   *  service account).
+   *
+   * Example: https://www.googleapis.com/oauth2/v1/certs
+   * 
+ * + * string jwks_uri = 3; + * + * @return The jwksUri. + */ + java.lang.String getJwksUri(); + /** + * + * + *
+   * URL of the provider's public key set to validate signature of the JWT. See
+   * [OpenID
+   * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
+   * Optional if the key set document:
+   *  - can be retrieved from
+   *    [OpenID
+   *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
+   *    of the issuer.
+   *  - can be inferred from the email domain of the issuer (e.g. a Google
+   *  service account).
+   *
+   * Example: https://www.googleapis.com/oauth2/v1/certs
+   * 
+ * + * string jwks_uri = 3; + * + * @return The bytes for jwksUri. + */ + com.google.protobuf.ByteString getJwksUriBytes(); + + /** + * + * + *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, JWTs with audiences:
+   *   - "https://[service.name]/[google.protobuf.Api.name]"
+   *   - "https://[service.name]/"
+   * will be accepted.
+   * For example, if no audiences are in the setting, LibraryService API will
+   * accept JWTs with the following audiences:
+   *   -
+   *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
+   *   - https://library-example.googleapis.com/
+   *
+   * Example:
+   *
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ * + * string audiences = 4; + * + * @return The audiences. + */ + java.lang.String getAudiences(); + /** + * + * + *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, JWTs with audiences:
+   *   - "https://[service.name]/[google.protobuf.Api.name]"
+   *   - "https://[service.name]/"
+   * will be accepted.
+   * For example, if no audiences are in the setting, LibraryService API will
+   * accept JWTs with the following audiences:
+   *   -
+   *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
+   *   - https://library-example.googleapis.com/
+   *
+   * Example:
+   *
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ * + * string audiences = 4; + * + * @return The bytes for audiences. + */ + com.google.protobuf.ByteString getAudiencesBytes(); + + /** + * + * + *
+   * Redirect URL if JWT token is required but not present or is expired.
+   * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+   * 
+ * + * string authorization_url = 5; + * + * @return The authorizationUrl. + */ + java.lang.String getAuthorizationUrl(); + /** + * + * + *
+   * Redirect URL if JWT token is required but not present or is expired.
+   * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
+   * 
+ * + * string authorization_url = 5; + * + * @return The bytes for authorizationUrl. + */ + com.google.protobuf.ByteString getAuthorizationUrlBytes(); + + /** + * + * + *
+   * Defines the locations to extract the JWT.  For now it is only used by the
+   * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+   * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+   *
+   * JWT locations can be one of HTTP headers, URL query parameters or
+   * cookies. The rule is that the first match wins.
+   *
+   * If not specified,  default to use following 3 locations:
+   *    1) Authorization: Bearer
+   *    2) x-goog-iap-jwt-assertion
+   *    3) access_token query parameter
+   *
+   * Default locations can be specified as followings:
+   *    jwt_locations:
+   *    - header: Authorization
+   *      value_prefix: "Bearer "
+   *    - header: x-goog-iap-jwt-assertion
+   *    - query: access_token
+   * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + java.util.List getJwtLocationsList(); + /** + * + * + *
+   * Defines the locations to extract the JWT.  For now it is only used by the
+   * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+   * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+   *
+   * JWT locations can be one of HTTP headers, URL query parameters or
+   * cookies. The rule is that the first match wins.
+   *
+   * If not specified,  default to use following 3 locations:
+   *    1) Authorization: Bearer
+   *    2) x-goog-iap-jwt-assertion
+   *    3) access_token query parameter
+   *
+   * Default locations can be specified as followings:
+   *    jwt_locations:
+   *    - header: Authorization
+   *      value_prefix: "Bearer "
+   *    - header: x-goog-iap-jwt-assertion
+   *    - query: access_token
+   * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + com.google.api.JwtLocation getJwtLocations(int index); + /** + * + * + *
+   * Defines the locations to extract the JWT.  For now it is only used by the
+   * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+   * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+   *
+   * JWT locations can be one of HTTP headers, URL query parameters or
+   * cookies. The rule is that the first match wins.
+   *
+   * If not specified,  default to use following 3 locations:
+   *    1) Authorization: Bearer
+   *    2) x-goog-iap-jwt-assertion
+   *    3) access_token query parameter
+   *
+   * Default locations can be specified as followings:
+   *    jwt_locations:
+   *    - header: Authorization
+   *      value_prefix: "Bearer "
+   *    - header: x-goog-iap-jwt-assertion
+   *    - query: access_token
+   * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + int getJwtLocationsCount(); + /** + * + * + *
+   * Defines the locations to extract the JWT.  For now it is only used by the
+   * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+   * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+   *
+   * JWT locations can be one of HTTP headers, URL query parameters or
+   * cookies. The rule is that the first match wins.
+   *
+   * If not specified,  default to use following 3 locations:
+   *    1) Authorization: Bearer
+   *    2) x-goog-iap-jwt-assertion
+   *    3) access_token query parameter
+   *
+   * Default locations can be specified as followings:
+   *    jwt_locations:
+   *    - header: Authorization
+   *      value_prefix: "Bearer "
+   *    - header: x-goog-iap-jwt-assertion
+   *    - query: access_token
+   * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + java.util.List getJwtLocationsOrBuilderList(); + /** + * + * + *
+   * Defines the locations to extract the JWT.  For now it is only used by the
+   * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
+   * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
+   *
+   * JWT locations can be one of HTTP headers, URL query parameters or
+   * cookies. The rule is that the first match wins.
+   *
+   * If not specified,  default to use following 3 locations:
+   *    1) Authorization: Bearer
+   *    2) x-goog-iap-jwt-assertion
+   *    3) access_token query parameter
+   *
+   * Default locations can be specified as followings:
+   *    jwt_locations:
+   *    - header: Authorization
+   *      value_prefix: "Bearer "
+   *    - header: x-goog-iap-jwt-assertion
+   *    - query: access_token
+   * 
+ * + * repeated .google.api.JwtLocation jwt_locations = 6; + */ + com.google.api.JwtLocationOrBuilder getJwtLocationsOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthRequirement.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthRequirement.java new file mode 100644 index 000000000000..ebe94f41e9d9 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthRequirement.java @@ -0,0 +1,932 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * + * + *
+ * User-defined authentication requirements, including support for
+ * [JSON Web Token
+ * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
+ * 
+ * + * Protobuf type {@code google.api.AuthRequirement} + */ +public final class AuthRequirement extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.AuthRequirement) + AuthRequirementOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthRequirement.newBuilder() to construct. + private AuthRequirement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuthRequirement() { + providerId_ = ""; + audiences_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthRequirement(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthRequirement.class, com.google.api.AuthRequirement.Builder.class); + } + + public static final int PROVIDER_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object providerId_ = ""; + /** + * + * + *
+   * [id][google.api.AuthProvider.id] from authentication provider.
+   *
+   * Example:
+   *
+   *     provider_id: bookstore_auth
+   * 
+ * + * string provider_id = 1; + * + * @return The providerId. + */ + @java.lang.Override + public java.lang.String getProviderId() { + java.lang.Object ref = providerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerId_ = s; + return s; + } + } + /** + * + * + *
+   * [id][google.api.AuthProvider.id] from authentication provider.
+   *
+   * Example:
+   *
+   *     provider_id: bookstore_auth
+   * 
+ * + * string provider_id = 1; + * + * @return The bytes for providerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProviderIdBytes() { + java.lang.Object ref = providerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + providerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUDIENCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object audiences_ = ""; + /** + * + * + *
+   * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+   * implemented and accepted in all the runtime components.
+   *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, only JWTs with audience
+   * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+   * will be accepted. For example, if no audiences are in the setting,
+   * LibraryService API will only accept JWTs with the following audience
+   * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+   *
+   * Example:
+   *
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ * + * string audiences = 2; + * + * @return The audiences. + */ + @java.lang.Override + public java.lang.String getAudiences() { + java.lang.Object ref = audiences_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audiences_ = s; + return s; + } + } + /** + * + * + *
+   * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+   * implemented and accepted in all the runtime components.
+   *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, only JWTs with audience
+   * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+   * will be accepted. For example, if no audiences are in the setting,
+   * LibraryService API will only accept JWTs with the following audience
+   * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+   *
+   * Example:
+   *
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ * + * string audiences = 2; + * + * @return The bytes for audiences. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudiencesBytes() { + java.lang.Object ref = audiences_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audiences_ = 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(providerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, providerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audiences_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, audiences_); + } + 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(providerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, providerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audiences_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, audiences_); + } + 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.api.AuthRequirement)) { + return super.equals(obj); + } + com.google.api.AuthRequirement other = (com.google.api.AuthRequirement) obj; + + if (!getProviderId().equals(other.getProviderId())) return false; + if (!getAudiences().equals(other.getAudiences())) 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) + PROVIDER_ID_FIELD_NUMBER; + hash = (53 * hash) + getProviderId().hashCode(); + hash = (37 * hash) + AUDIENCES_FIELD_NUMBER; + hash = (53 * hash) + getAudiences().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.AuthRequirement parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.AuthRequirement parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.AuthRequirement parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.AuthRequirement 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.api.AuthRequirement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.AuthRequirement parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.AuthRequirement parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.AuthRequirement 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.api.AuthRequirement parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.AuthRequirement 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.api.AuthRequirement parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.AuthRequirement 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.api.AuthRequirement 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; + } + /** + * + * + *
+   * User-defined authentication requirements, including support for
+   * [JSON Web Token
+   * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
+   * 
+ * + * Protobuf type {@code google.api.AuthRequirement} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.AuthRequirement) + com.google.api.AuthRequirementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthRequirement.class, com.google.api.AuthRequirement.Builder.class); + } + + // Construct using com.google.api.AuthRequirement.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + providerId_ = ""; + audiences_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_AuthRequirement_descriptor; + } + + @java.lang.Override + public com.google.api.AuthRequirement getDefaultInstanceForType() { + return com.google.api.AuthRequirement.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.AuthRequirement build() { + com.google.api.AuthRequirement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.AuthRequirement buildPartial() { + com.google.api.AuthRequirement result = new com.google.api.AuthRequirement(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.AuthRequirement result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.providerId_ = providerId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.audiences_ = audiences_; + } + } + + @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.api.AuthRequirement) { + return mergeFrom((com.google.api.AuthRequirement) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.AuthRequirement other) { + if (other == com.google.api.AuthRequirement.getDefaultInstance()) return this; + if (!other.getProviderId().isEmpty()) { + providerId_ = other.providerId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAudiences().isEmpty()) { + audiences_ = other.audiences_; + 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: + { + providerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + audiences_ = 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 providerId_ = ""; + /** + * + * + *
+     * [id][google.api.AuthProvider.id] from authentication provider.
+     *
+     * Example:
+     *
+     *     provider_id: bookstore_auth
+     * 
+ * + * string provider_id = 1; + * + * @return The providerId. + */ + public java.lang.String getProviderId() { + java.lang.Object ref = providerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * [id][google.api.AuthProvider.id] from authentication provider.
+     *
+     * Example:
+     *
+     *     provider_id: bookstore_auth
+     * 
+ * + * string provider_id = 1; + * + * @return The bytes for providerId. + */ + public com.google.protobuf.ByteString getProviderIdBytes() { + java.lang.Object ref = providerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + providerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * [id][google.api.AuthProvider.id] from authentication provider.
+     *
+     * Example:
+     *
+     *     provider_id: bookstore_auth
+     * 
+ * + * string provider_id = 1; + * + * @param value The providerId to set. + * @return This builder for chaining. + */ + public Builder setProviderId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + providerId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * [id][google.api.AuthProvider.id] from authentication provider.
+     *
+     * Example:
+     *
+     *     provider_id: bookstore_auth
+     * 
+ * + * string provider_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProviderId() { + providerId_ = getDefaultInstance().getProviderId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * [id][google.api.AuthProvider.id] from authentication provider.
+     *
+     * Example:
+     *
+     *     provider_id: bookstore_auth
+     * 
+ * + * string provider_id = 1; + * + * @param value The bytes for providerId to set. + * @return This builder for chaining. + */ + public Builder setProviderIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + providerId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object audiences_ = ""; + /** + * + * + *
+     * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+     * implemented and accepted in all the runtime components.
+     *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, only JWTs with audience
+     * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+     * will be accepted. For example, if no audiences are in the setting,
+     * LibraryService API will only accept JWTs with the following audience
+     * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+     *
+     * Example:
+     *
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ * + * string audiences = 2; + * + * @return The audiences. + */ + public java.lang.String getAudiences() { + java.lang.Object ref = audiences_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audiences_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+     * implemented and accepted in all the runtime components.
+     *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, only JWTs with audience
+     * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+     * will be accepted. For example, if no audiences are in the setting,
+     * LibraryService API will only accept JWTs with the following audience
+     * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+     *
+     * Example:
+     *
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ * + * string audiences = 2; + * + * @return The bytes for audiences. + */ + public com.google.protobuf.ByteString getAudiencesBytes() { + java.lang.Object ref = audiences_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audiences_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+     * implemented and accepted in all the runtime components.
+     *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, only JWTs with audience
+     * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+     * will be accepted. For example, if no audiences are in the setting,
+     * LibraryService API will only accept JWTs with the following audience
+     * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+     *
+     * Example:
+     *
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ * + * string audiences = 2; + * + * @param value The audiences to set. + * @return This builder for chaining. + */ + public Builder setAudiences(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + audiences_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+     * implemented and accepted in all the runtime components.
+     *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, only JWTs with audience
+     * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+     * will be accepted. For example, if no audiences are in the setting,
+     * LibraryService API will only accept JWTs with the following audience
+     * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+     *
+     * Example:
+     *
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ * + * string audiences = 2; + * + * @return This builder for chaining. + */ + public Builder clearAudiences() { + audiences_ = getDefaultInstance().getAudiences(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+     * implemented and accepted in all the runtime components.
+     *
+     * The list of JWT
+     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+     * that are allowed to access. A JWT containing any of these audiences will
+     * be accepted. When this setting is absent, only JWTs with audience
+     * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+     * will be accepted. For example, if no audiences are in the setting,
+     * LibraryService API will only accept JWTs with the following audience
+     * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+     *
+     * Example:
+     *
+     *     audiences: bookstore_android.apps.googleusercontent.com,
+     *                bookstore_web.apps.googleusercontent.com
+     * 
+ * + * string audiences = 2; + * + * @param value The bytes for audiences to set. + * @return This builder for chaining. + */ + public Builder setAudiencesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + audiences_ = 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.api.AuthRequirement) + } + + // @@protoc_insertion_point(class_scope:google.api.AuthRequirement) + private static final com.google.api.AuthRequirement DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.AuthRequirement(); + } + + public static com.google.api.AuthRequirement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthRequirement 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.api.AuthRequirement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthRequirementOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthRequirementOrBuilder.java new file mode 100644 index 000000000000..39e65c0d66e9 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthRequirementOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface AuthRequirementOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.AuthRequirement) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * [id][google.api.AuthProvider.id] from authentication provider.
+   *
+   * Example:
+   *
+   *     provider_id: bookstore_auth
+   * 
+ * + * string provider_id = 1; + * + * @return The providerId. + */ + java.lang.String getProviderId(); + /** + * + * + *
+   * [id][google.api.AuthProvider.id] from authentication provider.
+   *
+   * Example:
+   *
+   *     provider_id: bookstore_auth
+   * 
+ * + * string provider_id = 1; + * + * @return The bytes for providerId. + */ + com.google.protobuf.ByteString getProviderIdBytes(); + + /** + * + * + *
+   * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+   * implemented and accepted in all the runtime components.
+   *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, only JWTs with audience
+   * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+   * will be accepted. For example, if no audiences are in the setting,
+   * LibraryService API will only accept JWTs with the following audience
+   * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+   *
+   * Example:
+   *
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ * + * string audiences = 2; + * + * @return The audiences. + */ + java.lang.String getAudiences(); + /** + * + * + *
+   * NOTE: This will be deprecated soon, once AuthProvider.audiences is
+   * implemented and accepted in all the runtime components.
+   *
+   * The list of JWT
+   * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
+   * that are allowed to access. A JWT containing any of these audiences will
+   * be accepted. When this setting is absent, only JWTs with audience
+   * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
+   * will be accepted. For example, if no audiences are in the setting,
+   * LibraryService API will only accept JWTs with the following audience
+   * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
+   *
+   * Example:
+   *
+   *     audiences: bookstore_android.apps.googleusercontent.com,
+   *                bookstore_web.apps.googleusercontent.com
+   * 
+ * + * string audiences = 2; + * + * @return The bytes for audiences. + */ + com.google.protobuf.ByteString getAudiencesBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Authentication.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Authentication.java new file mode 100644 index 000000000000..0238dd3d1c40 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Authentication.java @@ -0,0 +1,1484 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * + * + *
+ * `Authentication` defines the authentication configuration for API methods
+ * provided by an API service.
+ *
+ * Example:
+ *
+ *     name: calendar.googleapis.com
+ *     authentication:
+ *       providers:
+ *       - id: google_calendar_auth
+ *         jwks_uri: https://www.googleapis.com/oauth2/v1/certs
+ *         issuer: https://securetoken.google.com
+ *       rules:
+ *       - selector: "*"
+ *         requirements:
+ *           provider_id: google_calendar_auth
+ *       - selector: google.calendar.Delegate
+ *         oauth:
+ *           canonical_scopes: https://www.googleapis.com/auth/calendar.read
+ * 
+ * + * Protobuf type {@code google.api.Authentication} + */ +public final class Authentication extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Authentication) + AuthenticationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Authentication.newBuilder() to construct. + private Authentication(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Authentication() { + rules_ = java.util.Collections.emptyList(); + providers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Authentication(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_Authentication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_Authentication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Authentication.class, com.google.api.Authentication.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List rules_; + /** + * + * + *
+   * A list of authentication rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + /** + * + * + *
+   * A list of authentication rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + @java.lang.Override + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * + * + *
+   * A list of authentication rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + /** + * + * + *
+   * A list of authentication rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + @java.lang.Override + public com.google.api.AuthenticationRule getRules(int index) { + return rules_.get(index); + } + /** + * + * + *
+   * A list of authentication rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + @java.lang.Override + public com.google.api.AuthenticationRuleOrBuilder getRulesOrBuilder(int index) { + return rules_.get(index); + } + + public static final int PROVIDERS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List providers_; + /** + * + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + @java.lang.Override + public java.util.List getProvidersList() { + return providers_; + } + /** + * + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + @java.lang.Override + public java.util.List + getProvidersOrBuilderList() { + return providers_; + } + /** + * + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + @java.lang.Override + public int getProvidersCount() { + return providers_.size(); + } + /** + * + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + @java.lang.Override + public com.google.api.AuthProvider getProviders(int index) { + return providers_.get(index); + } + /** + * + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + @java.lang.Override + public com.google.api.AuthProviderOrBuilder getProvidersOrBuilder(int index) { + return providers_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(3, rules_.get(i)); + } + for (int i = 0; i < providers_.size(); i++) { + output.writeMessage(4, providers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, rules_.get(i)); + } + for (int i = 0; i < providers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, providers_.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.api.Authentication)) { + return super.equals(obj); + } + com.google.api.Authentication other = (com.google.api.Authentication) obj; + + if (!getRulesList().equals(other.getRulesList())) return false; + if (!getProvidersList().equals(other.getProvidersList())) 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 (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + if (getProvidersCount() > 0) { + hash = (37 * hash) + PROVIDERS_FIELD_NUMBER; + hash = (53 * hash) + getProvidersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Authentication parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Authentication parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Authentication parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Authentication 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.api.Authentication parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Authentication parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Authentication parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Authentication 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.api.Authentication parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Authentication 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.api.Authentication parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Authentication 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.api.Authentication 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; + } + /** + * + * + *
+   * `Authentication` defines the authentication configuration for API methods
+   * provided by an API service.
+   *
+   * Example:
+   *
+   *     name: calendar.googleapis.com
+   *     authentication:
+   *       providers:
+   *       - id: google_calendar_auth
+   *         jwks_uri: https://www.googleapis.com/oauth2/v1/certs
+   *         issuer: https://securetoken.google.com
+   *       rules:
+   *       - selector: "*"
+   *         requirements:
+   *           provider_id: google_calendar_auth
+   *       - selector: google.calendar.Delegate
+   *         oauth:
+   *           canonical_scopes: https://www.googleapis.com/auth/calendar.read
+   * 
+ * + * Protobuf type {@code google.api.Authentication} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Authentication) + com.google.api.AuthenticationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_Authentication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_Authentication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Authentication.class, com.google.api.Authentication.Builder.class); + } + + // Construct using com.google.api.Authentication.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (providersBuilder_ == null) { + providers_ = java.util.Collections.emptyList(); + } else { + providers_ = null; + providersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_Authentication_descriptor; + } + + @java.lang.Override + public com.google.api.Authentication getDefaultInstanceForType() { + return com.google.api.Authentication.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Authentication build() { + com.google.api.Authentication result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Authentication buildPartial() { + com.google.api.Authentication result = new com.google.api.Authentication(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Authentication result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + if (providersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + providers_ = java.util.Collections.unmodifiableList(providers_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.providers_ = providers_; + } else { + result.providers_ = providersBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Authentication result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Authentication) { + return mergeFrom((com.google.api.Authentication) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Authentication other) { + if (other == com.google.api.Authentication.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (providersBuilder_ == null) { + if (!other.providers_.isEmpty()) { + if (providers_.isEmpty()) { + providers_ = other.providers_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureProvidersIsMutable(); + providers_.addAll(other.providers_); + } + onChanged(); + } + } else { + if (!other.providers_.isEmpty()) { + if (providersBuilder_.isEmpty()) { + providersBuilder_.dispose(); + providersBuilder_ = null; + providers_ = other.providers_; + bitField0_ = (bitField0_ & ~0x00000002); + providersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProvidersFieldBuilder() + : null; + } else { + providersBuilder_.addAllMessages(other.providers_); + } + } + } + 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 26: + { + com.google.api.AuthenticationRule m = + input.readMessage( + com.google.api.AuthenticationRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.api.AuthProvider m = + input.readMessage(com.google.api.AuthProvider.parser(), extensionRegistry); + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + providers_.add(m); + } else { + providersBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List rules_ = + java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.AuthenticationRule, + com.google.api.AuthenticationRule.Builder, + com.google.api.AuthenticationRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public com.google.api.AuthenticationRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public Builder setRules(int index, com.google.api.AuthenticationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public Builder setRules(int index, com.google.api.AuthenticationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public Builder addRules(com.google.api.AuthenticationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public Builder addRules(int index, com.google.api.AuthenticationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public Builder addRules(com.google.api.AuthenticationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public Builder addRules(int index, com.google.api.AuthenticationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public com.google.api.AuthenticationRule.Builder getRulesBuilder(int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public com.google.api.AuthenticationRuleOrBuilder getRulesOrBuilder(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public com.google.api.AuthenticationRule.Builder addRulesBuilder() { + return getRulesFieldBuilder() + .addBuilder(com.google.api.AuthenticationRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public com.google.api.AuthenticationRule.Builder addRulesBuilder(int index) { + return getRulesFieldBuilder() + .addBuilder(index, com.google.api.AuthenticationRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of authentication rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + public java.util.List getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.AuthenticationRule, + com.google.api.AuthenticationRule.Builder, + com.google.api.AuthenticationRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.AuthenticationRule, + com.google.api.AuthenticationRule.Builder, + com.google.api.AuthenticationRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private java.util.List providers_ = + java.util.Collections.emptyList(); + + private void ensureProvidersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + providers_ = new java.util.ArrayList(providers_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.AuthProvider, + com.google.api.AuthProvider.Builder, + com.google.api.AuthProviderOrBuilder> + providersBuilder_; + + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public java.util.List getProvidersList() { + if (providersBuilder_ == null) { + return java.util.Collections.unmodifiableList(providers_); + } else { + return providersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public int getProvidersCount() { + if (providersBuilder_ == null) { + return providers_.size(); + } else { + return providersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public com.google.api.AuthProvider getProviders(int index) { + if (providersBuilder_ == null) { + return providers_.get(index); + } else { + return providersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public Builder setProviders(int index, com.google.api.AuthProvider value) { + if (providersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidersIsMutable(); + providers_.set(index, value); + onChanged(); + } else { + providersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public Builder setProviders(int index, com.google.api.AuthProvider.Builder builderForValue) { + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + providers_.set(index, builderForValue.build()); + onChanged(); + } else { + providersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public Builder addProviders(com.google.api.AuthProvider value) { + if (providersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidersIsMutable(); + providers_.add(value); + onChanged(); + } else { + providersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public Builder addProviders(int index, com.google.api.AuthProvider value) { + if (providersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidersIsMutable(); + providers_.add(index, value); + onChanged(); + } else { + providersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public Builder addProviders(com.google.api.AuthProvider.Builder builderForValue) { + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + providers_.add(builderForValue.build()); + onChanged(); + } else { + providersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public Builder addProviders(int index, com.google.api.AuthProvider.Builder builderForValue) { + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + providers_.add(index, builderForValue.build()); + onChanged(); + } else { + providersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public Builder addAllProviders( + java.lang.Iterable values) { + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, providers_); + onChanged(); + } else { + providersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public Builder clearProviders() { + if (providersBuilder_ == null) { + providers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + providersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public Builder removeProviders(int index) { + if (providersBuilder_ == null) { + ensureProvidersIsMutable(); + providers_.remove(index); + onChanged(); + } else { + providersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public com.google.api.AuthProvider.Builder getProvidersBuilder(int index) { + return getProvidersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public com.google.api.AuthProviderOrBuilder getProvidersOrBuilder(int index) { + if (providersBuilder_ == null) { + return providers_.get(index); + } else { + return providersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public java.util.List + getProvidersOrBuilderList() { + if (providersBuilder_ != null) { + return providersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(providers_); + } + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public com.google.api.AuthProvider.Builder addProvidersBuilder() { + return getProvidersFieldBuilder() + .addBuilder(com.google.api.AuthProvider.getDefaultInstance()); + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public com.google.api.AuthProvider.Builder addProvidersBuilder(int index) { + return getProvidersFieldBuilder() + .addBuilder(index, com.google.api.AuthProvider.getDefaultInstance()); + } + /** + * + * + *
+     * Defines a set of authentication providers that a service supports.
+     * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + public java.util.List getProvidersBuilderList() { + return getProvidersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.AuthProvider, + com.google.api.AuthProvider.Builder, + com.google.api.AuthProviderOrBuilder> + getProvidersFieldBuilder() { + if (providersBuilder_ == null) { + providersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.AuthProvider, + com.google.api.AuthProvider.Builder, + com.google.api.AuthProviderOrBuilder>( + providers_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + providers_ = null; + } + return providersBuilder_; + } + + @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.api.Authentication) + } + + // @@protoc_insertion_point(class_scope:google.api.Authentication) + private static final com.google.api.Authentication DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Authentication(); + } + + public static com.google.api.Authentication getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Authentication 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.api.Authentication getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthenticationOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthenticationOrBuilder.java new file mode 100644 index 000000000000..e44ad0e96ba0 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthenticationOrBuilder.java @@ -0,0 +1,137 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface AuthenticationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Authentication) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of authentication rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + java.util.List getRulesList(); + /** + * + * + *
+   * A list of authentication rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + com.google.api.AuthenticationRule getRules(int index); + /** + * + * + *
+   * A list of authentication rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + int getRulesCount(); + /** + * + * + *
+   * A list of authentication rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + java.util.List getRulesOrBuilderList(); + /** + * + * + *
+   * A list of authentication rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.AuthenticationRule rules = 3; + */ + com.google.api.AuthenticationRuleOrBuilder getRulesOrBuilder(int index); + + /** + * + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + java.util.List getProvidersList(); + /** + * + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + com.google.api.AuthProvider getProviders(int index); + /** + * + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + int getProvidersCount(); + /** + * + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + java.util.List getProvidersOrBuilderList(); + /** + * + * + *
+   * Defines a set of authentication providers that a service supports.
+   * 
+ * + * repeated .google.api.AuthProvider providers = 4; + */ + com.google.api.AuthProviderOrBuilder getProvidersOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthenticationRule.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthenticationRule.java new file mode 100644 index 000000000000..3874c1cfdeb5 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthenticationRule.java @@ -0,0 +1,1496 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * + * + *
+ * Authentication rules for the service.
+ *
+ * By default, if a method has any authentication requirements, every request
+ * must include a valid credential matching one of the requirements.
+ * It's an error to include more than one kind of credential in a single
+ * request.
+ *
+ * If a method doesn't have any auth requirements, request credentials will be
+ * ignored.
+ * 
+ * + * Protobuf type {@code google.api.AuthenticationRule} + */ +public final class AuthenticationRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.AuthenticationRule) + AuthenticationRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthenticationRule.newBuilder() to construct. + private AuthenticationRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuthenticationRule() { + selector_ = ""; + requirements_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthenticationRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthenticationRule.class, + com.google.api.AuthenticationRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object selector_ = ""; + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + @java.lang.Override + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OAUTH_FIELD_NUMBER = 2; + private com.google.api.OAuthRequirements oauth_; + /** + * + * + *
+   * The requirements for OAuth credentials.
+   * 
+ * + * .google.api.OAuthRequirements oauth = 2; + * + * @return Whether the oauth field is set. + */ + @java.lang.Override + public boolean hasOauth() { + return oauth_ != null; + } + /** + * + * + *
+   * The requirements for OAuth credentials.
+   * 
+ * + * .google.api.OAuthRequirements oauth = 2; + * + * @return The oauth. + */ + @java.lang.Override + public com.google.api.OAuthRequirements getOauth() { + return oauth_ == null ? com.google.api.OAuthRequirements.getDefaultInstance() : oauth_; + } + /** + * + * + *
+   * The requirements for OAuth credentials.
+   * 
+ * + * .google.api.OAuthRequirements oauth = 2; + */ + @java.lang.Override + public com.google.api.OAuthRequirementsOrBuilder getOauthOrBuilder() { + return oauth_ == null ? com.google.api.OAuthRequirements.getDefaultInstance() : oauth_; + } + + public static final int ALLOW_WITHOUT_CREDENTIAL_FIELD_NUMBER = 5; + private boolean allowWithoutCredential_ = false; + /** + * + * + *
+   * If true, the service accepts API keys without any other credential.
+   * This flag only applies to HTTP and gRPC requests.
+   * 
+ * + * bool allow_without_credential = 5; + * + * @return The allowWithoutCredential. + */ + @java.lang.Override + public boolean getAllowWithoutCredential() { + return allowWithoutCredential_; + } + + public static final int REQUIREMENTS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List requirements_; + /** + * + * + *
+   * Requirements for additional authentication providers.
+   * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + @java.lang.Override + public java.util.List getRequirementsList() { + return requirements_; + } + /** + * + * + *
+   * Requirements for additional authentication providers.
+   * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + @java.lang.Override + public java.util.List + getRequirementsOrBuilderList() { + return requirements_; + } + /** + * + * + *
+   * Requirements for additional authentication providers.
+   * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + @java.lang.Override + public int getRequirementsCount() { + return requirements_.size(); + } + /** + * + * + *
+   * Requirements for additional authentication providers.
+   * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + @java.lang.Override + public com.google.api.AuthRequirement getRequirements(int index) { + return requirements_.get(index); + } + /** + * + * + *
+   * Requirements for additional authentication providers.
+   * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + @java.lang.Override + public com.google.api.AuthRequirementOrBuilder getRequirementsOrBuilder(int index) { + return requirements_.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(selector_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_); + } + if (oauth_ != null) { + output.writeMessage(2, getOauth()); + } + if (allowWithoutCredential_ != false) { + output.writeBool(5, allowWithoutCredential_); + } + for (int i = 0; i < requirements_.size(); i++) { + output.writeMessage(7, requirements_.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(selector_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_); + } + if (oauth_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOauth()); + } + if (allowWithoutCredential_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowWithoutCredential_); + } + for (int i = 0; i < requirements_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, requirements_.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.api.AuthenticationRule)) { + return super.equals(obj); + } + com.google.api.AuthenticationRule other = (com.google.api.AuthenticationRule) obj; + + if (!getSelector().equals(other.getSelector())) return false; + if (hasOauth() != other.hasOauth()) return false; + if (hasOauth()) { + if (!getOauth().equals(other.getOauth())) return false; + } + if (getAllowWithoutCredential() != other.getAllowWithoutCredential()) return false; + if (!getRequirementsList().equals(other.getRequirementsList())) 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) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + if (hasOauth()) { + hash = (37 * hash) + OAUTH_FIELD_NUMBER; + hash = (53 * hash) + getOauth().hashCode(); + } + hash = (37 * hash) + ALLOW_WITHOUT_CREDENTIAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowWithoutCredential()); + if (getRequirementsCount() > 0) { + hash = (37 * hash) + REQUIREMENTS_FIELD_NUMBER; + hash = (53 * hash) + getRequirementsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.AuthenticationRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.AuthenticationRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.AuthenticationRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.AuthenticationRule 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.api.AuthenticationRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.AuthenticationRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.AuthenticationRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.AuthenticationRule 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.api.AuthenticationRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.AuthenticationRule 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.api.AuthenticationRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.AuthenticationRule 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.api.AuthenticationRule 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; + } + /** + * + * + *
+   * Authentication rules for the service.
+   *
+   * By default, if a method has any authentication requirements, every request
+   * must include a valid credential matching one of the requirements.
+   * It's an error to include more than one kind of credential in a single
+   * request.
+   *
+   * If a method doesn't have any auth requirements, request credentials will be
+   * ignored.
+   * 
+ * + * Protobuf type {@code google.api.AuthenticationRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.AuthenticationRule) + com.google.api.AuthenticationRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto + .internal_static_google_api_AuthenticationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.AuthenticationRule.class, + com.google.api.AuthenticationRule.Builder.class); + } + + // Construct using com.google.api.AuthenticationRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selector_ = ""; + oauth_ = null; + if (oauthBuilder_ != null) { + oauthBuilder_.dispose(); + oauthBuilder_ = null; + } + allowWithoutCredential_ = false; + if (requirementsBuilder_ == null) { + requirements_ = java.util.Collections.emptyList(); + } else { + requirements_ = null; + requirementsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor; + } + + @java.lang.Override + public com.google.api.AuthenticationRule getDefaultInstanceForType() { + return com.google.api.AuthenticationRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.AuthenticationRule build() { + com.google.api.AuthenticationRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.AuthenticationRule buildPartial() { + com.google.api.AuthenticationRule result = new com.google.api.AuthenticationRule(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.AuthenticationRule result) { + if (requirementsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + requirements_ = java.util.Collections.unmodifiableList(requirements_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.requirements_ = requirements_; + } else { + result.requirements_ = requirementsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.AuthenticationRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selector_ = selector_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.oauth_ = oauthBuilder_ == null ? oauth_ : oauthBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.allowWithoutCredential_ = allowWithoutCredential_; + } + } + + @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.api.AuthenticationRule) { + return mergeFrom((com.google.api.AuthenticationRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.AuthenticationRule other) { + if (other == com.google.api.AuthenticationRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasOauth()) { + mergeOauth(other.getOauth()); + } + if (other.getAllowWithoutCredential() != false) { + setAllowWithoutCredential(other.getAllowWithoutCredential()); + } + if (requirementsBuilder_ == null) { + if (!other.requirements_.isEmpty()) { + if (requirements_.isEmpty()) { + requirements_ = other.requirements_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureRequirementsIsMutable(); + requirements_.addAll(other.requirements_); + } + onChanged(); + } + } else { + if (!other.requirements_.isEmpty()) { + if (requirementsBuilder_.isEmpty()) { + requirementsBuilder_.dispose(); + requirementsBuilder_ = null; + requirements_ = other.requirements_; + bitField0_ = (bitField0_ & ~0x00000008); + requirementsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequirementsFieldBuilder() + : null; + } else { + requirementsBuilder_.addAllMessages(other.requirements_); + } + } + } + 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: + { + selector_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getOauthFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 40: + { + allowWithoutCredential_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 40 + case 58: + { + com.google.api.AuthRequirement m = + input.readMessage(com.google.api.AuthRequirement.parser(), extensionRegistry); + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + requirements_.add(m); + } else { + requirementsBuilder_.addMessage(m); + } + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return The selector. + */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @param value The selector to set. + * @return This builder for chaining. + */ + public Builder setSelector(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return This builder for chaining. + */ + public Builder clearSelector() { + selector_ = getDefaultInstance().getSelector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @param value The bytes for selector to set. + * @return This builder for chaining. + */ + public Builder setSelectorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.api.OAuthRequirements oauth_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.OAuthRequirements, + com.google.api.OAuthRequirements.Builder, + com.google.api.OAuthRequirementsOrBuilder> + oauthBuilder_; + /** + * + * + *
+     * The requirements for OAuth credentials.
+     * 
+ * + * .google.api.OAuthRequirements oauth = 2; + * + * @return Whether the oauth field is set. + */ + public boolean hasOauth() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The requirements for OAuth credentials.
+     * 
+ * + * .google.api.OAuthRequirements oauth = 2; + * + * @return The oauth. + */ + public com.google.api.OAuthRequirements getOauth() { + if (oauthBuilder_ == null) { + return oauth_ == null ? com.google.api.OAuthRequirements.getDefaultInstance() : oauth_; + } else { + return oauthBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The requirements for OAuth credentials.
+     * 
+ * + * .google.api.OAuthRequirements oauth = 2; + */ + public Builder setOauth(com.google.api.OAuthRequirements value) { + if (oauthBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oauth_ = value; + } else { + oauthBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The requirements for OAuth credentials.
+     * 
+ * + * .google.api.OAuthRequirements oauth = 2; + */ + public Builder setOauth(com.google.api.OAuthRequirements.Builder builderForValue) { + if (oauthBuilder_ == null) { + oauth_ = builderForValue.build(); + } else { + oauthBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The requirements for OAuth credentials.
+     * 
+ * + * .google.api.OAuthRequirements oauth = 2; + */ + public Builder mergeOauth(com.google.api.OAuthRequirements value) { + if (oauthBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && oauth_ != null + && oauth_ != com.google.api.OAuthRequirements.getDefaultInstance()) { + getOauthBuilder().mergeFrom(value); + } else { + oauth_ = value; + } + } else { + oauthBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The requirements for OAuth credentials.
+     * 
+ * + * .google.api.OAuthRequirements oauth = 2; + */ + public Builder clearOauth() { + bitField0_ = (bitField0_ & ~0x00000002); + oauth_ = null; + if (oauthBuilder_ != null) { + oauthBuilder_.dispose(); + oauthBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The requirements for OAuth credentials.
+     * 
+ * + * .google.api.OAuthRequirements oauth = 2; + */ + public com.google.api.OAuthRequirements.Builder getOauthBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOauthFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The requirements for OAuth credentials.
+     * 
+ * + * .google.api.OAuthRequirements oauth = 2; + */ + public com.google.api.OAuthRequirementsOrBuilder getOauthOrBuilder() { + if (oauthBuilder_ != null) { + return oauthBuilder_.getMessageOrBuilder(); + } else { + return oauth_ == null ? com.google.api.OAuthRequirements.getDefaultInstance() : oauth_; + } + } + /** + * + * + *
+     * The requirements for OAuth credentials.
+     * 
+ * + * .google.api.OAuthRequirements oauth = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.OAuthRequirements, + com.google.api.OAuthRequirements.Builder, + com.google.api.OAuthRequirementsOrBuilder> + getOauthFieldBuilder() { + if (oauthBuilder_ == null) { + oauthBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.OAuthRequirements, + com.google.api.OAuthRequirements.Builder, + com.google.api.OAuthRequirementsOrBuilder>( + getOauth(), getParentForChildren(), isClean()); + oauth_ = null; + } + return oauthBuilder_; + } + + private boolean allowWithoutCredential_; + /** + * + * + *
+     * If true, the service accepts API keys without any other credential.
+     * This flag only applies to HTTP and gRPC requests.
+     * 
+ * + * bool allow_without_credential = 5; + * + * @return The allowWithoutCredential. + */ + @java.lang.Override + public boolean getAllowWithoutCredential() { + return allowWithoutCredential_; + } + /** + * + * + *
+     * If true, the service accepts API keys without any other credential.
+     * This flag only applies to HTTP and gRPC requests.
+     * 
+ * + * bool allow_without_credential = 5; + * + * @param value The allowWithoutCredential to set. + * @return This builder for chaining. + */ + public Builder setAllowWithoutCredential(boolean value) { + + allowWithoutCredential_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, the service accepts API keys without any other credential.
+     * This flag only applies to HTTP and gRPC requests.
+     * 
+ * + * bool allow_without_credential = 5; + * + * @return This builder for chaining. + */ + public Builder clearAllowWithoutCredential() { + bitField0_ = (bitField0_ & ~0x00000004); + allowWithoutCredential_ = false; + onChanged(); + return this; + } + + private java.util.List requirements_ = + java.util.Collections.emptyList(); + + private void ensureRequirementsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + requirements_ = new java.util.ArrayList(requirements_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.AuthRequirement, + com.google.api.AuthRequirement.Builder, + com.google.api.AuthRequirementOrBuilder> + requirementsBuilder_; + + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public java.util.List getRequirementsList() { + if (requirementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requirements_); + } else { + return requirementsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public int getRequirementsCount() { + if (requirementsBuilder_ == null) { + return requirements_.size(); + } else { + return requirementsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public com.google.api.AuthRequirement getRequirements(int index) { + if (requirementsBuilder_ == null) { + return requirements_.get(index); + } else { + return requirementsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public Builder setRequirements(int index, com.google.api.AuthRequirement value) { + if (requirementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequirementsIsMutable(); + requirements_.set(index, value); + onChanged(); + } else { + requirementsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public Builder setRequirements( + int index, com.google.api.AuthRequirement.Builder builderForValue) { + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + requirements_.set(index, builderForValue.build()); + onChanged(); + } else { + requirementsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public Builder addRequirements(com.google.api.AuthRequirement value) { + if (requirementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequirementsIsMutable(); + requirements_.add(value); + onChanged(); + } else { + requirementsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public Builder addRequirements(int index, com.google.api.AuthRequirement value) { + if (requirementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequirementsIsMutable(); + requirements_.add(index, value); + onChanged(); + } else { + requirementsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public Builder addRequirements(com.google.api.AuthRequirement.Builder builderForValue) { + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + requirements_.add(builderForValue.build()); + onChanged(); + } else { + requirementsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public Builder addRequirements( + int index, com.google.api.AuthRequirement.Builder builderForValue) { + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + requirements_.add(index, builderForValue.build()); + onChanged(); + } else { + requirementsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public Builder addAllRequirements( + java.lang.Iterable values) { + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requirements_); + onChanged(); + } else { + requirementsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public Builder clearRequirements() { + if (requirementsBuilder_ == null) { + requirements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + requirementsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public Builder removeRequirements(int index) { + if (requirementsBuilder_ == null) { + ensureRequirementsIsMutable(); + requirements_.remove(index); + onChanged(); + } else { + requirementsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public com.google.api.AuthRequirement.Builder getRequirementsBuilder(int index) { + return getRequirementsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public com.google.api.AuthRequirementOrBuilder getRequirementsOrBuilder(int index) { + if (requirementsBuilder_ == null) { + return requirements_.get(index); + } else { + return requirementsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public java.util.List + getRequirementsOrBuilderList() { + if (requirementsBuilder_ != null) { + return requirementsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requirements_); + } + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public com.google.api.AuthRequirement.Builder addRequirementsBuilder() { + return getRequirementsFieldBuilder() + .addBuilder(com.google.api.AuthRequirement.getDefaultInstance()); + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public com.google.api.AuthRequirement.Builder addRequirementsBuilder(int index) { + return getRequirementsFieldBuilder() + .addBuilder(index, com.google.api.AuthRequirement.getDefaultInstance()); + } + /** + * + * + *
+     * Requirements for additional authentication providers.
+     * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + public java.util.List getRequirementsBuilderList() { + return getRequirementsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.AuthRequirement, + com.google.api.AuthRequirement.Builder, + com.google.api.AuthRequirementOrBuilder> + getRequirementsFieldBuilder() { + if (requirementsBuilder_ == null) { + requirementsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.AuthRequirement, + com.google.api.AuthRequirement.Builder, + com.google.api.AuthRequirementOrBuilder>( + requirements_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + requirements_ = null; + } + return requirementsBuilder_; + } + + @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.api.AuthenticationRule) + } + + // @@protoc_insertion_point(class_scope:google.api.AuthenticationRule) + private static final com.google.api.AuthenticationRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.AuthenticationRule(); + } + + public static com.google.api.AuthenticationRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthenticationRule 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.api.AuthenticationRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthenticationRuleOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthenticationRuleOrBuilder.java new file mode 100644 index 000000000000..b2b2c1bc5e85 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/AuthenticationRuleOrBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface AuthenticationRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.AuthenticationRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + java.lang.String getSelector(); + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + com.google.protobuf.ByteString getSelectorBytes(); + + /** + * + * + *
+   * The requirements for OAuth credentials.
+   * 
+ * + * .google.api.OAuthRequirements oauth = 2; + * + * @return Whether the oauth field is set. + */ + boolean hasOauth(); + /** + * + * + *
+   * The requirements for OAuth credentials.
+   * 
+ * + * .google.api.OAuthRequirements oauth = 2; + * + * @return The oauth. + */ + com.google.api.OAuthRequirements getOauth(); + /** + * + * + *
+   * The requirements for OAuth credentials.
+   * 
+ * + * .google.api.OAuthRequirements oauth = 2; + */ + com.google.api.OAuthRequirementsOrBuilder getOauthOrBuilder(); + + /** + * + * + *
+   * If true, the service accepts API keys without any other credential.
+   * This flag only applies to HTTP and gRPC requests.
+   * 
+ * + * bool allow_without_credential = 5; + * + * @return The allowWithoutCredential. + */ + boolean getAllowWithoutCredential(); + + /** + * + * + *
+   * Requirements for additional authentication providers.
+   * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + java.util.List getRequirementsList(); + /** + * + * + *
+   * Requirements for additional authentication providers.
+   * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + com.google.api.AuthRequirement getRequirements(int index); + /** + * + * + *
+   * Requirements for additional authentication providers.
+   * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + int getRequirementsCount(); + /** + * + * + *
+   * Requirements for additional authentication providers.
+   * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + java.util.List getRequirementsOrBuilderList(); + /** + * + * + *
+   * Requirements for additional authentication providers.
+   * 
+ * + * repeated .google.api.AuthRequirement requirements = 7; + */ + com.google.api.AuthRequirementOrBuilder getRequirementsOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Backend.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Backend.java new file mode 100644 index 000000000000..ad8a33ef809c --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Backend.java @@ -0,0 +1,960 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/backend.proto + +package com.google.api; + +/** + * + * + *
+ * `Backend` defines the backend configuration for a service.
+ * 
+ * + * Protobuf type {@code google.api.Backend} + */ +public final class Backend extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Backend) + BackendOrBuilder { + private static final long serialVersionUID = 0L; + // Use Backend.newBuilder() to construct. + private Backend(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Backend() { + rules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Backend(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.BackendProto.internal_static_google_api_Backend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.BackendProto.internal_static_google_api_Backend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Backend.class, com.google.api.Backend.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List rules_; + /** + * + * + *
+   * A list of API backend rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + /** + * + * + *
+   * A list of API backend rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + @java.lang.Override + public java.util.List getRulesOrBuilderList() { + return rules_; + } + /** + * + * + *
+   * A list of API backend rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + /** + * + * + *
+   * A list of API backend rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + @java.lang.Override + public com.google.api.BackendRule getRules(int index) { + return rules_.get(index); + } + /** + * + * + *
+   * A list of API backend rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + @java.lang.Override + public com.google.api.BackendRuleOrBuilder getRulesOrBuilder(int index) { + return rules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(1, rules_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rules_.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.api.Backend)) { + return super.equals(obj); + } + com.google.api.Backend other = (com.google.api.Backend) obj; + + if (!getRulesList().equals(other.getRulesList())) 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 (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Backend parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Backend parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Backend parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Backend 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.api.Backend parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Backend parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Backend parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Backend 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.api.Backend parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Backend 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.api.Backend parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Backend 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.api.Backend 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; + } + /** + * + * + *
+   * `Backend` defines the backend configuration for a service.
+   * 
+ * + * Protobuf type {@code google.api.Backend} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Backend) + com.google.api.BackendOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.BackendProto.internal_static_google_api_Backend_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.BackendProto.internal_static_google_api_Backend_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Backend.class, com.google.api.Backend.Builder.class); + } + + // Construct using com.google.api.Backend.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.BackendProto.internal_static_google_api_Backend_descriptor; + } + + @java.lang.Override + public com.google.api.Backend getDefaultInstanceForType() { + return com.google.api.Backend.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Backend build() { + com.google.api.Backend result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Backend buildPartial() { + com.google.api.Backend result = new com.google.api.Backend(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Backend result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Backend result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Backend) { + return mergeFrom((com.google.api.Backend) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Backend other) { + if (other == com.google.api.Backend.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + 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.api.BackendRule m = + input.readMessage(com.google.api.BackendRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List rules_ = java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.BackendRule, + com.google.api.BackendRule.Builder, + com.google.api.BackendRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public com.google.api.BackendRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public Builder setRules(int index, com.google.api.BackendRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public Builder setRules(int index, com.google.api.BackendRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public Builder addRules(com.google.api.BackendRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public Builder addRules(int index, com.google.api.BackendRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public Builder addRules(com.google.api.BackendRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public Builder addRules(int index, com.google.api.BackendRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public Builder addAllRules(java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public com.google.api.BackendRule.Builder getRulesBuilder(int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public com.google.api.BackendRuleOrBuilder getRulesOrBuilder(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public java.util.List getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public com.google.api.BackendRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder(com.google.api.BackendRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public com.google.api.BackendRule.Builder addRulesBuilder(int index) { + return getRulesFieldBuilder() + .addBuilder(index, com.google.api.BackendRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of API backend rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + public java.util.List getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.BackendRule, + com.google.api.BackendRule.Builder, + com.google.api.BackendRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.BackendRule, + com.google.api.BackendRule.Builder, + com.google.api.BackendRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + @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.api.Backend) + } + + // @@protoc_insertion_point(class_scope:google.api.Backend) + private static final com.google.api.Backend DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Backend(); + } + + public static com.google.api.Backend getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Backend 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.api.Backend getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendOrBuilder.java new file mode 100644 index 000000000000..de0ff77eaed0 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/backend.proto + +package com.google.api; + +public interface BackendOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Backend) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of API backend rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + java.util.List getRulesList(); + /** + * + * + *
+   * A list of API backend rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + com.google.api.BackendRule getRules(int index); + /** + * + * + *
+   * A list of API backend rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + int getRulesCount(); + /** + * + * + *
+   * A list of API backend rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + java.util.List getRulesOrBuilderList(); + /** + * + * + *
+   * A list of API backend rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.BackendRule rules = 1; + */ + com.google.api.BackendRuleOrBuilder getRulesOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendProto.java new file mode 100644 index 000000000000..6ab2d4a22ba6 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendProto.java @@ -0,0 +1,110 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/backend.proto + +package com.google.api; + +public final class BackendProto { + private BackendProto() {} + + 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_api_Backend_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Backend_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_BackendRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_BackendRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_BackendRule_OverridesByRequestProtocolEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_BackendRule_OverridesByRequestProtocolEntry_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\030google/api/backend.proto\022\ngoogle.api\"1" + + "\n\007Backend\022&\n\005rules\030\001 \003(\0132\027.google.api.Ba" + + "ckendRule\"\262\004\n\013BackendRule\022\020\n\010selector\030\001 " + + "\001(\t\022\017\n\007address\030\002 \001(\t\022\020\n\010deadline\030\003 \001(\001\022\030" + + "\n\014min_deadline\030\004 \001(\001B\002\030\001\022\032\n\022operation_de" + + "adline\030\005 \001(\001\022A\n\020path_translation\030\006 \001(\0162\'" + + ".google.api.BackendRule.PathTranslation\022" + + "\026\n\014jwt_audience\030\007 \001(\tH\000\022\026\n\014disable_auth\030" + + "\010 \001(\010H\000\022\020\n\010protocol\030\t \001(\t\022^\n\035overrides_b" + + "y_request_protocol\030\n \003(\01327.google.api.Ba" + + "ckendRule.OverridesByRequestProtocolEntr" + + "y\032Z\n\037OverridesByRequestProtocolEntry\022\013\n\003" + + "key\030\001 \001(\t\022&\n\005value\030\002 \001(\0132\027.google.api.Ba" + + "ckendRule:\0028\001\"e\n\017PathTranslation\022 \n\034PATH" + + "_TRANSLATION_UNSPECIFIED\020\000\022\024\n\020CONSTANT_A" + + "DDRESS\020\001\022\032\n\026APPEND_PATH_TO_ADDRESS\020\002B\020\n\016" + + "authenticationBn\n\016com.google.apiB\014Backen" + + "dProtoP\001ZEgoogle.golang.org/genproto/goo" + + "gleapis/api/serviceconfig;serviceconfig\242" + + "\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_Backend_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Backend_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Backend_descriptor, + new java.lang.String[] { + "Rules", + }); + internal_static_google_api_BackendRule_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_api_BackendRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_BackendRule_descriptor, + new java.lang.String[] { + "Selector", + "Address", + "Deadline", + "MinDeadline", + "OperationDeadline", + "PathTranslation", + "JwtAudience", + "DisableAuth", + "Protocol", + "OverridesByRequestProtocol", + "Authentication", + }); + internal_static_google_api_BackendRule_OverridesByRequestProtocolEntry_descriptor = + internal_static_google_api_BackendRule_descriptor.getNestedTypes().get(0); + internal_static_google_api_BackendRule_OverridesByRequestProtocolEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_BackendRule_OverridesByRequestProtocolEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendRule.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendRule.java new file mode 100644 index 000000000000..66c5dcbfdd4b --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendRule.java @@ -0,0 +1,2768 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/backend.proto + +package com.google.api; + +/** + * + * + *
+ * A backend rule provides configuration for an individual API element.
+ * 
+ * + * Protobuf type {@code google.api.BackendRule} + */ +public final class BackendRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.BackendRule) + BackendRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use BackendRule.newBuilder() to construct. + private BackendRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BackendRule() { + selector_ = ""; + address_ = ""; + pathTranslation_ = 0; + protocol_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BackendRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.BackendProto.internal_static_google_api_BackendRule_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 10: + return internalGetOverridesByRequestProtocol(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.BackendProto.internal_static_google_api_BackendRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.BackendRule.class, com.google.api.BackendRule.Builder.class); + } + + /** + * + * + *
+   * Path Translation specifies how to combine the backend address with the
+   * request path in order to produce the appropriate forwarding URL for the
+   * request.
+   *
+   * Path Translation is applicable only to HTTP-based backends. Backends which
+   * do not accept requests over HTTP/HTTPS should leave `path_translation`
+   * unspecified.
+   * 
+ * + * Protobuf enum {@code google.api.BackendRule.PathTranslation} + */ + public enum PathTranslation implements com.google.protobuf.ProtocolMessageEnum { + /** PATH_TRANSLATION_UNSPECIFIED = 0; */ + PATH_TRANSLATION_UNSPECIFIED(0), + /** + * + * + *
+     * Use the backend address as-is, with no modification to the path. If the
+     * URL pattern contains variables, the variable names and values will be
+     * appended to the query string. If a query string parameter and a URL
+     * pattern variable have the same name, this may result in duplicate keys in
+     * the query string.
+     *
+     * # Examples
+     *
+     * Given the following operation config:
+     *
+     *     Method path:        /api/company/{cid}/user/{uid}
+     *     Backend address:    https://example.cloudfunctions.net/getUser
+     *
+     * Requests to the following request paths will call the backend at the
+     * translated path:
+     *
+     *     Request path: /api/company/widgetworks/user/johndoe
+     *     Translated:
+     *     https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
+     *
+     *     Request path: /api/company/widgetworks/user/johndoe?timezone=EST
+     *     Translated:
+     *     https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
+     * 
+ * + * CONSTANT_ADDRESS = 1; + */ + CONSTANT_ADDRESS(1), + /** + * + * + *
+     * The request path will be appended to the backend address.
+     *
+     * # Examples
+     *
+     * Given the following operation config:
+     *
+     *     Method path:        /api/company/{cid}/user/{uid}
+     *     Backend address:    https://example.appspot.com
+     *
+     * Requests to the following request paths will call the backend at the
+     * translated path:
+     *
+     *     Request path: /api/company/widgetworks/user/johndoe
+     *     Translated:
+     *     https://example.appspot.com/api/company/widgetworks/user/johndoe
+     *
+     *     Request path: /api/company/widgetworks/user/johndoe?timezone=EST
+     *     Translated:
+     *     https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
+     * 
+ * + * APPEND_PATH_TO_ADDRESS = 2; + */ + APPEND_PATH_TO_ADDRESS(2), + UNRECOGNIZED(-1), + ; + + /** PATH_TRANSLATION_UNSPECIFIED = 0; */ + public static final int PATH_TRANSLATION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Use the backend address as-is, with no modification to the path. If the
+     * URL pattern contains variables, the variable names and values will be
+     * appended to the query string. If a query string parameter and a URL
+     * pattern variable have the same name, this may result in duplicate keys in
+     * the query string.
+     *
+     * # Examples
+     *
+     * Given the following operation config:
+     *
+     *     Method path:        /api/company/{cid}/user/{uid}
+     *     Backend address:    https://example.cloudfunctions.net/getUser
+     *
+     * Requests to the following request paths will call the backend at the
+     * translated path:
+     *
+     *     Request path: /api/company/widgetworks/user/johndoe
+     *     Translated:
+     *     https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
+     *
+     *     Request path: /api/company/widgetworks/user/johndoe?timezone=EST
+     *     Translated:
+     *     https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
+     * 
+ * + * CONSTANT_ADDRESS = 1; + */ + public static final int CONSTANT_ADDRESS_VALUE = 1; + /** + * + * + *
+     * The request path will be appended to the backend address.
+     *
+     * # Examples
+     *
+     * Given the following operation config:
+     *
+     *     Method path:        /api/company/{cid}/user/{uid}
+     *     Backend address:    https://example.appspot.com
+     *
+     * Requests to the following request paths will call the backend at the
+     * translated path:
+     *
+     *     Request path: /api/company/widgetworks/user/johndoe
+     *     Translated:
+     *     https://example.appspot.com/api/company/widgetworks/user/johndoe
+     *
+     *     Request path: /api/company/widgetworks/user/johndoe?timezone=EST
+     *     Translated:
+     *     https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
+     * 
+ * + * APPEND_PATH_TO_ADDRESS = 2; + */ + public static final int APPEND_PATH_TO_ADDRESS_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 PathTranslation 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 PathTranslation forNumber(int value) { + switch (value) { + case 0: + return PATH_TRANSLATION_UNSPECIFIED; + case 1: + return CONSTANT_ADDRESS; + case 2: + return APPEND_PATH_TO_ADDRESS; + 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 PathTranslation findValueByNumber(int number) { + return PathTranslation.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.api.BackendRule.getDescriptor().getEnumTypes().get(0); + } + + private static final PathTranslation[] VALUES = values(); + + public static PathTranslation 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 PathTranslation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.BackendRule.PathTranslation) + } + + private int authenticationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object authentication_; + + public enum AuthenticationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + JWT_AUDIENCE(7), + DISABLE_AUTH(8), + AUTHENTICATION_NOT_SET(0); + private final int value; + + private AuthenticationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AuthenticationCase valueOf(int value) { + return forNumber(value); + } + + public static AuthenticationCase forNumber(int value) { + switch (value) { + case 7: + return JWT_AUDIENCE; + case 8: + return DISABLE_AUTH; + case 0: + return AUTHENTICATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AuthenticationCase getAuthenticationCase() { + return AuthenticationCase.forNumber(authenticationCase_); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object selector_ = ""; + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + @java.lang.Override + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object address_ = ""; + /** + * + * + *
+   * The address of the API backend.
+   *
+   * The scheme is used to determine the backend protocol and security.
+   * The following schemes are accepted:
+   *
+   *    SCHEME        PROTOCOL    SECURITY
+   *    http://       HTTP        None
+   *    https://      HTTP        TLS
+   *    grpc://       gRPC        None
+   *    grpcs://      gRPC        TLS
+   *
+   * It is recommended to explicitly include a scheme. Leaving out the scheme
+   * may cause constrasting behaviors across platforms.
+   *
+   * If the port is unspecified, the default is:
+   * - 80 for schemes without TLS
+   * - 443 for schemes with TLS
+   *
+   * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+   * to specify the protocol version.
+   * 
+ * + * string address = 2; + * + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + * + * + *
+   * The address of the API backend.
+   *
+   * The scheme is used to determine the backend protocol and security.
+   * The following schemes are accepted:
+   *
+   *    SCHEME        PROTOCOL    SECURITY
+   *    http://       HTTP        None
+   *    https://      HTTP        TLS
+   *    grpc://       gRPC        None
+   *    grpcs://      gRPC        TLS
+   *
+   * It is recommended to explicitly include a scheme. Leaving out the scheme
+   * may cause constrasting behaviors across platforms.
+   *
+   * If the port is unspecified, the default is:
+   * - 80 for schemes without TLS
+   * - 443 for schemes with TLS
+   *
+   * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+   * to specify the protocol version.
+   * 
+ * + * string address = 2; + * + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEADLINE_FIELD_NUMBER = 3; + private double deadline_ = 0D; + /** + * + * + *
+   * The number of seconds to wait for a response from a request. The default
+   * varies based on the request protocol and deployment environment.
+   * 
+ * + * double deadline = 3; + * + * @return The deadline. + */ + @java.lang.Override + public double getDeadline() { + return deadline_; + } + + public static final int MIN_DEADLINE_FIELD_NUMBER = 4; + private double minDeadline_ = 0D; + /** + * + * + *
+   * Deprecated, do not use.
+   * 
+ * + * double min_deadline = 4 [deprecated = true]; + * + * @deprecated google.api.BackendRule.min_deadline is deprecated. See + * google/api/backend.proto;l=124 + * @return The minDeadline. + */ + @java.lang.Override + @java.lang.Deprecated + public double getMinDeadline() { + return minDeadline_; + } + + public static final int OPERATION_DEADLINE_FIELD_NUMBER = 5; + private double operationDeadline_ = 0D; + /** + * + * + *
+   * The number of seconds to wait for the completion of a long running
+   * operation. The default is no deadline.
+   * 
+ * + * double operation_deadline = 5; + * + * @return The operationDeadline. + */ + @java.lang.Override + public double getOperationDeadline() { + return operationDeadline_; + } + + public static final int PATH_TRANSLATION_FIELD_NUMBER = 6; + private int pathTranslation_ = 0; + /** + * .google.api.BackendRule.PathTranslation path_translation = 6; + * + * @return The enum numeric value on the wire for pathTranslation. + */ + @java.lang.Override + public int getPathTranslationValue() { + return pathTranslation_; + } + /** + * .google.api.BackendRule.PathTranslation path_translation = 6; + * + * @return The pathTranslation. + */ + @java.lang.Override + public com.google.api.BackendRule.PathTranslation getPathTranslation() { + com.google.api.BackendRule.PathTranslation result = + com.google.api.BackendRule.PathTranslation.forNumber(pathTranslation_); + return result == null ? com.google.api.BackendRule.PathTranslation.UNRECOGNIZED : result; + } + + public static final int JWT_AUDIENCE_FIELD_NUMBER = 7; + /** + * + * + *
+   * The JWT audience is used when generating a JWT ID token for the backend.
+   * This ID token will be added in the HTTP "authorization" header, and sent
+   * to the backend.
+   * 
+ * + * string jwt_audience = 7; + * + * @return Whether the jwtAudience field is set. + */ + public boolean hasJwtAudience() { + return authenticationCase_ == 7; + } + /** + * + * + *
+   * The JWT audience is used when generating a JWT ID token for the backend.
+   * This ID token will be added in the HTTP "authorization" header, and sent
+   * to the backend.
+   * 
+ * + * string jwt_audience = 7; + * + * @return The jwtAudience. + */ + public java.lang.String getJwtAudience() { + java.lang.Object ref = ""; + if (authenticationCase_ == 7) { + ref = authentication_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (authenticationCase_ == 7) { + authentication_ = s; + } + return s; + } + } + /** + * + * + *
+   * The JWT audience is used when generating a JWT ID token for the backend.
+   * This ID token will be added in the HTTP "authorization" header, and sent
+   * to the backend.
+   * 
+ * + * string jwt_audience = 7; + * + * @return The bytes for jwtAudience. + */ + public com.google.protobuf.ByteString getJwtAudienceBytes() { + java.lang.Object ref = ""; + if (authenticationCase_ == 7) { + ref = authentication_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (authenticationCase_ == 7) { + authentication_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISABLE_AUTH_FIELD_NUMBER = 8; + /** + * + * + *
+   * When disable_auth is true, a JWT ID token won't be generated and the
+   * original "Authorization" HTTP header will be preserved. If the header is
+   * used to carry the original token and is expected by the backend, this
+   * field must be set to true to preserve the header.
+   * 
+ * + * bool disable_auth = 8; + * + * @return Whether the disableAuth field is set. + */ + @java.lang.Override + public boolean hasDisableAuth() { + return authenticationCase_ == 8; + } + /** + * + * + *
+   * When disable_auth is true, a JWT ID token won't be generated and the
+   * original "Authorization" HTTP header will be preserved. If the header is
+   * used to carry the original token and is expected by the backend, this
+   * field must be set to true to preserve the header.
+   * 
+ * + * bool disable_auth = 8; + * + * @return The disableAuth. + */ + @java.lang.Override + public boolean getDisableAuth() { + if (authenticationCase_ == 8) { + return (java.lang.Boolean) authentication_; + } + return false; + } + + public static final int PROTOCOL_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object protocol_ = ""; + /** + * + * + *
+   * The protocol used for sending a request to the backend.
+   * The supported values are "http/1.1" and "h2".
+   *
+   * The default value is inferred from the scheme in the
+   * [address][google.api.BackendRule.address] field:
+   *
+   *    SCHEME        PROTOCOL
+   *    http://       http/1.1
+   *    https://      http/1.1
+   *    grpc://       h2
+   *    grpcs://      h2
+   *
+   * For secure HTTP backends (https://) that support HTTP/2, set this field
+   * to "h2" for improved performance.
+   *
+   * Configuring this field to non-default values is only supported for secure
+   * HTTP backends. This field will be ignored for all other backends.
+   *
+   * See
+   * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+   * for more details on the supported values.
+   * 
+ * + * string protocol = 9; + * + * @return The protocol. + */ + @java.lang.Override + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } + } + /** + * + * + *
+   * The protocol used for sending a request to the backend.
+   * The supported values are "http/1.1" and "h2".
+   *
+   * The default value is inferred from the scheme in the
+   * [address][google.api.BackendRule.address] field:
+   *
+   *    SCHEME        PROTOCOL
+   *    http://       http/1.1
+   *    https://      http/1.1
+   *    grpc://       h2
+   *    grpcs://      h2
+   *
+   * For secure HTTP backends (https://) that support HTTP/2, set this field
+   * to "h2" for improved performance.
+   *
+   * Configuring this field to non-default values is only supported for secure
+   * HTTP backends. This field will be ignored for all other backends.
+   *
+   * See
+   * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+   * for more details on the supported values.
+   * 
+ * + * string protocol = 9; + * + * @return The bytes for protocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OVERRIDES_BY_REQUEST_PROTOCOL_FIELD_NUMBER = 10; + + private static final class OverridesByRequestProtocolDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.api.BackendProto + .internal_static_google_api_BackendRule_OverridesByRequestProtocolEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.api.BackendRule.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField + overridesByRequestProtocol_; + + private com.google.protobuf.MapField + internalGetOverridesByRequestProtocol() { + if (overridesByRequestProtocol_ == null) { + return com.google.protobuf.MapField.emptyMapField( + OverridesByRequestProtocolDefaultEntryHolder.defaultEntry); + } + return overridesByRequestProtocol_; + } + + public int getOverridesByRequestProtocolCount() { + return internalGetOverridesByRequestProtocol().getMap().size(); + } + /** + * + * + *
+   * The map between request protocol and the backend address.
+   * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + @java.lang.Override + public boolean containsOverridesByRequestProtocol(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOverridesByRequestProtocol().getMap().containsKey(key); + } + /** Use {@link #getOverridesByRequestProtocolMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getOverridesByRequestProtocol() { + return getOverridesByRequestProtocolMap(); + } + /** + * + * + *
+   * The map between request protocol and the backend address.
+   * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + @java.lang.Override + public java.util.Map + getOverridesByRequestProtocolMap() { + return internalGetOverridesByRequestProtocol().getMap(); + } + /** + * + * + *
+   * The map between request protocol and the backend address.
+   * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + @java.lang.Override + public /* nullable */ com.google.api.BackendRule getOverridesByRequestProtocolOrDefault( + java.lang.String key, + /* nullable */ + com.google.api.BackendRule defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOverridesByRequestProtocol().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The map between request protocol and the backend address.
+   * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + @java.lang.Override + public com.google.api.BackendRule getOverridesByRequestProtocolOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOverridesByRequestProtocol().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, address_); + } + if (java.lang.Double.doubleToRawLongBits(deadline_) != 0) { + output.writeDouble(3, deadline_); + } + if (java.lang.Double.doubleToRawLongBits(minDeadline_) != 0) { + output.writeDouble(4, minDeadline_); + } + if (java.lang.Double.doubleToRawLongBits(operationDeadline_) != 0) { + output.writeDouble(5, operationDeadline_); + } + if (pathTranslation_ + != com.google.api.BackendRule.PathTranslation.PATH_TRANSLATION_UNSPECIFIED.getNumber()) { + output.writeEnum(6, pathTranslation_); + } + if (authenticationCase_ == 7) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, authentication_); + } + if (authenticationCase_ == 8) { + output.writeBool(8, (boolean) ((java.lang.Boolean) authentication_)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, protocol_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetOverridesByRequestProtocol(), + OverridesByRequestProtocolDefaultEntryHolder.defaultEntry, + 10); + 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(selector_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, address_); + } + if (java.lang.Double.doubleToRawLongBits(deadline_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, deadline_); + } + if (java.lang.Double.doubleToRawLongBits(minDeadline_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, minDeadline_); + } + if (java.lang.Double.doubleToRawLongBits(operationDeadline_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, operationDeadline_); + } + if (pathTranslation_ + != com.google.api.BackendRule.PathTranslation.PATH_TRANSLATION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, pathTranslation_); + } + if (authenticationCase_ == 7) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, authentication_); + } + if (authenticationCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 8, (boolean) ((java.lang.Boolean) authentication_)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocol_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, protocol_); + } + for (java.util.Map.Entry entry : + internalGetOverridesByRequestProtocol().getMap().entrySet()) { + com.google.protobuf.MapEntry + overridesByRequestProtocol__ = + OverridesByRequestProtocolDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, overridesByRequestProtocol__); + } + 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.api.BackendRule)) { + return super.equals(obj); + } + com.google.api.BackendRule other = (com.google.api.BackendRule) obj; + + if (!getSelector().equals(other.getSelector())) return false; + if (!getAddress().equals(other.getAddress())) return false; + if (java.lang.Double.doubleToLongBits(getDeadline()) + != java.lang.Double.doubleToLongBits(other.getDeadline())) return false; + if (java.lang.Double.doubleToLongBits(getMinDeadline()) + != java.lang.Double.doubleToLongBits(other.getMinDeadline())) return false; + if (java.lang.Double.doubleToLongBits(getOperationDeadline()) + != java.lang.Double.doubleToLongBits(other.getOperationDeadline())) return false; + if (pathTranslation_ != other.pathTranslation_) return false; + if (!getProtocol().equals(other.getProtocol())) return false; + if (!internalGetOverridesByRequestProtocol() + .equals(other.internalGetOverridesByRequestProtocol())) return false; + if (!getAuthenticationCase().equals(other.getAuthenticationCase())) return false; + switch (authenticationCase_) { + case 7: + if (!getJwtAudience().equals(other.getJwtAudience())) return false; + break; + case 8: + if (getDisableAuth() != other.getDisableAuth()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + DEADLINE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDeadline())); + hash = (37 * hash) + MIN_DEADLINE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinDeadline())); + hash = (37 * hash) + OPERATION_DEADLINE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getOperationDeadline())); + hash = (37 * hash) + PATH_TRANSLATION_FIELD_NUMBER; + hash = (53 * hash) + pathTranslation_; + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + if (!internalGetOverridesByRequestProtocol().getMap().isEmpty()) { + hash = (37 * hash) + OVERRIDES_BY_REQUEST_PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + internalGetOverridesByRequestProtocol().hashCode(); + } + switch (authenticationCase_) { + case 7: + hash = (37 * hash) + JWT_AUDIENCE_FIELD_NUMBER; + hash = (53 * hash) + getJwtAudience().hashCode(); + break; + case 8: + hash = (37 * hash) + DISABLE_AUTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableAuth()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.BackendRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.BackendRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.BackendRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.BackendRule 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.api.BackendRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.BackendRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.BackendRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.BackendRule 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.api.BackendRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.BackendRule 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.api.BackendRule parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.BackendRule 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.api.BackendRule 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 backend rule provides configuration for an individual API element.
+   * 
+ * + * Protobuf type {@code google.api.BackendRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.BackendRule) + com.google.api.BackendRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.BackendProto.internal_static_google_api_BackendRule_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 10: + return internalGetOverridesByRequestProtocol(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 10: + return internalGetMutableOverridesByRequestProtocol(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.BackendProto.internal_static_google_api_BackendRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.BackendRule.class, com.google.api.BackendRule.Builder.class); + } + + // Construct using com.google.api.BackendRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selector_ = ""; + address_ = ""; + deadline_ = 0D; + minDeadline_ = 0D; + operationDeadline_ = 0D; + pathTranslation_ = 0; + protocol_ = ""; + internalGetMutableOverridesByRequestProtocol().clear(); + authenticationCase_ = 0; + authentication_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.BackendProto.internal_static_google_api_BackendRule_descriptor; + } + + @java.lang.Override + public com.google.api.BackendRule getDefaultInstanceForType() { + return com.google.api.BackendRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.BackendRule build() { + com.google.api.BackendRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.BackendRule buildPartial() { + com.google.api.BackendRule result = new com.google.api.BackendRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.BackendRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selector_ = selector_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.address_ = address_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deadline_ = deadline_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.minDeadline_ = minDeadline_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.operationDeadline_ = operationDeadline_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pathTranslation_ = pathTranslation_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.protocol_ = protocol_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.overridesByRequestProtocol_ = internalGetOverridesByRequestProtocol(); + result.overridesByRequestProtocol_.makeImmutable(); + } + } + + private void buildPartialOneofs(com.google.api.BackendRule result) { + result.authenticationCase_ = authenticationCase_; + result.authentication_ = this.authentication_; + } + + @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.api.BackendRule) { + return mergeFrom((com.google.api.BackendRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.BackendRule other) { + if (other == com.google.api.BackendRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getDeadline() != 0D) { + setDeadline(other.getDeadline()); + } + if (other.getMinDeadline() != 0D) { + setMinDeadline(other.getMinDeadline()); + } + if (other.getOperationDeadline() != 0D) { + setOperationDeadline(other.getOperationDeadline()); + } + if (other.pathTranslation_ != 0) { + setPathTranslationValue(other.getPathTranslationValue()); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + bitField0_ |= 0x00000100; + onChanged(); + } + internalGetMutableOverridesByRequestProtocol() + .mergeFrom(other.internalGetOverridesByRequestProtocol()); + bitField0_ |= 0x00000200; + switch (other.getAuthenticationCase()) { + case JWT_AUDIENCE: + { + authenticationCase_ = 7; + authentication_ = other.authentication_; + onChanged(); + break; + } + case DISABLE_AUTH: + { + setDisableAuth(other.getDisableAuth()); + break; + } + case AUTHENTICATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + selector_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 25: + { + deadline_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 33: + { + minDeadline_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 41: + { + operationDeadline_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + case 48: + { + pathTranslation_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + authenticationCase_ = 7; + authentication_ = s; + break; + } // case 58 + case 64: + { + authentication_ = input.readBool(); + authenticationCase_ = 8; + break; + } // case 64 + case 74: + { + protocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + com.google.protobuf.MapEntry + overridesByRequestProtocol__ = + input.readMessage( + OverridesByRequestProtocolDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableOverridesByRequestProtocol() + .getMutableMap() + .put( + overridesByRequestProtocol__.getKey(), + overridesByRequestProtocol__.getValue()); + 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 authenticationCase_ = 0; + private java.lang.Object authentication_; + + public AuthenticationCase getAuthenticationCase() { + return AuthenticationCase.forNumber(authenticationCase_); + } + + public Builder clearAuthentication() { + authenticationCase_ = 0; + authentication_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return The selector. + */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @param value The selector to set. + * @return This builder for chaining. + */ + public Builder setSelector(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return This builder for chaining. + */ + public Builder clearSelector() { + selector_ = getDefaultInstance().getSelector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @param value The bytes for selector to set. + * @return This builder for chaining. + */ + public Builder setSelectorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object address_ = ""; + /** + * + * + *
+     * The address of the API backend.
+     *
+     * The scheme is used to determine the backend protocol and security.
+     * The following schemes are accepted:
+     *
+     *    SCHEME        PROTOCOL    SECURITY
+     *    http://       HTTP        None
+     *    https://      HTTP        TLS
+     *    grpc://       gRPC        None
+     *    grpcs://      gRPC        TLS
+     *
+     * It is recommended to explicitly include a scheme. Leaving out the scheme
+     * may cause constrasting behaviors across platforms.
+     *
+     * If the port is unspecified, the default is:
+     * - 80 for schemes without TLS
+     * - 443 for schemes with TLS
+     *
+     * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+     * to specify the protocol version.
+     * 
+ * + * string address = 2; + * + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The address of the API backend.
+     *
+     * The scheme is used to determine the backend protocol and security.
+     * The following schemes are accepted:
+     *
+     *    SCHEME        PROTOCOL    SECURITY
+     *    http://       HTTP        None
+     *    https://      HTTP        TLS
+     *    grpc://       gRPC        None
+     *    grpcs://      gRPC        TLS
+     *
+     * It is recommended to explicitly include a scheme. Leaving out the scheme
+     * may cause constrasting behaviors across platforms.
+     *
+     * If the port is unspecified, the default is:
+     * - 80 for schemes without TLS
+     * - 443 for schemes with TLS
+     *
+     * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+     * to specify the protocol version.
+     * 
+ * + * string address = 2; + * + * @return The bytes for address. + */ + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The address of the API backend.
+     *
+     * The scheme is used to determine the backend protocol and security.
+     * The following schemes are accepted:
+     *
+     *    SCHEME        PROTOCOL    SECURITY
+     *    http://       HTTP        None
+     *    https://      HTTP        TLS
+     *    grpc://       gRPC        None
+     *    grpcs://      gRPC        TLS
+     *
+     * It is recommended to explicitly include a scheme. Leaving out the scheme
+     * may cause constrasting behaviors across platforms.
+     *
+     * If the port is unspecified, the default is:
+     * - 80 for schemes without TLS
+     * - 443 for schemes with TLS
+     *
+     * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+     * to specify the protocol version.
+     * 
+ * + * string address = 2; + * + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + address_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The address of the API backend.
+     *
+     * The scheme is used to determine the backend protocol and security.
+     * The following schemes are accepted:
+     *
+     *    SCHEME        PROTOCOL    SECURITY
+     *    http://       HTTP        None
+     *    https://      HTTP        TLS
+     *    grpc://       gRPC        None
+     *    grpcs://      gRPC        TLS
+     *
+     * It is recommended to explicitly include a scheme. Leaving out the scheme
+     * may cause constrasting behaviors across platforms.
+     *
+     * If the port is unspecified, the default is:
+     * - 80 for schemes without TLS
+     * - 443 for schemes with TLS
+     *
+     * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+     * to specify the protocol version.
+     * 
+ * + * string address = 2; + * + * @return This builder for chaining. + */ + public Builder clearAddress() { + address_ = getDefaultInstance().getAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The address of the API backend.
+     *
+     * The scheme is used to determine the backend protocol and security.
+     * The following schemes are accepted:
+     *
+     *    SCHEME        PROTOCOL    SECURITY
+     *    http://       HTTP        None
+     *    https://      HTTP        TLS
+     *    grpc://       gRPC        None
+     *    grpcs://      gRPC        TLS
+     *
+     * It is recommended to explicitly include a scheme. Leaving out the scheme
+     * may cause constrasting behaviors across platforms.
+     *
+     * If the port is unspecified, the default is:
+     * - 80 for schemes without TLS
+     * - 443 for schemes with TLS
+     *
+     * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+     * to specify the protocol version.
+     * 
+ * + * string address = 2; + * + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + address_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private double deadline_; + /** + * + * + *
+     * The number of seconds to wait for a response from a request. The default
+     * varies based on the request protocol and deployment environment.
+     * 
+ * + * double deadline = 3; + * + * @return The deadline. + */ + @java.lang.Override + public double getDeadline() { + return deadline_; + } + /** + * + * + *
+     * The number of seconds to wait for a response from a request. The default
+     * varies based on the request protocol and deployment environment.
+     * 
+ * + * double deadline = 3; + * + * @param value The deadline to set. + * @return This builder for chaining. + */ + public Builder setDeadline(double value) { + + deadline_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of seconds to wait for a response from a request. The default
+     * varies based on the request protocol and deployment environment.
+     * 
+ * + * double deadline = 3; + * + * @return This builder for chaining. + */ + public Builder clearDeadline() { + bitField0_ = (bitField0_ & ~0x00000004); + deadline_ = 0D; + onChanged(); + return this; + } + + private double minDeadline_; + /** + * + * + *
+     * Deprecated, do not use.
+     * 
+ * + * double min_deadline = 4 [deprecated = true]; + * + * @deprecated google.api.BackendRule.min_deadline is deprecated. See + * google/api/backend.proto;l=124 + * @return The minDeadline. + */ + @java.lang.Override + @java.lang.Deprecated + public double getMinDeadline() { + return minDeadline_; + } + /** + * + * + *
+     * Deprecated, do not use.
+     * 
+ * + * double min_deadline = 4 [deprecated = true]; + * + * @deprecated google.api.BackendRule.min_deadline is deprecated. See + * google/api/backend.proto;l=124 + * @param value The minDeadline to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setMinDeadline(double value) { + + minDeadline_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated, do not use.
+     * 
+ * + * double min_deadline = 4 [deprecated = true]; + * + * @deprecated google.api.BackendRule.min_deadline is deprecated. See + * google/api/backend.proto;l=124 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearMinDeadline() { + bitField0_ = (bitField0_ & ~0x00000008); + minDeadline_ = 0D; + onChanged(); + return this; + } + + private double operationDeadline_; + /** + * + * + *
+     * The number of seconds to wait for the completion of a long running
+     * operation. The default is no deadline.
+     * 
+ * + * double operation_deadline = 5; + * + * @return The operationDeadline. + */ + @java.lang.Override + public double getOperationDeadline() { + return operationDeadline_; + } + /** + * + * + *
+     * The number of seconds to wait for the completion of a long running
+     * operation. The default is no deadline.
+     * 
+ * + * double operation_deadline = 5; + * + * @param value The operationDeadline to set. + * @return This builder for chaining. + */ + public Builder setOperationDeadline(double value) { + + operationDeadline_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of seconds to wait for the completion of a long running
+     * operation. The default is no deadline.
+     * 
+ * + * double operation_deadline = 5; + * + * @return This builder for chaining. + */ + public Builder clearOperationDeadline() { + bitField0_ = (bitField0_ & ~0x00000010); + operationDeadline_ = 0D; + onChanged(); + return this; + } + + private int pathTranslation_ = 0; + /** + * .google.api.BackendRule.PathTranslation path_translation = 6; + * + * @return The enum numeric value on the wire for pathTranslation. + */ + @java.lang.Override + public int getPathTranslationValue() { + return pathTranslation_; + } + /** + * .google.api.BackendRule.PathTranslation path_translation = 6; + * + * @param value The enum numeric value on the wire for pathTranslation to set. + * @return This builder for chaining. + */ + public Builder setPathTranslationValue(int value) { + pathTranslation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * .google.api.BackendRule.PathTranslation path_translation = 6; + * + * @return The pathTranslation. + */ + @java.lang.Override + public com.google.api.BackendRule.PathTranslation getPathTranslation() { + com.google.api.BackendRule.PathTranslation result = + com.google.api.BackendRule.PathTranslation.forNumber(pathTranslation_); + return result == null ? com.google.api.BackendRule.PathTranslation.UNRECOGNIZED : result; + } + /** + * .google.api.BackendRule.PathTranslation path_translation = 6; + * + * @param value The pathTranslation to set. + * @return This builder for chaining. + */ + public Builder setPathTranslation(com.google.api.BackendRule.PathTranslation value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + pathTranslation_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .google.api.BackendRule.PathTranslation path_translation = 6; + * + * @return This builder for chaining. + */ + public Builder clearPathTranslation() { + bitField0_ = (bitField0_ & ~0x00000020); + pathTranslation_ = 0; + onChanged(); + return this; + } + + /** + * + * + *
+     * The JWT audience is used when generating a JWT ID token for the backend.
+     * This ID token will be added in the HTTP "authorization" header, and sent
+     * to the backend.
+     * 
+ * + * string jwt_audience = 7; + * + * @return Whether the jwtAudience field is set. + */ + @java.lang.Override + public boolean hasJwtAudience() { + return authenticationCase_ == 7; + } + /** + * + * + *
+     * The JWT audience is used when generating a JWT ID token for the backend.
+     * This ID token will be added in the HTTP "authorization" header, and sent
+     * to the backend.
+     * 
+ * + * string jwt_audience = 7; + * + * @return The jwtAudience. + */ + @java.lang.Override + public java.lang.String getJwtAudience() { + java.lang.Object ref = ""; + if (authenticationCase_ == 7) { + ref = authentication_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (authenticationCase_ == 7) { + authentication_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The JWT audience is used when generating a JWT ID token for the backend.
+     * This ID token will be added in the HTTP "authorization" header, and sent
+     * to the backend.
+     * 
+ * + * string jwt_audience = 7; + * + * @return The bytes for jwtAudience. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJwtAudienceBytes() { + java.lang.Object ref = ""; + if (authenticationCase_ == 7) { + ref = authentication_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (authenticationCase_ == 7) { + authentication_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The JWT audience is used when generating a JWT ID token for the backend.
+     * This ID token will be added in the HTTP "authorization" header, and sent
+     * to the backend.
+     * 
+ * + * string jwt_audience = 7; + * + * @param value The jwtAudience to set. + * @return This builder for chaining. + */ + public Builder setJwtAudience(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + authenticationCase_ = 7; + authentication_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The JWT audience is used when generating a JWT ID token for the backend.
+     * This ID token will be added in the HTTP "authorization" header, and sent
+     * to the backend.
+     * 
+ * + * string jwt_audience = 7; + * + * @return This builder for chaining. + */ + public Builder clearJwtAudience() { + if (authenticationCase_ == 7) { + authenticationCase_ = 0; + authentication_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The JWT audience is used when generating a JWT ID token for the backend.
+     * This ID token will be added in the HTTP "authorization" header, and sent
+     * to the backend.
+     * 
+ * + * string jwt_audience = 7; + * + * @param value The bytes for jwtAudience to set. + * @return This builder for chaining. + */ + public Builder setJwtAudienceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + authenticationCase_ = 7; + authentication_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * When disable_auth is true, a JWT ID token won't be generated and the
+     * original "Authorization" HTTP header will be preserved. If the header is
+     * used to carry the original token and is expected by the backend, this
+     * field must be set to true to preserve the header.
+     * 
+ * + * bool disable_auth = 8; + * + * @return Whether the disableAuth field is set. + */ + public boolean hasDisableAuth() { + return authenticationCase_ == 8; + } + /** + * + * + *
+     * When disable_auth is true, a JWT ID token won't be generated and the
+     * original "Authorization" HTTP header will be preserved. If the header is
+     * used to carry the original token and is expected by the backend, this
+     * field must be set to true to preserve the header.
+     * 
+ * + * bool disable_auth = 8; + * + * @return The disableAuth. + */ + public boolean getDisableAuth() { + if (authenticationCase_ == 8) { + return (java.lang.Boolean) authentication_; + } + return false; + } + /** + * + * + *
+     * When disable_auth is true, a JWT ID token won't be generated and the
+     * original "Authorization" HTTP header will be preserved. If the header is
+     * used to carry the original token and is expected by the backend, this
+     * field must be set to true to preserve the header.
+     * 
+ * + * bool disable_auth = 8; + * + * @param value The disableAuth to set. + * @return This builder for chaining. + */ + public Builder setDisableAuth(boolean value) { + + authenticationCase_ = 8; + authentication_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * When disable_auth is true, a JWT ID token won't be generated and the
+     * original "Authorization" HTTP header will be preserved. If the header is
+     * used to carry the original token and is expected by the backend, this
+     * field must be set to true to preserve the header.
+     * 
+ * + * bool disable_auth = 8; + * + * @return This builder for chaining. + */ + public Builder clearDisableAuth() { + if (authenticationCase_ == 8) { + authenticationCase_ = 0; + authentication_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object protocol_ = ""; + /** + * + * + *
+     * The protocol used for sending a request to the backend.
+     * The supported values are "http/1.1" and "h2".
+     *
+     * The default value is inferred from the scheme in the
+     * [address][google.api.BackendRule.address] field:
+     *
+     *    SCHEME        PROTOCOL
+     *    http://       http/1.1
+     *    https://      http/1.1
+     *    grpc://       h2
+     *    grpcs://      h2
+     *
+     * For secure HTTP backends (https://) that support HTTP/2, set this field
+     * to "h2" for improved performance.
+     *
+     * Configuring this field to non-default values is only supported for secure
+     * HTTP backends. This field will be ignored for all other backends.
+     *
+     * See
+     * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+     * for more details on the supported values.
+     * 
+ * + * string protocol = 9; + * + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The protocol used for sending a request to the backend.
+     * The supported values are "http/1.1" and "h2".
+     *
+     * The default value is inferred from the scheme in the
+     * [address][google.api.BackendRule.address] field:
+     *
+     *    SCHEME        PROTOCOL
+     *    http://       http/1.1
+     *    https://      http/1.1
+     *    grpc://       h2
+     *    grpcs://      h2
+     *
+     * For secure HTTP backends (https://) that support HTTP/2, set this field
+     * to "h2" for improved performance.
+     *
+     * Configuring this field to non-default values is only supported for secure
+     * HTTP backends. This field will be ignored for all other backends.
+     *
+     * See
+     * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+     * for more details on the supported values.
+     * 
+ * + * string protocol = 9; + * + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The protocol used for sending a request to the backend.
+     * The supported values are "http/1.1" and "h2".
+     *
+     * The default value is inferred from the scheme in the
+     * [address][google.api.BackendRule.address] field:
+     *
+     *    SCHEME        PROTOCOL
+     *    http://       http/1.1
+     *    https://      http/1.1
+     *    grpc://       h2
+     *    grpcs://      h2
+     *
+     * For secure HTTP backends (https://) that support HTTP/2, set this field
+     * to "h2" for improved performance.
+     *
+     * Configuring this field to non-default values is only supported for secure
+     * HTTP backends. This field will be ignored for all other backends.
+     *
+     * See
+     * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+     * for more details on the supported values.
+     * 
+ * + * string protocol = 9; + * + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + protocol_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The protocol used for sending a request to the backend.
+     * The supported values are "http/1.1" and "h2".
+     *
+     * The default value is inferred from the scheme in the
+     * [address][google.api.BackendRule.address] field:
+     *
+     *    SCHEME        PROTOCOL
+     *    http://       http/1.1
+     *    https://      http/1.1
+     *    grpc://       h2
+     *    grpcs://      h2
+     *
+     * For secure HTTP backends (https://) that support HTTP/2, set this field
+     * to "h2" for improved performance.
+     *
+     * Configuring this field to non-default values is only supported for secure
+     * HTTP backends. This field will be ignored for all other backends.
+     *
+     * See
+     * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+     * for more details on the supported values.
+     * 
+ * + * string protocol = 9; + * + * @return This builder for chaining. + */ + public Builder clearProtocol() { + protocol_ = getDefaultInstance().getProtocol(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * The protocol used for sending a request to the backend.
+     * The supported values are "http/1.1" and "h2".
+     *
+     * The default value is inferred from the scheme in the
+     * [address][google.api.BackendRule.address] field:
+     *
+     *    SCHEME        PROTOCOL
+     *    http://       http/1.1
+     *    https://      http/1.1
+     *    grpc://       h2
+     *    grpcs://      h2
+     *
+     * For secure HTTP backends (https://) that support HTTP/2, set this field
+     * to "h2" for improved performance.
+     *
+     * Configuring this field to non-default values is only supported for secure
+     * HTTP backends. This field will be ignored for all other backends.
+     *
+     * See
+     * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+     * for more details on the supported values.
+     * 
+ * + * string protocol = 9; + * + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + protocol_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.MapField + overridesByRequestProtocol_; + + private com.google.protobuf.MapField + internalGetOverridesByRequestProtocol() { + if (overridesByRequestProtocol_ == null) { + return com.google.protobuf.MapField.emptyMapField( + OverridesByRequestProtocolDefaultEntryHolder.defaultEntry); + } + return overridesByRequestProtocol_; + } + + private com.google.protobuf.MapField + internalGetMutableOverridesByRequestProtocol() { + if (overridesByRequestProtocol_ == null) { + overridesByRequestProtocol_ = + com.google.protobuf.MapField.newMapField( + OverridesByRequestProtocolDefaultEntryHolder.defaultEntry); + } + if (!overridesByRequestProtocol_.isMutable()) { + overridesByRequestProtocol_ = overridesByRequestProtocol_.copy(); + } + bitField0_ |= 0x00000200; + onChanged(); + return overridesByRequestProtocol_; + } + + public int getOverridesByRequestProtocolCount() { + return internalGetOverridesByRequestProtocol().getMap().size(); + } + /** + * + * + *
+     * The map between request protocol and the backend address.
+     * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + @java.lang.Override + public boolean containsOverridesByRequestProtocol(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOverridesByRequestProtocol().getMap().containsKey(key); + } + /** Use {@link #getOverridesByRequestProtocolMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getOverridesByRequestProtocol() { + return getOverridesByRequestProtocolMap(); + } + /** + * + * + *
+     * The map between request protocol and the backend address.
+     * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + @java.lang.Override + public java.util.Map + getOverridesByRequestProtocolMap() { + return internalGetOverridesByRequestProtocol().getMap(); + } + /** + * + * + *
+     * The map between request protocol and the backend address.
+     * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + @java.lang.Override + public /* nullable */ com.google.api.BackendRule getOverridesByRequestProtocolOrDefault( + java.lang.String key, + /* nullable */ + com.google.api.BackendRule defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOverridesByRequestProtocol().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The map between request protocol and the backend address.
+     * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + @java.lang.Override + public com.google.api.BackendRule getOverridesByRequestProtocolOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOverridesByRequestProtocol().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearOverridesByRequestProtocol() { + bitField0_ = (bitField0_ & ~0x00000200); + internalGetMutableOverridesByRequestProtocol().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The map between request protocol and the backend address.
+     * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + public Builder removeOverridesByRequestProtocol(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableOverridesByRequestProtocol().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableOverridesByRequestProtocol() { + bitField0_ |= 0x00000200; + return internalGetMutableOverridesByRequestProtocol().getMutableMap(); + } + /** + * + * + *
+     * The map between request protocol and the backend address.
+     * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + public Builder putOverridesByRequestProtocol( + java.lang.String key, com.google.api.BackendRule value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableOverridesByRequestProtocol().getMutableMap().put(key, value); + bitField0_ |= 0x00000200; + return this; + } + /** + * + * + *
+     * The map between request protocol and the backend address.
+     * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + public Builder putAllOverridesByRequestProtocol( + java.util.Map values) { + internalGetMutableOverridesByRequestProtocol().getMutableMap().putAll(values); + bitField0_ |= 0x00000200; + 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.api.BackendRule) + } + + // @@protoc_insertion_point(class_scope:google.api.BackendRule) + private static final com.google.api.BackendRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.BackendRule(); + } + + public static com.google.api.BackendRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackendRule 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.api.BackendRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendRuleOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendRuleOrBuilder.java new file mode 100644 index 000000000000..aa636dd2fab6 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BackendRuleOrBuilder.java @@ -0,0 +1,375 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/backend.proto + +package com.google.api; + +public interface BackendRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.BackendRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + java.lang.String getSelector(); + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + com.google.protobuf.ByteString getSelectorBytes(); + + /** + * + * + *
+   * The address of the API backend.
+   *
+   * The scheme is used to determine the backend protocol and security.
+   * The following schemes are accepted:
+   *
+   *    SCHEME        PROTOCOL    SECURITY
+   *    http://       HTTP        None
+   *    https://      HTTP        TLS
+   *    grpc://       gRPC        None
+   *    grpcs://      gRPC        TLS
+   *
+   * It is recommended to explicitly include a scheme. Leaving out the scheme
+   * may cause constrasting behaviors across platforms.
+   *
+   * If the port is unspecified, the default is:
+   * - 80 for schemes without TLS
+   * - 443 for schemes with TLS
+   *
+   * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+   * to specify the protocol version.
+   * 
+ * + * string address = 2; + * + * @return The address. + */ + java.lang.String getAddress(); + /** + * + * + *
+   * The address of the API backend.
+   *
+   * The scheme is used to determine the backend protocol and security.
+   * The following schemes are accepted:
+   *
+   *    SCHEME        PROTOCOL    SECURITY
+   *    http://       HTTP        None
+   *    https://      HTTP        TLS
+   *    grpc://       gRPC        None
+   *    grpcs://      gRPC        TLS
+   *
+   * It is recommended to explicitly include a scheme. Leaving out the scheme
+   * may cause constrasting behaviors across platforms.
+   *
+   * If the port is unspecified, the default is:
+   * - 80 for schemes without TLS
+   * - 443 for schemes with TLS
+   *
+   * For HTTP backends, use [protocol][google.api.BackendRule.protocol]
+   * to specify the protocol version.
+   * 
+ * + * string address = 2; + * + * @return The bytes for address. + */ + com.google.protobuf.ByteString getAddressBytes(); + + /** + * + * + *
+   * The number of seconds to wait for a response from a request. The default
+   * varies based on the request protocol and deployment environment.
+   * 
+ * + * double deadline = 3; + * + * @return The deadline. + */ + double getDeadline(); + + /** + * + * + *
+   * Deprecated, do not use.
+   * 
+ * + * double min_deadline = 4 [deprecated = true]; + * + * @deprecated google.api.BackendRule.min_deadline is deprecated. See + * google/api/backend.proto;l=124 + * @return The minDeadline. + */ + @java.lang.Deprecated + double getMinDeadline(); + + /** + * + * + *
+   * The number of seconds to wait for the completion of a long running
+   * operation. The default is no deadline.
+   * 
+ * + * double operation_deadline = 5; + * + * @return The operationDeadline. + */ + double getOperationDeadline(); + + /** + * .google.api.BackendRule.PathTranslation path_translation = 6; + * + * @return The enum numeric value on the wire for pathTranslation. + */ + int getPathTranslationValue(); + /** + * .google.api.BackendRule.PathTranslation path_translation = 6; + * + * @return The pathTranslation. + */ + com.google.api.BackendRule.PathTranslation getPathTranslation(); + + /** + * + * + *
+   * The JWT audience is used when generating a JWT ID token for the backend.
+   * This ID token will be added in the HTTP "authorization" header, and sent
+   * to the backend.
+   * 
+ * + * string jwt_audience = 7; + * + * @return Whether the jwtAudience field is set. + */ + boolean hasJwtAudience(); + /** + * + * + *
+   * The JWT audience is used when generating a JWT ID token for the backend.
+   * This ID token will be added in the HTTP "authorization" header, and sent
+   * to the backend.
+   * 
+ * + * string jwt_audience = 7; + * + * @return The jwtAudience. + */ + java.lang.String getJwtAudience(); + /** + * + * + *
+   * The JWT audience is used when generating a JWT ID token for the backend.
+   * This ID token will be added in the HTTP "authorization" header, and sent
+   * to the backend.
+   * 
+ * + * string jwt_audience = 7; + * + * @return The bytes for jwtAudience. + */ + com.google.protobuf.ByteString getJwtAudienceBytes(); + + /** + * + * + *
+   * When disable_auth is true, a JWT ID token won't be generated and the
+   * original "Authorization" HTTP header will be preserved. If the header is
+   * used to carry the original token and is expected by the backend, this
+   * field must be set to true to preserve the header.
+   * 
+ * + * bool disable_auth = 8; + * + * @return Whether the disableAuth field is set. + */ + boolean hasDisableAuth(); + /** + * + * + *
+   * When disable_auth is true, a JWT ID token won't be generated and the
+   * original "Authorization" HTTP header will be preserved. If the header is
+   * used to carry the original token and is expected by the backend, this
+   * field must be set to true to preserve the header.
+   * 
+ * + * bool disable_auth = 8; + * + * @return The disableAuth. + */ + boolean getDisableAuth(); + + /** + * + * + *
+   * The protocol used for sending a request to the backend.
+   * The supported values are "http/1.1" and "h2".
+   *
+   * The default value is inferred from the scheme in the
+   * [address][google.api.BackendRule.address] field:
+   *
+   *    SCHEME        PROTOCOL
+   *    http://       http/1.1
+   *    https://      http/1.1
+   *    grpc://       h2
+   *    grpcs://      h2
+   *
+   * For secure HTTP backends (https://) that support HTTP/2, set this field
+   * to "h2" for improved performance.
+   *
+   * Configuring this field to non-default values is only supported for secure
+   * HTTP backends. This field will be ignored for all other backends.
+   *
+   * See
+   * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+   * for more details on the supported values.
+   * 
+ * + * string protocol = 9; + * + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + * + * + *
+   * The protocol used for sending a request to the backend.
+   * The supported values are "http/1.1" and "h2".
+   *
+   * The default value is inferred from the scheme in the
+   * [address][google.api.BackendRule.address] field:
+   *
+   *    SCHEME        PROTOCOL
+   *    http://       http/1.1
+   *    https://      http/1.1
+   *    grpc://       h2
+   *    grpcs://      h2
+   *
+   * For secure HTTP backends (https://) that support HTTP/2, set this field
+   * to "h2" for improved performance.
+   *
+   * Configuring this field to non-default values is only supported for secure
+   * HTTP backends. This field will be ignored for all other backends.
+   *
+   * See
+   * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
+   * for more details on the supported values.
+   * 
+ * + * string protocol = 9; + * + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString getProtocolBytes(); + + /** + * + * + *
+   * The map between request protocol and the backend address.
+   * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + int getOverridesByRequestProtocolCount(); + /** + * + * + *
+   * The map between request protocol and the backend address.
+   * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + boolean containsOverridesByRequestProtocol(java.lang.String key); + /** Use {@link #getOverridesByRequestProtocolMap()} instead. */ + @java.lang.Deprecated + java.util.Map getOverridesByRequestProtocol(); + /** + * + * + *
+   * The map between request protocol and the backend address.
+   * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + java.util.Map getOverridesByRequestProtocolMap(); + /** + * + * + *
+   * The map between request protocol and the backend address.
+   * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + /* nullable */ + com.google.api.BackendRule getOverridesByRequestProtocolOrDefault( + java.lang.String key, + /* nullable */ + com.google.api.BackendRule defaultValue); + /** + * + * + *
+   * The map between request protocol and the backend address.
+   * 
+ * + * map<string, .google.api.BackendRule> overrides_by_request_protocol = 10; + */ + com.google.api.BackendRule getOverridesByRequestProtocolOrThrow(java.lang.String key); + + com.google.api.BackendRule.AuthenticationCase getAuthenticationCase(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Billing.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Billing.java new file mode 100644 index 000000000000..0a882bdea093 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Billing.java @@ -0,0 +1,2089 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/billing.proto + +package com.google.api; + +/** + * + * + *
+ * Billing related configuration of the service.
+ *
+ * The following example shows how to configure monitored resources and metrics
+ * for billing, `consumer_destinations` is the only supported destination and
+ * the monitored resources need at least one label key
+ * `cloud.googleapis.com/location` to indicate the location of the billing
+ * usage, using different monitored resources between monitoring and billing is
+ * recommended so they can be evolved independently:
+ *
+ *
+ *     monitored_resources:
+ *     - type: library.googleapis.com/billing_branch
+ *       labels:
+ *       - key: cloud.googleapis.com/location
+ *         description: |
+ *           Predefined label to support billing location restriction.
+ *       - key: city
+ *         description: |
+ *           Custom label to define the city where the library branch is located
+ *           in.
+ *       - key: name
+ *         description: Custom label to define the name of the library branch.
+ *     metrics:
+ *     - name: library.googleapis.com/book/borrowed_count
+ *       metric_kind: DELTA
+ *       value_type: INT64
+ *       unit: "1"
+ *     billing:
+ *       consumer_destinations:
+ *       - monitored_resource: library.googleapis.com/billing_branch
+ *         metrics:
+ *         - library.googleapis.com/book/borrowed_count
+ * 
+ * + * Protobuf type {@code google.api.Billing} + */ +public final class Billing extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Billing) + BillingOrBuilder { + private static final long serialVersionUID = 0L; + // Use Billing.newBuilder() to construct. + private Billing(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Billing() { + consumerDestinations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Billing(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.BillingProto.internal_static_google_api_Billing_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.BillingProto.internal_static_google_api_Billing_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Billing.class, com.google.api.Billing.Builder.class); + } + + public interface BillingDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Billing.BillingDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 1; + * + * @return The monitoredResource. + */ + java.lang.String getMonitoredResource(); + /** + * + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 1; + * + * @return The bytes for monitoredResource. + */ + com.google.protobuf.ByteString getMonitoredResourceBytes(); + + /** + * + * + *
+     * Names of the metrics to report to this billing destination.
+     * Each name must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @return A list containing the metrics. + */ + java.util.List getMetricsList(); + /** + * + * + *
+     * Names of the metrics to report to this billing destination.
+     * Each name must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @return The count of metrics. + */ + int getMetricsCount(); + /** + * + * + *
+     * Names of the metrics to report to this billing destination.
+     * Each name must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the element to return. + * @return The metrics at the given index. + */ + java.lang.String getMetrics(int index); + /** + * + * + *
+     * Names of the metrics to report to this billing destination.
+     * Each name must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the value to return. + * @return The bytes of the metrics at the given index. + */ + com.google.protobuf.ByteString getMetricsBytes(int index); + } + /** + * + * + *
+   * Configuration of a specific billing destination (Currently only support
+   * bill against consumer project).
+   * 
+ * + * Protobuf type {@code google.api.Billing.BillingDestination} + */ + public static final class BillingDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Billing.BillingDestination) + BillingDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use BillingDestination.newBuilder() to construct. + private BillingDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BillingDestination() { + monitoredResource_ = ""; + metrics_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BillingDestination(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.BillingProto + .internal_static_google_api_Billing_BillingDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.BillingProto + .internal_static_google_api_Billing_BillingDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Billing.BillingDestination.class, + com.google.api.Billing.BillingDestination.Builder.class); + } + + public static final int MONITORED_RESOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object monitoredResource_ = ""; + /** + * + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 1; + * + * @return The monitoredResource. + */ + @java.lang.Override + public java.lang.String getMonitoredResource() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + monitoredResource_ = s; + return s; + } + } + /** + * + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 1; + * + * @return The bytes for monitoredResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMonitoredResourceBytes() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + monitoredResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRICS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList metrics_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Names of the metrics to report to this billing destination.
+     * Each name must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @return A list containing the metrics. + */ + public com.google.protobuf.ProtocolStringList getMetricsList() { + return metrics_; + } + /** + * + * + *
+     * Names of the metrics to report to this billing destination.
+     * Each name must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @return The count of metrics. + */ + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+     * Names of the metrics to report to this billing destination.
+     * Each name must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the element to return. + * @return The metrics at the given index. + */ + public java.lang.String getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+     * Names of the metrics to report to this billing destination.
+     * Each name must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the value to return. + * @return The bytes of the metrics at the given index. + */ + public com.google.protobuf.ByteString getMetricsBytes(int index) { + return metrics_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(monitoredResource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, monitoredResource_); + } + for (int i = 0; i < metrics_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metrics_.getRaw(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(monitoredResource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, monitoredResource_); + } + { + int dataSize = 0; + for (int i = 0; i < metrics_.size(); i++) { + dataSize += computeStringSizeNoTag(metrics_.getRaw(i)); + } + size += dataSize; + size += 1 * getMetricsList().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.api.Billing.BillingDestination)) { + return super.equals(obj); + } + com.google.api.Billing.BillingDestination other = + (com.google.api.Billing.BillingDestination) obj; + + if (!getMonitoredResource().equals(other.getMonitoredResource())) return false; + if (!getMetricsList().equals(other.getMetricsList())) 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) + MONITORED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getMonitoredResource().hashCode(); + if (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Billing.BillingDestination parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Billing.BillingDestination parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Billing.BillingDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Billing.BillingDestination 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.api.Billing.BillingDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Billing.BillingDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Billing.BillingDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Billing.BillingDestination 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.api.Billing.BillingDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Billing.BillingDestination 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.api.Billing.BillingDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Billing.BillingDestination 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.api.Billing.BillingDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration of a specific billing destination (Currently only support
+     * bill against consumer project).
+     * 
+ * + * Protobuf type {@code google.api.Billing.BillingDestination} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Billing.BillingDestination) + com.google.api.Billing.BillingDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.BillingProto + .internal_static_google_api_Billing_BillingDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.BillingProto + .internal_static_google_api_Billing_BillingDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Billing.BillingDestination.class, + com.google.api.Billing.BillingDestination.Builder.class); + } + + // Construct using com.google.api.Billing.BillingDestination.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + monitoredResource_ = ""; + metrics_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.BillingProto + .internal_static_google_api_Billing_BillingDestination_descriptor; + } + + @java.lang.Override + public com.google.api.Billing.BillingDestination getDefaultInstanceForType() { + return com.google.api.Billing.BillingDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Billing.BillingDestination build() { + com.google.api.Billing.BillingDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Billing.BillingDestination buildPartial() { + com.google.api.Billing.BillingDestination result = + new com.google.api.Billing.BillingDestination(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Billing.BillingDestination result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.monitoredResource_ = monitoredResource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + metrics_.makeImmutable(); + result.metrics_ = metrics_; + } + } + + @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.api.Billing.BillingDestination) { + return mergeFrom((com.google.api.Billing.BillingDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Billing.BillingDestination other) { + if (other == com.google.api.Billing.BillingDestination.getDefaultInstance()) return this; + if (!other.getMonitoredResource().isEmpty()) { + monitoredResource_ = other.monitoredResource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ |= 0x00000002; + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + 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: + { + monitoredResource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMetricsIsMutable(); + metrics_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object monitoredResource_ = ""; + /** + * + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 1; + * + * @return The monitoredResource. + */ + public java.lang.String getMonitoredResource() { + java.lang.Object ref = monitoredResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + monitoredResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 1; + * + * @return The bytes for monitoredResource. + */ + public com.google.protobuf.ByteString getMonitoredResourceBytes() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + monitoredResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 1; + * + * @param value The monitoredResource to set. + * @return This builder for chaining. + */ + public Builder setMonitoredResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + monitoredResource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 1; + * + * @return This builder for chaining. + */ + public Builder clearMonitoredResource() { + monitoredResource_ = getDefaultInstance().getMonitoredResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 1; + * + * @param value The bytes for monitoredResource to set. + * @return This builder for chaining. + */ + public Builder setMonitoredResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + monitoredResource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList metrics_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureMetricsIsMutable() { + if (!metrics_.isModifiable()) { + metrics_ = new com.google.protobuf.LazyStringArrayList(metrics_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Names of the metrics to report to this billing destination.
+       * Each name must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @return A list containing the metrics. + */ + public com.google.protobuf.ProtocolStringList getMetricsList() { + metrics_.makeImmutable(); + return metrics_; + } + /** + * + * + *
+       * Names of the metrics to report to this billing destination.
+       * Each name must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @return The count of metrics. + */ + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+       * Names of the metrics to report to this billing destination.
+       * Each name must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the element to return. + * @return The metrics at the given index. + */ + public java.lang.String getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+       * Names of the metrics to report to this billing destination.
+       * Each name must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the value to return. + * @return The bytes of the metrics at the given index. + */ + public com.google.protobuf.ByteString getMetricsBytes(int index) { + return metrics_.getByteString(index); + } + /** + * + * + *
+       * Names of the metrics to report to this billing destination.
+       * Each name must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param index The index to set the value at. + * @param value The metrics to set. + * @return This builder for chaining. + */ + public Builder setMetrics(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Names of the metrics to report to this billing destination.
+       * Each name must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param value The metrics to add. + * @return This builder for chaining. + */ + public Builder addMetrics(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Names of the metrics to report to this billing destination.
+       * Each name must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param values The metrics to add. + * @return This builder for chaining. + */ + public Builder addAllMetrics(java.lang.Iterable values) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Names of the metrics to report to this billing destination.
+       * Each name must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @return This builder for chaining. + */ + public Builder clearMetrics() { + metrics_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Names of the metrics to report to this billing destination.
+       * Each name must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param value The bytes of the metrics to add. + * @return This builder for chaining. + */ + public Builder addMetricsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMetricsIsMutable(); + metrics_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.Billing.BillingDestination) + } + + // @@protoc_insertion_point(class_scope:google.api.Billing.BillingDestination) + private static final com.google.api.Billing.BillingDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Billing.BillingDestination(); + } + + public static com.google.api.Billing.BillingDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BillingDestination 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.api.Billing.BillingDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List consumerDestinations_; + /** + * + * + *
+   * Billing configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations per service, each one must have
+   * a different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + @java.lang.Override + public java.util.List getConsumerDestinationsList() { + return consumerDestinations_; + } + /** + * + * + *
+   * Billing configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations per service, each one must have
+   * a different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + @java.lang.Override + public java.util.List + getConsumerDestinationsOrBuilderList() { + return consumerDestinations_; + } + /** + * + * + *
+   * Billing configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations per service, each one must have
+   * a different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + @java.lang.Override + public int getConsumerDestinationsCount() { + return consumerDestinations_.size(); + } + /** + * + * + *
+   * Billing configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations per service, each one must have
+   * a different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + @java.lang.Override + public com.google.api.Billing.BillingDestination getConsumerDestinations(int index) { + return consumerDestinations_.get(index); + } + /** + * + * + *
+   * Billing configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations per service, each one must have
+   * a different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + @java.lang.Override + public com.google.api.Billing.BillingDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index) { + return consumerDestinations_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < consumerDestinations_.size(); i++) { + output.writeMessage(8, consumerDestinations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < consumerDestinations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, consumerDestinations_.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.api.Billing)) { + return super.equals(obj); + } + com.google.api.Billing other = (com.google.api.Billing) obj; + + if (!getConsumerDestinationsList().equals(other.getConsumerDestinationsList())) 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 (getConsumerDestinationsCount() > 0) { + hash = (37 * hash) + CONSUMER_DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + getConsumerDestinationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Billing parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Billing parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Billing parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Billing 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.api.Billing parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Billing parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Billing parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Billing 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.api.Billing parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Billing 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.api.Billing parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Billing 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.api.Billing prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Billing related configuration of the service.
+   *
+   * The following example shows how to configure monitored resources and metrics
+   * for billing, `consumer_destinations` is the only supported destination and
+   * the monitored resources need at least one label key
+   * `cloud.googleapis.com/location` to indicate the location of the billing
+   * usage, using different monitored resources between monitoring and billing is
+   * recommended so they can be evolved independently:
+   *
+   *
+   *     monitored_resources:
+   *     - type: library.googleapis.com/billing_branch
+   *       labels:
+   *       - key: cloud.googleapis.com/location
+   *         description: |
+   *           Predefined label to support billing location restriction.
+   *       - key: city
+   *         description: |
+   *           Custom label to define the city where the library branch is located
+   *           in.
+   *       - key: name
+   *         description: Custom label to define the name of the library branch.
+   *     metrics:
+   *     - name: library.googleapis.com/book/borrowed_count
+   *       metric_kind: DELTA
+   *       value_type: INT64
+   *       unit: "1"
+   *     billing:
+   *       consumer_destinations:
+   *       - monitored_resource: library.googleapis.com/billing_branch
+   *         metrics:
+   *         - library.googleapis.com/book/borrowed_count
+   * 
+ * + * Protobuf type {@code google.api.Billing} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Billing) + com.google.api.BillingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.BillingProto.internal_static_google_api_Billing_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.BillingProto.internal_static_google_api_Billing_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Billing.class, com.google.api.Billing.Builder.class); + } + + // Construct using com.google.api.Billing.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (consumerDestinationsBuilder_ == null) { + consumerDestinations_ = java.util.Collections.emptyList(); + } else { + consumerDestinations_ = null; + consumerDestinationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.BillingProto.internal_static_google_api_Billing_descriptor; + } + + @java.lang.Override + public com.google.api.Billing getDefaultInstanceForType() { + return com.google.api.Billing.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Billing build() { + com.google.api.Billing result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Billing buildPartial() { + com.google.api.Billing result = new com.google.api.Billing(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Billing result) { + if (consumerDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.consumerDestinations_ = consumerDestinations_; + } else { + result.consumerDestinations_ = consumerDestinationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Billing result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Billing) { + return mergeFrom((com.google.api.Billing) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Billing other) { + if (other == com.google.api.Billing.getDefaultInstance()) return this; + if (consumerDestinationsBuilder_ == null) { + if (!other.consumerDestinations_.isEmpty()) { + if (consumerDestinations_.isEmpty()) { + consumerDestinations_ = other.consumerDestinations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.addAll(other.consumerDestinations_); + } + onChanged(); + } + } else { + if (!other.consumerDestinations_.isEmpty()) { + if (consumerDestinationsBuilder_.isEmpty()) { + consumerDestinationsBuilder_.dispose(); + consumerDestinationsBuilder_ = null; + consumerDestinations_ = other.consumerDestinations_; + bitField0_ = (bitField0_ & ~0x00000001); + consumerDestinationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConsumerDestinationsFieldBuilder() + : null; + } else { + consumerDestinationsBuilder_.addAllMessages(other.consumerDestinations_); + } + } + } + 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 66: + { + com.google.api.Billing.BillingDestination m = + input.readMessage( + com.google.api.Billing.BillingDestination.parser(), extensionRegistry); + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(m); + } else { + consumerDestinationsBuilder_.addMessage(m); + } + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List consumerDestinations_ = + java.util.Collections.emptyList(); + + private void ensureConsumerDestinationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + consumerDestinations_ = + new java.util.ArrayList( + consumerDestinations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Billing.BillingDestination, + com.google.api.Billing.BillingDestination.Builder, + com.google.api.Billing.BillingDestinationOrBuilder> + consumerDestinationsBuilder_; + + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public java.util.List getConsumerDestinationsList() { + if (consumerDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumerDestinations_); + } else { + return consumerDestinationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public int getConsumerDestinationsCount() { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.size(); + } else { + return consumerDestinationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public com.google.api.Billing.BillingDestination getConsumerDestinations(int index) { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.get(index); + } else { + return consumerDestinationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public Builder setConsumerDestinations( + int index, com.google.api.Billing.BillingDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.set(index, value); + onChanged(); + } else { + consumerDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public Builder setConsumerDestinations( + int index, com.google.api.Billing.BillingDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public Builder addConsumerDestinations(com.google.api.Billing.BillingDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(value); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public Builder addConsumerDestinations( + int index, com.google.api.Billing.BillingDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(index, value); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public Builder addConsumerDestinations( + com.google.api.Billing.BillingDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public Builder addConsumerDestinations( + int index, com.google.api.Billing.BillingDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public Builder addAllConsumerDestinations( + java.lang.Iterable values) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, consumerDestinations_); + onChanged(); + } else { + consumerDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public Builder clearConsumerDestinations() { + if (consumerDestinationsBuilder_ == null) { + consumerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + consumerDestinationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public Builder removeConsumerDestinations(int index) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.remove(index); + onChanged(); + } else { + consumerDestinationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public com.google.api.Billing.BillingDestination.Builder getConsumerDestinationsBuilder( + int index) { + return getConsumerDestinationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public com.google.api.Billing.BillingDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index) { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.get(index); + } else { + return consumerDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public java.util.List + getConsumerDestinationsOrBuilderList() { + if (consumerDestinationsBuilder_ != null) { + return consumerDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(consumerDestinations_); + } + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public com.google.api.Billing.BillingDestination.Builder addConsumerDestinationsBuilder() { + return getConsumerDestinationsFieldBuilder() + .addBuilder(com.google.api.Billing.BillingDestination.getDefaultInstance()); + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public com.google.api.Billing.BillingDestination.Builder addConsumerDestinationsBuilder( + int index) { + return getConsumerDestinationsFieldBuilder() + .addBuilder(index, com.google.api.Billing.BillingDestination.getDefaultInstance()); + } + /** + * + * + *
+     * Billing configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations per service, each one must have
+     * a different monitored resource type. A metric can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + public java.util.List + getConsumerDestinationsBuilderList() { + return getConsumerDestinationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Billing.BillingDestination, + com.google.api.Billing.BillingDestination.Builder, + com.google.api.Billing.BillingDestinationOrBuilder> + getConsumerDestinationsFieldBuilder() { + if (consumerDestinationsBuilder_ == null) { + consumerDestinationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Billing.BillingDestination, + com.google.api.Billing.BillingDestination.Builder, + com.google.api.Billing.BillingDestinationOrBuilder>( + consumerDestinations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + consumerDestinations_ = null; + } + return consumerDestinationsBuilder_; + } + + @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.api.Billing) + } + + // @@protoc_insertion_point(class_scope:google.api.Billing) + private static final com.google.api.Billing DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Billing(); + } + + public static com.google.api.Billing getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Billing 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.api.Billing getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BillingOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BillingOrBuilder.java new file mode 100644 index 000000000000..9f9069605dce --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BillingOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/billing.proto + +package com.google.api; + +public interface BillingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Billing) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Billing configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations per service, each one must have
+   * a different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + java.util.List getConsumerDestinationsList(); + /** + * + * + *
+   * Billing configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations per service, each one must have
+   * a different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + com.google.api.Billing.BillingDestination getConsumerDestinations(int index); + /** + * + * + *
+   * Billing configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations per service, each one must have
+   * a different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + int getConsumerDestinationsCount(); + /** + * + * + *
+   * Billing configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations per service, each one must have
+   * a different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + java.util.List + getConsumerDestinationsOrBuilderList(); + /** + * + * + *
+   * Billing configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations per service, each one must have
+   * a different monitored resource type. A metric can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Billing.BillingDestination consumer_destinations = 8; + */ + com.google.api.Billing.BillingDestinationOrBuilder getConsumerDestinationsOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BillingProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BillingProto.java new file mode 100644 index 000000000000..19dbc9ee9d3c --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/BillingProto.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/billing.proto + +package com.google.api; + +public final class BillingProto { + private BillingProto() {} + + 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_api_Billing_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Billing_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Billing_BillingDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Billing_BillingDestination_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\030google/api/billing.proto\022\ngoogle.api\"\223" + + "\001\n\007Billing\022E\n\025consumer_destinations\030\010 \003(" + + "\0132&.google.api.Billing.BillingDestinatio" + + "n\032A\n\022BillingDestination\022\032\n\022monitored_res" + + "ource\030\001 \001(\t\022\017\n\007metrics\030\002 \003(\tBn\n\016com.goog" + + "le.apiB\014BillingProtoP\001ZEgoogle.golang.or" + + "g/genproto/googleapis/api/serviceconfig;" + + "serviceconfig\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_Billing_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Billing_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Billing_descriptor, + new java.lang.String[] { + "ConsumerDestinations", + }); + internal_static_google_api_Billing_BillingDestination_descriptor = + internal_static_google_api_Billing_descriptor.getNestedTypes().get(0); + internal_static_google_api_Billing_BillingDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Billing_BillingDestination_descriptor, + new java.lang.String[] { + "MonitoredResource", "Metrics", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ChangeType.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ChangeType.java new file mode 100644 index 000000000000..01e78b324fb4 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ChangeType.java @@ -0,0 +1,205 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/config_change.proto + +package com.google.api; + +/** + * + * + *
+ * Classifies set of possible modifications to an object in the service
+ * configuration.
+ * 
+ * + * Protobuf enum {@code google.api.ChangeType} + */ +public enum ChangeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * No value was provided.
+   * 
+ * + * CHANGE_TYPE_UNSPECIFIED = 0; + */ + CHANGE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * The changed object exists in the 'new' service configuration, but not
+   * in the 'old' service configuration.
+   * 
+ * + * ADDED = 1; + */ + ADDED(1), + /** + * + * + *
+   * The changed object exists in the 'old' service configuration, but not
+   * in the 'new' service configuration.
+   * 
+ * + * REMOVED = 2; + */ + REMOVED(2), + /** + * + * + *
+   * The changed object exists in both service configurations, but its value
+   * is different.
+   * 
+ * + * MODIFIED = 3; + */ + MODIFIED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * No value was provided.
+   * 
+ * + * CHANGE_TYPE_UNSPECIFIED = 0; + */ + public static final int CHANGE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The changed object exists in the 'new' service configuration, but not
+   * in the 'old' service configuration.
+   * 
+ * + * ADDED = 1; + */ + public static final int ADDED_VALUE = 1; + /** + * + * + *
+   * The changed object exists in the 'old' service configuration, but not
+   * in the 'new' service configuration.
+   * 
+ * + * REMOVED = 2; + */ + public static final int REMOVED_VALUE = 2; + /** + * + * + *
+   * The changed object exists in both service configurations, but its value
+   * is different.
+   * 
+ * + * MODIFIED = 3; + */ + public static final int MODIFIED_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 ChangeType 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 ChangeType forNumber(int value) { + switch (value) { + case 0: + return CHANGE_TYPE_UNSPECIFIED; + case 1: + return ADDED; + case 2: + return REMOVED; + case 3: + return MODIFIED; + 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 ChangeType findValueByNumber(int number) { + return ChangeType.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.api.ConfigChangeProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ChangeType[] VALUES = values(); + + public static ChangeType 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 ChangeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.ChangeType) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibraryDestination.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibraryDestination.java new file mode 100644 index 000000000000..5f3746a532e8 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibraryDestination.java @@ -0,0 +1,183 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * To where should client libraries be published?
+ * 
+ * + * Protobuf enum {@code google.api.ClientLibraryDestination} + */ +public enum ClientLibraryDestination implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Client libraries will neither be generated nor published to package
+   * managers.
+   * 
+ * + * CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0; + */ + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED(0), + /** + * + * + *
+   * Generate the client library in a repo under github.com/googleapis,
+   * but don't publish it to package managers.
+   * 
+ * + * GITHUB = 10; + */ + GITHUB(10), + /** + * + * + *
+   * Publish the library to package managers like nuget.org and npmjs.com.
+   * 
+ * + * PACKAGE_MANAGER = 20; + */ + PACKAGE_MANAGER(20), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Client libraries will neither be generated nor published to package
+   * managers.
+   * 
+ * + * CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0; + */ + public static final int CLIENT_LIBRARY_DESTINATION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Generate the client library in a repo under github.com/googleapis,
+   * but don't publish it to package managers.
+   * 
+ * + * GITHUB = 10; + */ + public static final int GITHUB_VALUE = 10; + /** + * + * + *
+   * Publish the library to package managers like nuget.org and npmjs.com.
+   * 
+ * + * PACKAGE_MANAGER = 20; + */ + public static final int PACKAGE_MANAGER_VALUE = 20; + + 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 ClientLibraryDestination 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 ClientLibraryDestination forNumber(int value) { + switch (value) { + case 0: + return CLIENT_LIBRARY_DESTINATION_UNSPECIFIED; + case 10: + return GITHUB; + case 20: + return PACKAGE_MANAGER; + 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 ClientLibraryDestination findValueByNumber(int number) { + return ClientLibraryDestination.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.api.ClientProto.getDescriptor().getEnumTypes().get(1); + } + + private static final ClientLibraryDestination[] VALUES = values(); + + public static ClientLibraryDestination 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 ClientLibraryDestination(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.ClientLibraryDestination) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibraryOrganization.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibraryOrganization.java new file mode 100644 index 000000000000..fcb95974d50e --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibraryOrganization.java @@ -0,0 +1,290 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * The organization for which the client libraries are being published.
+ * Affects the url where generated docs are published, etc.
+ * 
+ * + * Protobuf enum {@code google.api.ClientLibraryOrganization} + */ +public enum ClientLibraryOrganization implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not useful.
+   * 
+ * + * CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0; + */ + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED(0), + /** + * + * + *
+   * Google Cloud Platform Org.
+   * 
+ * + * CLOUD = 1; + */ + CLOUD(1), + /** + * + * + *
+   * Ads (Advertising) Org.
+   * 
+ * + * ADS = 2; + */ + ADS(2), + /** + * + * + *
+   * Photos Org.
+   * 
+ * + * PHOTOS = 3; + */ + PHOTOS(3), + /** + * + * + *
+   * Street View Org.
+   * 
+ * + * STREET_VIEW = 4; + */ + STREET_VIEW(4), + /** + * + * + *
+   * Shopping Org.
+   * 
+ * + * SHOPPING = 5; + */ + SHOPPING(5), + /** + * + * + *
+   * Geo Org.
+   * 
+ * + * GEO = 6; + */ + GEO(6), + /** + * + * + *
+   * Generative AI - https://developers.generativeai.google
+   * 
+ * + * GENERATIVE_AI = 7; + */ + GENERATIVE_AI(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not useful.
+   * 
+ * + * CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0; + */ + public static final int CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Google Cloud Platform Org.
+   * 
+ * + * CLOUD = 1; + */ + public static final int CLOUD_VALUE = 1; + /** + * + * + *
+   * Ads (Advertising) Org.
+   * 
+ * + * ADS = 2; + */ + public static final int ADS_VALUE = 2; + /** + * + * + *
+   * Photos Org.
+   * 
+ * + * PHOTOS = 3; + */ + public static final int PHOTOS_VALUE = 3; + /** + * + * + *
+   * Street View Org.
+   * 
+ * + * STREET_VIEW = 4; + */ + public static final int STREET_VIEW_VALUE = 4; + /** + * + * + *
+   * Shopping Org.
+   * 
+ * + * SHOPPING = 5; + */ + public static final int SHOPPING_VALUE = 5; + /** + * + * + *
+   * Geo Org.
+   * 
+ * + * GEO = 6; + */ + public static final int GEO_VALUE = 6; + /** + * + * + *
+   * Generative AI - https://developers.generativeai.google
+   * 
+ * + * GENERATIVE_AI = 7; + */ + public static final int GENERATIVE_AI_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 ClientLibraryOrganization 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 ClientLibraryOrganization forNumber(int value) { + switch (value) { + case 0: + return CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED; + case 1: + return CLOUD; + case 2: + return ADS; + case 3: + return PHOTOS; + case 4: + return STREET_VIEW; + case 5: + return SHOPPING; + case 6: + return GEO; + case 7: + return GENERATIVE_AI; + 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 ClientLibraryOrganization findValueByNumber(int number) { + return ClientLibraryOrganization.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.api.ClientProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ClientLibraryOrganization[] VALUES = values(); + + public static ClientLibraryOrganization 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 ClientLibraryOrganization(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.ClientLibraryOrganization) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibrarySettings.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibrarySettings.java new file mode 100644 index 000000000000..9a9adb36b08b --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibrarySettings.java @@ -0,0 +1,2965 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * Details about how and where to publish client libraries.
+ * 
+ * + * Protobuf type {@code google.api.ClientLibrarySettings} + */ +public final class ClientLibrarySettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.ClientLibrarySettings) + ClientLibrarySettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClientLibrarySettings.newBuilder() to construct. + private ClientLibrarySettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClientLibrarySettings() { + version_ = ""; + launchStage_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClientLibrarySettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_ClientLibrarySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto + .internal_static_google_api_ClientLibrarySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ClientLibrarySettings.class, + com.google.api.ClientLibrarySettings.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * Version of the API to apply these settings to. This is the full protobuf
+   * package for the API, ending in the version element.
+   * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+   * 
+ * + * string version = 1; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Version of the API to apply these settings to. This is the full protobuf
+   * package for the API, ending in the version element.
+   * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+   * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAUNCH_STAGE_FIELD_NUMBER = 2; + private int launchStage_ = 0; + /** + * + * + *
+   * Launch stage of this version of the API.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 2; + * + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Override + public int getLaunchStageValue() { + return launchStage_; + } + /** + * + * + *
+   * Launch stage of this version of the API.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 2; + * + * @return The launchStage. + */ + @java.lang.Override + public com.google.api.LaunchStage getLaunchStage() { + com.google.api.LaunchStage result = com.google.api.LaunchStage.forNumber(launchStage_); + return result == null ? com.google.api.LaunchStage.UNRECOGNIZED : result; + } + + public static final int REST_NUMERIC_ENUMS_FIELD_NUMBER = 3; + private boolean restNumericEnums_ = false; + /** + * + * + *
+   * When using transport=rest, the client request will encode enums as
+   * numbers rather than strings.
+   * 
+ * + * bool rest_numeric_enums = 3; + * + * @return The restNumericEnums. + */ + @java.lang.Override + public boolean getRestNumericEnums() { + return restNumericEnums_; + } + + public static final int JAVA_SETTINGS_FIELD_NUMBER = 21; + private com.google.api.JavaSettings javaSettings_; + /** + * + * + *
+   * Settings for legacy Java features, supported in the Service YAML.
+   * 
+ * + * .google.api.JavaSettings java_settings = 21; + * + * @return Whether the javaSettings field is set. + */ + @java.lang.Override + public boolean hasJavaSettings() { + return javaSettings_ != null; + } + /** + * + * + *
+   * Settings for legacy Java features, supported in the Service YAML.
+   * 
+ * + * .google.api.JavaSettings java_settings = 21; + * + * @return The javaSettings. + */ + @java.lang.Override + public com.google.api.JavaSettings getJavaSettings() { + return javaSettings_ == null ? com.google.api.JavaSettings.getDefaultInstance() : javaSettings_; + } + /** + * + * + *
+   * Settings for legacy Java features, supported in the Service YAML.
+   * 
+ * + * .google.api.JavaSettings java_settings = 21; + */ + @java.lang.Override + public com.google.api.JavaSettingsOrBuilder getJavaSettingsOrBuilder() { + return javaSettings_ == null ? com.google.api.JavaSettings.getDefaultInstance() : javaSettings_; + } + + public static final int CPP_SETTINGS_FIELD_NUMBER = 22; + private com.google.api.CppSettings cppSettings_; + /** + * + * + *
+   * Settings for C++ client libraries.
+   * 
+ * + * .google.api.CppSettings cpp_settings = 22; + * + * @return Whether the cppSettings field is set. + */ + @java.lang.Override + public boolean hasCppSettings() { + return cppSettings_ != null; + } + /** + * + * + *
+   * Settings for C++ client libraries.
+   * 
+ * + * .google.api.CppSettings cpp_settings = 22; + * + * @return The cppSettings. + */ + @java.lang.Override + public com.google.api.CppSettings getCppSettings() { + return cppSettings_ == null ? com.google.api.CppSettings.getDefaultInstance() : cppSettings_; + } + /** + * + * + *
+   * Settings for C++ client libraries.
+   * 
+ * + * .google.api.CppSettings cpp_settings = 22; + */ + @java.lang.Override + public com.google.api.CppSettingsOrBuilder getCppSettingsOrBuilder() { + return cppSettings_ == null ? com.google.api.CppSettings.getDefaultInstance() : cppSettings_; + } + + public static final int PHP_SETTINGS_FIELD_NUMBER = 23; + private com.google.api.PhpSettings phpSettings_; + /** + * + * + *
+   * Settings for PHP client libraries.
+   * 
+ * + * .google.api.PhpSettings php_settings = 23; + * + * @return Whether the phpSettings field is set. + */ + @java.lang.Override + public boolean hasPhpSettings() { + return phpSettings_ != null; + } + /** + * + * + *
+   * Settings for PHP client libraries.
+   * 
+ * + * .google.api.PhpSettings php_settings = 23; + * + * @return The phpSettings. + */ + @java.lang.Override + public com.google.api.PhpSettings getPhpSettings() { + return phpSettings_ == null ? com.google.api.PhpSettings.getDefaultInstance() : phpSettings_; + } + /** + * + * + *
+   * Settings for PHP client libraries.
+   * 
+ * + * .google.api.PhpSettings php_settings = 23; + */ + @java.lang.Override + public com.google.api.PhpSettingsOrBuilder getPhpSettingsOrBuilder() { + return phpSettings_ == null ? com.google.api.PhpSettings.getDefaultInstance() : phpSettings_; + } + + public static final int PYTHON_SETTINGS_FIELD_NUMBER = 24; + private com.google.api.PythonSettings pythonSettings_; + /** + * + * + *
+   * Settings for Python client libraries.
+   * 
+ * + * .google.api.PythonSettings python_settings = 24; + * + * @return Whether the pythonSettings field is set. + */ + @java.lang.Override + public boolean hasPythonSettings() { + return pythonSettings_ != null; + } + /** + * + * + *
+   * Settings for Python client libraries.
+   * 
+ * + * .google.api.PythonSettings python_settings = 24; + * + * @return The pythonSettings. + */ + @java.lang.Override + public com.google.api.PythonSettings getPythonSettings() { + return pythonSettings_ == null + ? com.google.api.PythonSettings.getDefaultInstance() + : pythonSettings_; + } + /** + * + * + *
+   * Settings for Python client libraries.
+   * 
+ * + * .google.api.PythonSettings python_settings = 24; + */ + @java.lang.Override + public com.google.api.PythonSettingsOrBuilder getPythonSettingsOrBuilder() { + return pythonSettings_ == null + ? com.google.api.PythonSettings.getDefaultInstance() + : pythonSettings_; + } + + public static final int NODE_SETTINGS_FIELD_NUMBER = 25; + private com.google.api.NodeSettings nodeSettings_; + /** + * + * + *
+   * Settings for Node client libraries.
+   * 
+ * + * .google.api.NodeSettings node_settings = 25; + * + * @return Whether the nodeSettings field is set. + */ + @java.lang.Override + public boolean hasNodeSettings() { + return nodeSettings_ != null; + } + /** + * + * + *
+   * Settings for Node client libraries.
+   * 
+ * + * .google.api.NodeSettings node_settings = 25; + * + * @return The nodeSettings. + */ + @java.lang.Override + public com.google.api.NodeSettings getNodeSettings() { + return nodeSettings_ == null ? com.google.api.NodeSettings.getDefaultInstance() : nodeSettings_; + } + /** + * + * + *
+   * Settings for Node client libraries.
+   * 
+ * + * .google.api.NodeSettings node_settings = 25; + */ + @java.lang.Override + public com.google.api.NodeSettingsOrBuilder getNodeSettingsOrBuilder() { + return nodeSettings_ == null ? com.google.api.NodeSettings.getDefaultInstance() : nodeSettings_; + } + + public static final int DOTNET_SETTINGS_FIELD_NUMBER = 26; + private com.google.api.DotnetSettings dotnetSettings_; + /** + * + * + *
+   * Settings for .NET client libraries.
+   * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + * + * @return Whether the dotnetSettings field is set. + */ + @java.lang.Override + public boolean hasDotnetSettings() { + return dotnetSettings_ != null; + } + /** + * + * + *
+   * Settings for .NET client libraries.
+   * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + * + * @return The dotnetSettings. + */ + @java.lang.Override + public com.google.api.DotnetSettings getDotnetSettings() { + return dotnetSettings_ == null + ? com.google.api.DotnetSettings.getDefaultInstance() + : dotnetSettings_; + } + /** + * + * + *
+   * Settings for .NET client libraries.
+   * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + */ + @java.lang.Override + public com.google.api.DotnetSettingsOrBuilder getDotnetSettingsOrBuilder() { + return dotnetSettings_ == null + ? com.google.api.DotnetSettings.getDefaultInstance() + : dotnetSettings_; + } + + public static final int RUBY_SETTINGS_FIELD_NUMBER = 27; + private com.google.api.RubySettings rubySettings_; + /** + * + * + *
+   * Settings for Ruby client libraries.
+   * 
+ * + * .google.api.RubySettings ruby_settings = 27; + * + * @return Whether the rubySettings field is set. + */ + @java.lang.Override + public boolean hasRubySettings() { + return rubySettings_ != null; + } + /** + * + * + *
+   * Settings for Ruby client libraries.
+   * 
+ * + * .google.api.RubySettings ruby_settings = 27; + * + * @return The rubySettings. + */ + @java.lang.Override + public com.google.api.RubySettings getRubySettings() { + return rubySettings_ == null ? com.google.api.RubySettings.getDefaultInstance() : rubySettings_; + } + /** + * + * + *
+   * Settings for Ruby client libraries.
+   * 
+ * + * .google.api.RubySettings ruby_settings = 27; + */ + @java.lang.Override + public com.google.api.RubySettingsOrBuilder getRubySettingsOrBuilder() { + return rubySettings_ == null ? com.google.api.RubySettings.getDefaultInstance() : rubySettings_; + } + + public static final int GO_SETTINGS_FIELD_NUMBER = 28; + private com.google.api.GoSettings goSettings_; + /** + * + * + *
+   * Settings for Go client libraries.
+   * 
+ * + * .google.api.GoSettings go_settings = 28; + * + * @return Whether the goSettings field is set. + */ + @java.lang.Override + public boolean hasGoSettings() { + return goSettings_ != null; + } + /** + * + * + *
+   * Settings for Go client libraries.
+   * 
+ * + * .google.api.GoSettings go_settings = 28; + * + * @return The goSettings. + */ + @java.lang.Override + public com.google.api.GoSettings getGoSettings() { + return goSettings_ == null ? com.google.api.GoSettings.getDefaultInstance() : goSettings_; + } + /** + * + * + *
+   * Settings for Go client libraries.
+   * 
+ * + * .google.api.GoSettings go_settings = 28; + */ + @java.lang.Override + public com.google.api.GoSettingsOrBuilder getGoSettingsOrBuilder() { + return goSettings_ == null ? com.google.api.GoSettings.getDefaultInstance() : goSettings_; + } + + 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(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, launchStage_); + } + if (restNumericEnums_ != false) { + output.writeBool(3, restNumericEnums_); + } + if (javaSettings_ != null) { + output.writeMessage(21, getJavaSettings()); + } + if (cppSettings_ != null) { + output.writeMessage(22, getCppSettings()); + } + if (phpSettings_ != null) { + output.writeMessage(23, getPhpSettings()); + } + if (pythonSettings_ != null) { + output.writeMessage(24, getPythonSettings()); + } + if (nodeSettings_ != null) { + output.writeMessage(25, getNodeSettings()); + } + if (dotnetSettings_ != null) { + output.writeMessage(26, getDotnetSettings()); + } + if (rubySettings_ != null) { + output.writeMessage(27, getRubySettings()); + } + if (goSettings_ != null) { + output.writeMessage(28, getGoSettings()); + } + 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(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, launchStage_); + } + if (restNumericEnums_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, restNumericEnums_); + } + if (javaSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getJavaSettings()); + } + if (cppSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getCppSettings()); + } + if (phpSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getPhpSettings()); + } + if (pythonSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getPythonSettings()); + } + if (nodeSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getNodeSettings()); + } + if (dotnetSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getDotnetSettings()); + } + if (rubySettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getRubySettings()); + } + if (goSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getGoSettings()); + } + 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.api.ClientLibrarySettings)) { + return super.equals(obj); + } + com.google.api.ClientLibrarySettings other = (com.google.api.ClientLibrarySettings) obj; + + if (!getVersion().equals(other.getVersion())) return false; + if (launchStage_ != other.launchStage_) return false; + if (getRestNumericEnums() != other.getRestNumericEnums()) return false; + if (hasJavaSettings() != other.hasJavaSettings()) return false; + if (hasJavaSettings()) { + if (!getJavaSettings().equals(other.getJavaSettings())) return false; + } + if (hasCppSettings() != other.hasCppSettings()) return false; + if (hasCppSettings()) { + if (!getCppSettings().equals(other.getCppSettings())) return false; + } + if (hasPhpSettings() != other.hasPhpSettings()) return false; + if (hasPhpSettings()) { + if (!getPhpSettings().equals(other.getPhpSettings())) return false; + } + if (hasPythonSettings() != other.hasPythonSettings()) return false; + if (hasPythonSettings()) { + if (!getPythonSettings().equals(other.getPythonSettings())) return false; + } + if (hasNodeSettings() != other.hasNodeSettings()) return false; + if (hasNodeSettings()) { + if (!getNodeSettings().equals(other.getNodeSettings())) return false; + } + if (hasDotnetSettings() != other.hasDotnetSettings()) return false; + if (hasDotnetSettings()) { + if (!getDotnetSettings().equals(other.getDotnetSettings())) return false; + } + if (hasRubySettings() != other.hasRubySettings()) return false; + if (hasRubySettings()) { + if (!getRubySettings().equals(other.getRubySettings())) return false; + } + if (hasGoSettings() != other.hasGoSettings()) return false; + if (hasGoSettings()) { + if (!getGoSettings().equals(other.getGoSettings())) 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) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + LAUNCH_STAGE_FIELD_NUMBER; + hash = (53 * hash) + launchStage_; + hash = (37 * hash) + REST_NUMERIC_ENUMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRestNumericEnums()); + if (hasJavaSettings()) { + hash = (37 * hash) + JAVA_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getJavaSettings().hashCode(); + } + if (hasCppSettings()) { + hash = (37 * hash) + CPP_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getCppSettings().hashCode(); + } + if (hasPhpSettings()) { + hash = (37 * hash) + PHP_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getPhpSettings().hashCode(); + } + if (hasPythonSettings()) { + hash = (37 * hash) + PYTHON_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getPythonSettings().hashCode(); + } + if (hasNodeSettings()) { + hash = (37 * hash) + NODE_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getNodeSettings().hashCode(); + } + if (hasDotnetSettings()) { + hash = (37 * hash) + DOTNET_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getDotnetSettings().hashCode(); + } + if (hasRubySettings()) { + hash = (37 * hash) + RUBY_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getRubySettings().hashCode(); + } + if (hasGoSettings()) { + hash = (37 * hash) + GO_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getGoSettings().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.ClientLibrarySettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ClientLibrarySettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.ClientLibrarySettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ClientLibrarySettings 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.api.ClientLibrarySettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ClientLibrarySettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.ClientLibrarySettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.ClientLibrarySettings 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.api.ClientLibrarySettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.ClientLibrarySettings 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.api.ClientLibrarySettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.ClientLibrarySettings 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.api.ClientLibrarySettings 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; + } + /** + * + * + *
+   * Details about how and where to publish client libraries.
+   * 
+ * + * Protobuf type {@code google.api.ClientLibrarySettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.ClientLibrarySettings) + com.google.api.ClientLibrarySettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_ClientLibrarySettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto + .internal_static_google_api_ClientLibrarySettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ClientLibrarySettings.class, + com.google.api.ClientLibrarySettings.Builder.class); + } + + // Construct using com.google.api.ClientLibrarySettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + launchStage_ = 0; + restNumericEnums_ = false; + javaSettings_ = null; + if (javaSettingsBuilder_ != null) { + javaSettingsBuilder_.dispose(); + javaSettingsBuilder_ = null; + } + cppSettings_ = null; + if (cppSettingsBuilder_ != null) { + cppSettingsBuilder_.dispose(); + cppSettingsBuilder_ = null; + } + phpSettings_ = null; + if (phpSettingsBuilder_ != null) { + phpSettingsBuilder_.dispose(); + phpSettingsBuilder_ = null; + } + pythonSettings_ = null; + if (pythonSettingsBuilder_ != null) { + pythonSettingsBuilder_.dispose(); + pythonSettingsBuilder_ = null; + } + nodeSettings_ = null; + if (nodeSettingsBuilder_ != null) { + nodeSettingsBuilder_.dispose(); + nodeSettingsBuilder_ = null; + } + dotnetSettings_ = null; + if (dotnetSettingsBuilder_ != null) { + dotnetSettingsBuilder_.dispose(); + dotnetSettingsBuilder_ = null; + } + rubySettings_ = null; + if (rubySettingsBuilder_ != null) { + rubySettingsBuilder_.dispose(); + rubySettingsBuilder_ = null; + } + goSettings_ = null; + if (goSettingsBuilder_ != null) { + goSettingsBuilder_.dispose(); + goSettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto.internal_static_google_api_ClientLibrarySettings_descriptor; + } + + @java.lang.Override + public com.google.api.ClientLibrarySettings getDefaultInstanceForType() { + return com.google.api.ClientLibrarySettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.ClientLibrarySettings build() { + com.google.api.ClientLibrarySettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.ClientLibrarySettings buildPartial() { + com.google.api.ClientLibrarySettings result = new com.google.api.ClientLibrarySettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.ClientLibrarySettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.launchStage_ = launchStage_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.restNumericEnums_ = restNumericEnums_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.javaSettings_ = + javaSettingsBuilder_ == null ? javaSettings_ : javaSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.cppSettings_ = + cppSettingsBuilder_ == null ? cppSettings_ : cppSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.phpSettings_ = + phpSettingsBuilder_ == null ? phpSettings_ : phpSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.pythonSettings_ = + pythonSettingsBuilder_ == null ? pythonSettings_ : pythonSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.nodeSettings_ = + nodeSettingsBuilder_ == null ? nodeSettings_ : nodeSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.dotnetSettings_ = + dotnetSettingsBuilder_ == null ? dotnetSettings_ : dotnetSettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.rubySettings_ = + rubySettingsBuilder_ == null ? rubySettings_ : rubySettingsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.goSettings_ = goSettingsBuilder_ == null ? goSettings_ : goSettingsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.ClientLibrarySettings) { + return mergeFrom((com.google.api.ClientLibrarySettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.ClientLibrarySettings other) { + if (other == com.google.api.ClientLibrarySettings.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.launchStage_ != 0) { + setLaunchStageValue(other.getLaunchStageValue()); + } + if (other.getRestNumericEnums() != false) { + setRestNumericEnums(other.getRestNumericEnums()); + } + if (other.hasJavaSettings()) { + mergeJavaSettings(other.getJavaSettings()); + } + if (other.hasCppSettings()) { + mergeCppSettings(other.getCppSettings()); + } + if (other.hasPhpSettings()) { + mergePhpSettings(other.getPhpSettings()); + } + if (other.hasPythonSettings()) { + mergePythonSettings(other.getPythonSettings()); + } + if (other.hasNodeSettings()) { + mergeNodeSettings(other.getNodeSettings()); + } + if (other.hasDotnetSettings()) { + mergeDotnetSettings(other.getDotnetSettings()); + } + if (other.hasRubySettings()) { + mergeRubySettings(other.getRubySettings()); + } + if (other.hasGoSettings()) { + mergeGoSettings(other.getGoSettings()); + } + 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: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + launchStage_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + restNumericEnums_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 170: + { + input.readMessage(getJavaSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 170 + case 178: + { + input.readMessage(getCppSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 178 + case 186: + { + input.readMessage(getPhpSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 186 + case 194: + { + input.readMessage(getPythonSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 194 + case 202: + { + input.readMessage(getNodeSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 202 + case 210: + { + input.readMessage(getDotnetSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 210 + case 218: + { + input.readMessage(getRubySettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 218 + case 226: + { + input.readMessage(getGoSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 226 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // 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 version_ = ""; + /** + * + * + *
+     * Version of the API to apply these settings to. This is the full protobuf
+     * package for the API, ending in the version element.
+     * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+     * 
+ * + * string version = 1; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of the API to apply these settings to. This is the full protobuf
+     * package for the API, ending in the version element.
+     * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+     * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of the API to apply these settings to. This is the full protobuf
+     * package for the API, ending in the version element.
+     * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+     * 
+ * + * string version = 1; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the API to apply these settings to. This is the full protobuf
+     * package for the API, ending in the version element.
+     * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+     * 
+ * + * string version = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the API to apply these settings to. This is the full protobuf
+     * package for the API, ending in the version element.
+     * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+     * 
+ * + * string version = 1; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int launchStage_ = 0; + /** + * + * + *
+     * Launch stage of this version of the API.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 2; + * + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Override + public int getLaunchStageValue() { + return launchStage_; + } + /** + * + * + *
+     * Launch stage of this version of the API.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 2; + * + * @param value The enum numeric value on the wire for launchStage to set. + * @return This builder for chaining. + */ + public Builder setLaunchStageValue(int value) { + launchStage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Launch stage of this version of the API.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 2; + * + * @return The launchStage. + */ + @java.lang.Override + public com.google.api.LaunchStage getLaunchStage() { + com.google.api.LaunchStage result = com.google.api.LaunchStage.forNumber(launchStage_); + return result == null ? com.google.api.LaunchStage.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Launch stage of this version of the API.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 2; + * + * @param value The launchStage to set. + * @return This builder for chaining. + */ + public Builder setLaunchStage(com.google.api.LaunchStage value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + launchStage_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Launch stage of this version of the API.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 2; + * + * @return This builder for chaining. + */ + public Builder clearLaunchStage() { + bitField0_ = (bitField0_ & ~0x00000002); + launchStage_ = 0; + onChanged(); + return this; + } + + private boolean restNumericEnums_; + /** + * + * + *
+     * When using transport=rest, the client request will encode enums as
+     * numbers rather than strings.
+     * 
+ * + * bool rest_numeric_enums = 3; + * + * @return The restNumericEnums. + */ + @java.lang.Override + public boolean getRestNumericEnums() { + return restNumericEnums_; + } + /** + * + * + *
+     * When using transport=rest, the client request will encode enums as
+     * numbers rather than strings.
+     * 
+ * + * bool rest_numeric_enums = 3; + * + * @param value The restNumericEnums to set. + * @return This builder for chaining. + */ + public Builder setRestNumericEnums(boolean value) { + + restNumericEnums_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * When using transport=rest, the client request will encode enums as
+     * numbers rather than strings.
+     * 
+ * + * bool rest_numeric_enums = 3; + * + * @return This builder for chaining. + */ + public Builder clearRestNumericEnums() { + bitField0_ = (bitField0_ & ~0x00000004); + restNumericEnums_ = false; + onChanged(); + return this; + } + + private com.google.api.JavaSettings javaSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.JavaSettings, + com.google.api.JavaSettings.Builder, + com.google.api.JavaSettingsOrBuilder> + javaSettingsBuilder_; + /** + * + * + *
+     * Settings for legacy Java features, supported in the Service YAML.
+     * 
+ * + * .google.api.JavaSettings java_settings = 21; + * + * @return Whether the javaSettings field is set. + */ + public boolean hasJavaSettings() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Settings for legacy Java features, supported in the Service YAML.
+     * 
+ * + * .google.api.JavaSettings java_settings = 21; + * + * @return The javaSettings. + */ + public com.google.api.JavaSettings getJavaSettings() { + if (javaSettingsBuilder_ == null) { + return javaSettings_ == null + ? com.google.api.JavaSettings.getDefaultInstance() + : javaSettings_; + } else { + return javaSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for legacy Java features, supported in the Service YAML.
+     * 
+ * + * .google.api.JavaSettings java_settings = 21; + */ + public Builder setJavaSettings(com.google.api.JavaSettings value) { + if (javaSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + javaSettings_ = value; + } else { + javaSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for legacy Java features, supported in the Service YAML.
+     * 
+ * + * .google.api.JavaSettings java_settings = 21; + */ + public Builder setJavaSettings(com.google.api.JavaSettings.Builder builderForValue) { + if (javaSettingsBuilder_ == null) { + javaSettings_ = builderForValue.build(); + } else { + javaSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for legacy Java features, supported in the Service YAML.
+     * 
+ * + * .google.api.JavaSettings java_settings = 21; + */ + public Builder mergeJavaSettings(com.google.api.JavaSettings value) { + if (javaSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && javaSettings_ != null + && javaSettings_ != com.google.api.JavaSettings.getDefaultInstance()) { + getJavaSettingsBuilder().mergeFrom(value); + } else { + javaSettings_ = value; + } + } else { + javaSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for legacy Java features, supported in the Service YAML.
+     * 
+ * + * .google.api.JavaSettings java_settings = 21; + */ + public Builder clearJavaSettings() { + bitField0_ = (bitField0_ & ~0x00000008); + javaSettings_ = null; + if (javaSettingsBuilder_ != null) { + javaSettingsBuilder_.dispose(); + javaSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for legacy Java features, supported in the Service YAML.
+     * 
+ * + * .google.api.JavaSettings java_settings = 21; + */ + public com.google.api.JavaSettings.Builder getJavaSettingsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getJavaSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for legacy Java features, supported in the Service YAML.
+     * 
+ * + * .google.api.JavaSettings java_settings = 21; + */ + public com.google.api.JavaSettingsOrBuilder getJavaSettingsOrBuilder() { + if (javaSettingsBuilder_ != null) { + return javaSettingsBuilder_.getMessageOrBuilder(); + } else { + return javaSettings_ == null + ? com.google.api.JavaSettings.getDefaultInstance() + : javaSettings_; + } + } + /** + * + * + *
+     * Settings for legacy Java features, supported in the Service YAML.
+     * 
+ * + * .google.api.JavaSettings java_settings = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.JavaSettings, + com.google.api.JavaSettings.Builder, + com.google.api.JavaSettingsOrBuilder> + getJavaSettingsFieldBuilder() { + if (javaSettingsBuilder_ == null) { + javaSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.JavaSettings, + com.google.api.JavaSettings.Builder, + com.google.api.JavaSettingsOrBuilder>( + getJavaSettings(), getParentForChildren(), isClean()); + javaSettings_ = null; + } + return javaSettingsBuilder_; + } + + private com.google.api.CppSettings cppSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CppSettings, + com.google.api.CppSettings.Builder, + com.google.api.CppSettingsOrBuilder> + cppSettingsBuilder_; + /** + * + * + *
+     * Settings for C++ client libraries.
+     * 
+ * + * .google.api.CppSettings cpp_settings = 22; + * + * @return Whether the cppSettings field is set. + */ + public boolean hasCppSettings() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Settings for C++ client libraries.
+     * 
+ * + * .google.api.CppSettings cpp_settings = 22; + * + * @return The cppSettings. + */ + public com.google.api.CppSettings getCppSettings() { + if (cppSettingsBuilder_ == null) { + return cppSettings_ == null + ? com.google.api.CppSettings.getDefaultInstance() + : cppSettings_; + } else { + return cppSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for C++ client libraries.
+     * 
+ * + * .google.api.CppSettings cpp_settings = 22; + */ + public Builder setCppSettings(com.google.api.CppSettings value) { + if (cppSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cppSettings_ = value; + } else { + cppSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for C++ client libraries.
+     * 
+ * + * .google.api.CppSettings cpp_settings = 22; + */ + public Builder setCppSettings(com.google.api.CppSettings.Builder builderForValue) { + if (cppSettingsBuilder_ == null) { + cppSettings_ = builderForValue.build(); + } else { + cppSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for C++ client libraries.
+     * 
+ * + * .google.api.CppSettings cpp_settings = 22; + */ + public Builder mergeCppSettings(com.google.api.CppSettings value) { + if (cppSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && cppSettings_ != null + && cppSettings_ != com.google.api.CppSettings.getDefaultInstance()) { + getCppSettingsBuilder().mergeFrom(value); + } else { + cppSettings_ = value; + } + } else { + cppSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for C++ client libraries.
+     * 
+ * + * .google.api.CppSettings cpp_settings = 22; + */ + public Builder clearCppSettings() { + bitField0_ = (bitField0_ & ~0x00000010); + cppSettings_ = null; + if (cppSettingsBuilder_ != null) { + cppSettingsBuilder_.dispose(); + cppSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for C++ client libraries.
+     * 
+ * + * .google.api.CppSettings cpp_settings = 22; + */ + public com.google.api.CppSettings.Builder getCppSettingsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCppSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for C++ client libraries.
+     * 
+ * + * .google.api.CppSettings cpp_settings = 22; + */ + public com.google.api.CppSettingsOrBuilder getCppSettingsOrBuilder() { + if (cppSettingsBuilder_ != null) { + return cppSettingsBuilder_.getMessageOrBuilder(); + } else { + return cppSettings_ == null + ? com.google.api.CppSettings.getDefaultInstance() + : cppSettings_; + } + } + /** + * + * + *
+     * Settings for C++ client libraries.
+     * 
+ * + * .google.api.CppSettings cpp_settings = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CppSettings, + com.google.api.CppSettings.Builder, + com.google.api.CppSettingsOrBuilder> + getCppSettingsFieldBuilder() { + if (cppSettingsBuilder_ == null) { + cppSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CppSettings, + com.google.api.CppSettings.Builder, + com.google.api.CppSettingsOrBuilder>( + getCppSettings(), getParentForChildren(), isClean()); + cppSettings_ = null; + } + return cppSettingsBuilder_; + } + + private com.google.api.PhpSettings phpSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.PhpSettings, + com.google.api.PhpSettings.Builder, + com.google.api.PhpSettingsOrBuilder> + phpSettingsBuilder_; + /** + * + * + *
+     * Settings for PHP client libraries.
+     * 
+ * + * .google.api.PhpSettings php_settings = 23; + * + * @return Whether the phpSettings field is set. + */ + public boolean hasPhpSettings() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Settings for PHP client libraries.
+     * 
+ * + * .google.api.PhpSettings php_settings = 23; + * + * @return The phpSettings. + */ + public com.google.api.PhpSettings getPhpSettings() { + if (phpSettingsBuilder_ == null) { + return phpSettings_ == null + ? com.google.api.PhpSettings.getDefaultInstance() + : phpSettings_; + } else { + return phpSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for PHP client libraries.
+     * 
+ * + * .google.api.PhpSettings php_settings = 23; + */ + public Builder setPhpSettings(com.google.api.PhpSettings value) { + if (phpSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + phpSettings_ = value; + } else { + phpSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for PHP client libraries.
+     * 
+ * + * .google.api.PhpSettings php_settings = 23; + */ + public Builder setPhpSettings(com.google.api.PhpSettings.Builder builderForValue) { + if (phpSettingsBuilder_ == null) { + phpSettings_ = builderForValue.build(); + } else { + phpSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for PHP client libraries.
+     * 
+ * + * .google.api.PhpSettings php_settings = 23; + */ + public Builder mergePhpSettings(com.google.api.PhpSettings value) { + if (phpSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && phpSettings_ != null + && phpSettings_ != com.google.api.PhpSettings.getDefaultInstance()) { + getPhpSettingsBuilder().mergeFrom(value); + } else { + phpSettings_ = value; + } + } else { + phpSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for PHP client libraries.
+     * 
+ * + * .google.api.PhpSettings php_settings = 23; + */ + public Builder clearPhpSettings() { + bitField0_ = (bitField0_ & ~0x00000020); + phpSettings_ = null; + if (phpSettingsBuilder_ != null) { + phpSettingsBuilder_.dispose(); + phpSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for PHP client libraries.
+     * 
+ * + * .google.api.PhpSettings php_settings = 23; + */ + public com.google.api.PhpSettings.Builder getPhpSettingsBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getPhpSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for PHP client libraries.
+     * 
+ * + * .google.api.PhpSettings php_settings = 23; + */ + public com.google.api.PhpSettingsOrBuilder getPhpSettingsOrBuilder() { + if (phpSettingsBuilder_ != null) { + return phpSettingsBuilder_.getMessageOrBuilder(); + } else { + return phpSettings_ == null + ? com.google.api.PhpSettings.getDefaultInstance() + : phpSettings_; + } + } + /** + * + * + *
+     * Settings for PHP client libraries.
+     * 
+ * + * .google.api.PhpSettings php_settings = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.PhpSettings, + com.google.api.PhpSettings.Builder, + com.google.api.PhpSettingsOrBuilder> + getPhpSettingsFieldBuilder() { + if (phpSettingsBuilder_ == null) { + phpSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.PhpSettings, + com.google.api.PhpSettings.Builder, + com.google.api.PhpSettingsOrBuilder>( + getPhpSettings(), getParentForChildren(), isClean()); + phpSettings_ = null; + } + return phpSettingsBuilder_; + } + + private com.google.api.PythonSettings pythonSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.PythonSettings, + com.google.api.PythonSettings.Builder, + com.google.api.PythonSettingsOrBuilder> + pythonSettingsBuilder_; + /** + * + * + *
+     * Settings for Python client libraries.
+     * 
+ * + * .google.api.PythonSettings python_settings = 24; + * + * @return Whether the pythonSettings field is set. + */ + public boolean hasPythonSettings() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Settings for Python client libraries.
+     * 
+ * + * .google.api.PythonSettings python_settings = 24; + * + * @return The pythonSettings. + */ + public com.google.api.PythonSettings getPythonSettings() { + if (pythonSettingsBuilder_ == null) { + return pythonSettings_ == null + ? com.google.api.PythonSettings.getDefaultInstance() + : pythonSettings_; + } else { + return pythonSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for Python client libraries.
+     * 
+ * + * .google.api.PythonSettings python_settings = 24; + */ + public Builder setPythonSettings(com.google.api.PythonSettings value) { + if (pythonSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pythonSettings_ = value; + } else { + pythonSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Python client libraries.
+     * 
+ * + * .google.api.PythonSettings python_settings = 24; + */ + public Builder setPythonSettings(com.google.api.PythonSettings.Builder builderForValue) { + if (pythonSettingsBuilder_ == null) { + pythonSettings_ = builderForValue.build(); + } else { + pythonSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Python client libraries.
+     * 
+ * + * .google.api.PythonSettings python_settings = 24; + */ + public Builder mergePythonSettings(com.google.api.PythonSettings value) { + if (pythonSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && pythonSettings_ != null + && pythonSettings_ != com.google.api.PythonSettings.getDefaultInstance()) { + getPythonSettingsBuilder().mergeFrom(value); + } else { + pythonSettings_ = value; + } + } else { + pythonSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Python client libraries.
+     * 
+ * + * .google.api.PythonSettings python_settings = 24; + */ + public Builder clearPythonSettings() { + bitField0_ = (bitField0_ & ~0x00000040); + pythonSettings_ = null; + if (pythonSettingsBuilder_ != null) { + pythonSettingsBuilder_.dispose(); + pythonSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Python client libraries.
+     * 
+ * + * .google.api.PythonSettings python_settings = 24; + */ + public com.google.api.PythonSettings.Builder getPythonSettingsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getPythonSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for Python client libraries.
+     * 
+ * + * .google.api.PythonSettings python_settings = 24; + */ + public com.google.api.PythonSettingsOrBuilder getPythonSettingsOrBuilder() { + if (pythonSettingsBuilder_ != null) { + return pythonSettingsBuilder_.getMessageOrBuilder(); + } else { + return pythonSettings_ == null + ? com.google.api.PythonSettings.getDefaultInstance() + : pythonSettings_; + } + } + /** + * + * + *
+     * Settings for Python client libraries.
+     * 
+ * + * .google.api.PythonSettings python_settings = 24; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.PythonSettings, + com.google.api.PythonSettings.Builder, + com.google.api.PythonSettingsOrBuilder> + getPythonSettingsFieldBuilder() { + if (pythonSettingsBuilder_ == null) { + pythonSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.PythonSettings, + com.google.api.PythonSettings.Builder, + com.google.api.PythonSettingsOrBuilder>( + getPythonSettings(), getParentForChildren(), isClean()); + pythonSettings_ = null; + } + return pythonSettingsBuilder_; + } + + private com.google.api.NodeSettings nodeSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.NodeSettings, + com.google.api.NodeSettings.Builder, + com.google.api.NodeSettingsOrBuilder> + nodeSettingsBuilder_; + /** + * + * + *
+     * Settings for Node client libraries.
+     * 
+ * + * .google.api.NodeSettings node_settings = 25; + * + * @return Whether the nodeSettings field is set. + */ + public boolean hasNodeSettings() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Settings for Node client libraries.
+     * 
+ * + * .google.api.NodeSettings node_settings = 25; + * + * @return The nodeSettings. + */ + public com.google.api.NodeSettings getNodeSettings() { + if (nodeSettingsBuilder_ == null) { + return nodeSettings_ == null + ? com.google.api.NodeSettings.getDefaultInstance() + : nodeSettings_; + } else { + return nodeSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for Node client libraries.
+     * 
+ * + * .google.api.NodeSettings node_settings = 25; + */ + public Builder setNodeSettings(com.google.api.NodeSettings value) { + if (nodeSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeSettings_ = value; + } else { + nodeSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Node client libraries.
+     * 
+ * + * .google.api.NodeSettings node_settings = 25; + */ + public Builder setNodeSettings(com.google.api.NodeSettings.Builder builderForValue) { + if (nodeSettingsBuilder_ == null) { + nodeSettings_ = builderForValue.build(); + } else { + nodeSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Node client libraries.
+     * 
+ * + * .google.api.NodeSettings node_settings = 25; + */ + public Builder mergeNodeSettings(com.google.api.NodeSettings value) { + if (nodeSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && nodeSettings_ != null + && nodeSettings_ != com.google.api.NodeSettings.getDefaultInstance()) { + getNodeSettingsBuilder().mergeFrom(value); + } else { + nodeSettings_ = value; + } + } else { + nodeSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Node client libraries.
+     * 
+ * + * .google.api.NodeSettings node_settings = 25; + */ + public Builder clearNodeSettings() { + bitField0_ = (bitField0_ & ~0x00000080); + nodeSettings_ = null; + if (nodeSettingsBuilder_ != null) { + nodeSettingsBuilder_.dispose(); + nodeSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Node client libraries.
+     * 
+ * + * .google.api.NodeSettings node_settings = 25; + */ + public com.google.api.NodeSettings.Builder getNodeSettingsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getNodeSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for Node client libraries.
+     * 
+ * + * .google.api.NodeSettings node_settings = 25; + */ + public com.google.api.NodeSettingsOrBuilder getNodeSettingsOrBuilder() { + if (nodeSettingsBuilder_ != null) { + return nodeSettingsBuilder_.getMessageOrBuilder(); + } else { + return nodeSettings_ == null + ? com.google.api.NodeSettings.getDefaultInstance() + : nodeSettings_; + } + } + /** + * + * + *
+     * Settings for Node client libraries.
+     * 
+ * + * .google.api.NodeSettings node_settings = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.NodeSettings, + com.google.api.NodeSettings.Builder, + com.google.api.NodeSettingsOrBuilder> + getNodeSettingsFieldBuilder() { + if (nodeSettingsBuilder_ == null) { + nodeSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.NodeSettings, + com.google.api.NodeSettings.Builder, + com.google.api.NodeSettingsOrBuilder>( + getNodeSettings(), getParentForChildren(), isClean()); + nodeSettings_ = null; + } + return nodeSettingsBuilder_; + } + + private com.google.api.DotnetSettings dotnetSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.DotnetSettings, + com.google.api.DotnetSettings.Builder, + com.google.api.DotnetSettingsOrBuilder> + dotnetSettingsBuilder_; + /** + * + * + *
+     * Settings for .NET client libraries.
+     * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + * + * @return Whether the dotnetSettings field is set. + */ + public boolean hasDotnetSettings() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Settings for .NET client libraries.
+     * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + * + * @return The dotnetSettings. + */ + public com.google.api.DotnetSettings getDotnetSettings() { + if (dotnetSettingsBuilder_ == null) { + return dotnetSettings_ == null + ? com.google.api.DotnetSettings.getDefaultInstance() + : dotnetSettings_; + } else { + return dotnetSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for .NET client libraries.
+     * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + */ + public Builder setDotnetSettings(com.google.api.DotnetSettings value) { + if (dotnetSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dotnetSettings_ = value; + } else { + dotnetSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for .NET client libraries.
+     * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + */ + public Builder setDotnetSettings(com.google.api.DotnetSettings.Builder builderForValue) { + if (dotnetSettingsBuilder_ == null) { + dotnetSettings_ = builderForValue.build(); + } else { + dotnetSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for .NET client libraries.
+     * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + */ + public Builder mergeDotnetSettings(com.google.api.DotnetSettings value) { + if (dotnetSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && dotnetSettings_ != null + && dotnetSettings_ != com.google.api.DotnetSettings.getDefaultInstance()) { + getDotnetSettingsBuilder().mergeFrom(value); + } else { + dotnetSettings_ = value; + } + } else { + dotnetSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for .NET client libraries.
+     * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + */ + public Builder clearDotnetSettings() { + bitField0_ = (bitField0_ & ~0x00000100); + dotnetSettings_ = null; + if (dotnetSettingsBuilder_ != null) { + dotnetSettingsBuilder_.dispose(); + dotnetSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for .NET client libraries.
+     * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + */ + public com.google.api.DotnetSettings.Builder getDotnetSettingsBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getDotnetSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for .NET client libraries.
+     * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + */ + public com.google.api.DotnetSettingsOrBuilder getDotnetSettingsOrBuilder() { + if (dotnetSettingsBuilder_ != null) { + return dotnetSettingsBuilder_.getMessageOrBuilder(); + } else { + return dotnetSettings_ == null + ? com.google.api.DotnetSettings.getDefaultInstance() + : dotnetSettings_; + } + } + /** + * + * + *
+     * Settings for .NET client libraries.
+     * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.DotnetSettings, + com.google.api.DotnetSettings.Builder, + com.google.api.DotnetSettingsOrBuilder> + getDotnetSettingsFieldBuilder() { + if (dotnetSettingsBuilder_ == null) { + dotnetSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.DotnetSettings, + com.google.api.DotnetSettings.Builder, + com.google.api.DotnetSettingsOrBuilder>( + getDotnetSettings(), getParentForChildren(), isClean()); + dotnetSettings_ = null; + } + return dotnetSettingsBuilder_; + } + + private com.google.api.RubySettings rubySettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.RubySettings, + com.google.api.RubySettings.Builder, + com.google.api.RubySettingsOrBuilder> + rubySettingsBuilder_; + /** + * + * + *
+     * Settings for Ruby client libraries.
+     * 
+ * + * .google.api.RubySettings ruby_settings = 27; + * + * @return Whether the rubySettings field is set. + */ + public boolean hasRubySettings() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Settings for Ruby client libraries.
+     * 
+ * + * .google.api.RubySettings ruby_settings = 27; + * + * @return The rubySettings. + */ + public com.google.api.RubySettings getRubySettings() { + if (rubySettingsBuilder_ == null) { + return rubySettings_ == null + ? com.google.api.RubySettings.getDefaultInstance() + : rubySettings_; + } else { + return rubySettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for Ruby client libraries.
+     * 
+ * + * .google.api.RubySettings ruby_settings = 27; + */ + public Builder setRubySettings(com.google.api.RubySettings value) { + if (rubySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rubySettings_ = value; + } else { + rubySettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Ruby client libraries.
+     * 
+ * + * .google.api.RubySettings ruby_settings = 27; + */ + public Builder setRubySettings(com.google.api.RubySettings.Builder builderForValue) { + if (rubySettingsBuilder_ == null) { + rubySettings_ = builderForValue.build(); + } else { + rubySettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Ruby client libraries.
+     * 
+ * + * .google.api.RubySettings ruby_settings = 27; + */ + public Builder mergeRubySettings(com.google.api.RubySettings value) { + if (rubySettingsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && rubySettings_ != null + && rubySettings_ != com.google.api.RubySettings.getDefaultInstance()) { + getRubySettingsBuilder().mergeFrom(value); + } else { + rubySettings_ = value; + } + } else { + rubySettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Ruby client libraries.
+     * 
+ * + * .google.api.RubySettings ruby_settings = 27; + */ + public Builder clearRubySettings() { + bitField0_ = (bitField0_ & ~0x00000200); + rubySettings_ = null; + if (rubySettingsBuilder_ != null) { + rubySettingsBuilder_.dispose(); + rubySettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Ruby client libraries.
+     * 
+ * + * .google.api.RubySettings ruby_settings = 27; + */ + public com.google.api.RubySettings.Builder getRubySettingsBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getRubySettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for Ruby client libraries.
+     * 
+ * + * .google.api.RubySettings ruby_settings = 27; + */ + public com.google.api.RubySettingsOrBuilder getRubySettingsOrBuilder() { + if (rubySettingsBuilder_ != null) { + return rubySettingsBuilder_.getMessageOrBuilder(); + } else { + return rubySettings_ == null + ? com.google.api.RubySettings.getDefaultInstance() + : rubySettings_; + } + } + /** + * + * + *
+     * Settings for Ruby client libraries.
+     * 
+ * + * .google.api.RubySettings ruby_settings = 27; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.RubySettings, + com.google.api.RubySettings.Builder, + com.google.api.RubySettingsOrBuilder> + getRubySettingsFieldBuilder() { + if (rubySettingsBuilder_ == null) { + rubySettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.RubySettings, + com.google.api.RubySettings.Builder, + com.google.api.RubySettingsOrBuilder>( + getRubySettings(), getParentForChildren(), isClean()); + rubySettings_ = null; + } + return rubySettingsBuilder_; + } + + private com.google.api.GoSettings goSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.GoSettings, + com.google.api.GoSettings.Builder, + com.google.api.GoSettingsOrBuilder> + goSettingsBuilder_; + /** + * + * + *
+     * Settings for Go client libraries.
+     * 
+ * + * .google.api.GoSettings go_settings = 28; + * + * @return Whether the goSettings field is set. + */ + public boolean hasGoSettings() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Settings for Go client libraries.
+     * 
+ * + * .google.api.GoSettings go_settings = 28; + * + * @return The goSettings. + */ + public com.google.api.GoSettings getGoSettings() { + if (goSettingsBuilder_ == null) { + return goSettings_ == null ? com.google.api.GoSettings.getDefaultInstance() : goSettings_; + } else { + return goSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Settings for Go client libraries.
+     * 
+ * + * .google.api.GoSettings go_settings = 28; + */ + public Builder setGoSettings(com.google.api.GoSettings value) { + if (goSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + goSettings_ = value; + } else { + goSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Go client libraries.
+     * 
+ * + * .google.api.GoSettings go_settings = 28; + */ + public Builder setGoSettings(com.google.api.GoSettings.Builder builderForValue) { + if (goSettingsBuilder_ == null) { + goSettings_ = builderForValue.build(); + } else { + goSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Go client libraries.
+     * 
+ * + * .google.api.GoSettings go_settings = 28; + */ + public Builder mergeGoSettings(com.google.api.GoSettings value) { + if (goSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && goSettings_ != null + && goSettings_ != com.google.api.GoSettings.getDefaultInstance()) { + getGoSettingsBuilder().mergeFrom(value); + } else { + goSettings_ = value; + } + } else { + goSettingsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Go client libraries.
+     * 
+ * + * .google.api.GoSettings go_settings = 28; + */ + public Builder clearGoSettings() { + bitField0_ = (bitField0_ & ~0x00000400); + goSettings_ = null; + if (goSettingsBuilder_ != null) { + goSettingsBuilder_.dispose(); + goSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Settings for Go client libraries.
+     * 
+ * + * .google.api.GoSettings go_settings = 28; + */ + public com.google.api.GoSettings.Builder getGoSettingsBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getGoSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Settings for Go client libraries.
+     * 
+ * + * .google.api.GoSettings go_settings = 28; + */ + public com.google.api.GoSettingsOrBuilder getGoSettingsOrBuilder() { + if (goSettingsBuilder_ != null) { + return goSettingsBuilder_.getMessageOrBuilder(); + } else { + return goSettings_ == null ? com.google.api.GoSettings.getDefaultInstance() : goSettings_; + } + } + /** + * + * + *
+     * Settings for Go client libraries.
+     * 
+ * + * .google.api.GoSettings go_settings = 28; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.GoSettings, + com.google.api.GoSettings.Builder, + com.google.api.GoSettingsOrBuilder> + getGoSettingsFieldBuilder() { + if (goSettingsBuilder_ == null) { + goSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.GoSettings, + com.google.api.GoSettings.Builder, + com.google.api.GoSettingsOrBuilder>( + getGoSettings(), getParentForChildren(), isClean()); + goSettings_ = null; + } + return goSettingsBuilder_; + } + + @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.api.ClientLibrarySettings) + } + + // @@protoc_insertion_point(class_scope:google.api.ClientLibrarySettings) + private static final com.google.api.ClientLibrarySettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.ClientLibrarySettings(); + } + + public static com.google.api.ClientLibrarySettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClientLibrarySettings 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.api.ClientLibrarySettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibrarySettingsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibrarySettingsOrBuilder.java new file mode 100644 index 000000000000..c50d14ab9d45 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientLibrarySettingsOrBuilder.java @@ -0,0 +1,373 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface ClientLibrarySettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.ClientLibrarySettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Version of the API to apply these settings to. This is the full protobuf
+   * package for the API, ending in the version element.
+   * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+   * 
+ * + * string version = 1; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Version of the API to apply these settings to. This is the full protobuf
+   * package for the API, ending in the version element.
+   * Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
+   * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Launch stage of this version of the API.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 2; + * + * @return The enum numeric value on the wire for launchStage. + */ + int getLaunchStageValue(); + /** + * + * + *
+   * Launch stage of this version of the API.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 2; + * + * @return The launchStage. + */ + com.google.api.LaunchStage getLaunchStage(); + + /** + * + * + *
+   * When using transport=rest, the client request will encode enums as
+   * numbers rather than strings.
+   * 
+ * + * bool rest_numeric_enums = 3; + * + * @return The restNumericEnums. + */ + boolean getRestNumericEnums(); + + /** + * + * + *
+   * Settings for legacy Java features, supported in the Service YAML.
+   * 
+ * + * .google.api.JavaSettings java_settings = 21; + * + * @return Whether the javaSettings field is set. + */ + boolean hasJavaSettings(); + /** + * + * + *
+   * Settings for legacy Java features, supported in the Service YAML.
+   * 
+ * + * .google.api.JavaSettings java_settings = 21; + * + * @return The javaSettings. + */ + com.google.api.JavaSettings getJavaSettings(); + /** + * + * + *
+   * Settings for legacy Java features, supported in the Service YAML.
+   * 
+ * + * .google.api.JavaSettings java_settings = 21; + */ + com.google.api.JavaSettingsOrBuilder getJavaSettingsOrBuilder(); + + /** + * + * + *
+   * Settings for C++ client libraries.
+   * 
+ * + * .google.api.CppSettings cpp_settings = 22; + * + * @return Whether the cppSettings field is set. + */ + boolean hasCppSettings(); + /** + * + * + *
+   * Settings for C++ client libraries.
+   * 
+ * + * .google.api.CppSettings cpp_settings = 22; + * + * @return The cppSettings. + */ + com.google.api.CppSettings getCppSettings(); + /** + * + * + *
+   * Settings for C++ client libraries.
+   * 
+ * + * .google.api.CppSettings cpp_settings = 22; + */ + com.google.api.CppSettingsOrBuilder getCppSettingsOrBuilder(); + + /** + * + * + *
+   * Settings for PHP client libraries.
+   * 
+ * + * .google.api.PhpSettings php_settings = 23; + * + * @return Whether the phpSettings field is set. + */ + boolean hasPhpSettings(); + /** + * + * + *
+   * Settings for PHP client libraries.
+   * 
+ * + * .google.api.PhpSettings php_settings = 23; + * + * @return The phpSettings. + */ + com.google.api.PhpSettings getPhpSettings(); + /** + * + * + *
+   * Settings for PHP client libraries.
+   * 
+ * + * .google.api.PhpSettings php_settings = 23; + */ + com.google.api.PhpSettingsOrBuilder getPhpSettingsOrBuilder(); + + /** + * + * + *
+   * Settings for Python client libraries.
+   * 
+ * + * .google.api.PythonSettings python_settings = 24; + * + * @return Whether the pythonSettings field is set. + */ + boolean hasPythonSettings(); + /** + * + * + *
+   * Settings for Python client libraries.
+   * 
+ * + * .google.api.PythonSettings python_settings = 24; + * + * @return The pythonSettings. + */ + com.google.api.PythonSettings getPythonSettings(); + /** + * + * + *
+   * Settings for Python client libraries.
+   * 
+ * + * .google.api.PythonSettings python_settings = 24; + */ + com.google.api.PythonSettingsOrBuilder getPythonSettingsOrBuilder(); + + /** + * + * + *
+   * Settings for Node client libraries.
+   * 
+ * + * .google.api.NodeSettings node_settings = 25; + * + * @return Whether the nodeSettings field is set. + */ + boolean hasNodeSettings(); + /** + * + * + *
+   * Settings for Node client libraries.
+   * 
+ * + * .google.api.NodeSettings node_settings = 25; + * + * @return The nodeSettings. + */ + com.google.api.NodeSettings getNodeSettings(); + /** + * + * + *
+   * Settings for Node client libraries.
+   * 
+ * + * .google.api.NodeSettings node_settings = 25; + */ + com.google.api.NodeSettingsOrBuilder getNodeSettingsOrBuilder(); + + /** + * + * + *
+   * Settings for .NET client libraries.
+   * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + * + * @return Whether the dotnetSettings field is set. + */ + boolean hasDotnetSettings(); + /** + * + * + *
+   * Settings for .NET client libraries.
+   * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + * + * @return The dotnetSettings. + */ + com.google.api.DotnetSettings getDotnetSettings(); + /** + * + * + *
+   * Settings for .NET client libraries.
+   * 
+ * + * .google.api.DotnetSettings dotnet_settings = 26; + */ + com.google.api.DotnetSettingsOrBuilder getDotnetSettingsOrBuilder(); + + /** + * + * + *
+   * Settings for Ruby client libraries.
+   * 
+ * + * .google.api.RubySettings ruby_settings = 27; + * + * @return Whether the rubySettings field is set. + */ + boolean hasRubySettings(); + /** + * + * + *
+   * Settings for Ruby client libraries.
+   * 
+ * + * .google.api.RubySettings ruby_settings = 27; + * + * @return The rubySettings. + */ + com.google.api.RubySettings getRubySettings(); + /** + * + * + *
+   * Settings for Ruby client libraries.
+   * 
+ * + * .google.api.RubySettings ruby_settings = 27; + */ + com.google.api.RubySettingsOrBuilder getRubySettingsOrBuilder(); + + /** + * + * + *
+   * Settings for Go client libraries.
+   * 
+ * + * .google.api.GoSettings go_settings = 28; + * + * @return Whether the goSettings field is set. + */ + boolean hasGoSettings(); + /** + * + * + *
+   * Settings for Go client libraries.
+   * 
+ * + * .google.api.GoSettings go_settings = 28; + * + * @return The goSettings. + */ + com.google.api.GoSettings getGoSettings(); + /** + * + * + *
+   * Settings for Go client libraries.
+   * 
+ * + * .google.api.GoSettings go_settings = 28; + */ + com.google.api.GoSettingsOrBuilder getGoSettingsOrBuilder(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientProto.java new file mode 100644 index 000000000000..550cdec88dfb --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ClientProto.java @@ -0,0 +1,454 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public final class ClientProto { + private ClientProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.ClientProto.oauthScopes); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static final int METHOD_SIGNATURE_FIELD_NUMBER = 1051; + /** + * + * + *
+   * A definition of a client library method signature.
+   *
+   * In client libraries, each proto RPC corresponds to one or more methods
+   * which the end user is able to call, and calls the underlying RPC.
+   * Normally, this method receives a single argument (a struct or instance
+   * corresponding to the RPC request object). Defining this field will
+   * add one or more overloads providing flattened or simpler method signatures
+   * in some languages.
+   *
+   * The fields on the method signature are provided as a comma-separated
+   * string.
+   *
+   * For example, the proto RPC and annotation:
+   *
+   *   rpc CreateSubscription(CreateSubscriptionRequest)
+   *       returns (Subscription) {
+   *     option (google.api.method_signature) = "name,topic";
+   *   }
+   *
+   * Would add the following Java overload (in addition to the method accepting
+   * the request object):
+   *
+   *   public final Subscription createSubscription(String name, String topic)
+   *
+   * The following backwards-compatibility guidelines apply:
+   *
+   *   * Adding this annotation to an unannotated method is backwards
+   *     compatible.
+   *   * Adding this annotation to a method which already has existing
+   *     method signature annotations is backwards compatible if and only if
+   *     the new method signature annotation is last in the sequence.
+   *   * Modifying or removing an existing method signature annotation is
+   *     a breaking change.
+   *   * Re-ordering existing method signature annotations is a breaking
+   *     change.
+   * 
+ * + * extend .google.protobuf.MethodOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, java.util.List> + methodSignature = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + java.lang.String.class, null); + + public static final int DEFAULT_HOST_FIELD_NUMBER = 1049; + /** + * + * + *
+   * The hostname for this service.
+   * This should be specified with no prefix or protocol.
+   *
+   * Example:
+   *
+   *   service Foo {
+   *     option (google.api.default_host) = "foo.googleapi.com";
+   *     ...
+   *   }
+   * 
+ * + * extend .google.protobuf.ServiceOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.ServiceOptions, java.lang.String> + defaultHost = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + java.lang.String.class, null); + + public static final int OAUTH_SCOPES_FIELD_NUMBER = 1050; + /** + * + * + *
+   * OAuth scopes needed for the client.
+   *
+   * Example:
+   *
+   *   service Foo {
+   *     option (google.api.oauth_scopes) = \
+   *       "https://www.googleapis.com/auth/cloud-platform";
+   *     ...
+   *   }
+   *
+   * If there is more than one scope, use a comma-separated string:
+   *
+   * Example:
+   *
+   *   service Foo {
+   *     option (google.api.oauth_scopes) = \
+   *       "https://www.googleapis.com/auth/cloud-platform,"
+   *       "https://www.googleapis.com/auth/monitoring";
+   *     ...
+   *   }
+   * 
+ * + * extend .google.protobuf.ServiceOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.ServiceOptions, java.lang.String> + oauthScopes = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + java.lang.String.class, null); + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_CommonLanguageSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_CommonLanguageSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_ClientLibrarySettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_ClientLibrarySettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Publishing_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Publishing_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_JavaSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_JavaSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_JavaSettings_ServiceClassNamesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_JavaSettings_ServiceClassNamesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_CppSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_CppSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_PhpSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_PhpSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_PythonSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_PythonSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_NodeSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_NodeSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_DotnetSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_DotnetSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_DotnetSettings_RenamedServicesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_DotnetSettings_RenamedServicesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_DotnetSettings_RenamedResourcesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_DotnetSettings_RenamedResourcesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_RubySettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_RubySettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_GoSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_GoSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MethodSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MethodSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MethodSettings_LongRunning_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MethodSettings_LongRunning_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\027google/api/client.proto\022\ngoogle.api\032\035g" + + "oogle/api/launch_stage.proto\032 google/pro" + + "tobuf/descriptor.proto\032\036google/protobuf/" + + "duration.proto\"t\n\026CommonLanguageSettings" + + "\022\036\n\022reference_docs_uri\030\001 \001(\tB\002\030\001\022:\n\014dest" + + "inations\030\002 \003(\0162$.google.api.ClientLibrar" + + "yDestination\"\373\003\n\025ClientLibrarySettings\022\017" + + "\n\007version\030\001 \001(\t\022-\n\014launch_stage\030\002 \001(\0162\027." + + "google.api.LaunchStage\022\032\n\022rest_numeric_e" + + "nums\030\003 \001(\010\022/\n\rjava_settings\030\025 \001(\0132\030.goog" + + "le.api.JavaSettings\022-\n\014cpp_settings\030\026 \001(" + + "\0132\027.google.api.CppSettings\022-\n\014php_settin" + + "gs\030\027 \001(\0132\027.google.api.PhpSettings\0223\n\017pyt" + + "hon_settings\030\030 \001(\0132\032.google.api.PythonSe" + + "ttings\022/\n\rnode_settings\030\031 \001(\0132\030.google.a" + + "pi.NodeSettings\0223\n\017dotnet_settings\030\032 \001(\013" + + "2\032.google.api.DotnetSettings\022/\n\rruby_set" + + "tings\030\033 \001(\0132\030.google.api.RubySettings\022+\n" + + "\013go_settings\030\034 \001(\0132\026.google.api.GoSettin" + + "gs\"\376\002\n\nPublishing\0223\n\017method_settings\030\002 \003" + + "(\0132\032.google.api.MethodSettings\022\025\n\rnew_is" + + "sue_uri\030e \001(\t\022\031\n\021documentation_uri\030f \001(\t" + + "\022\026\n\016api_short_name\030g \001(\t\022\024\n\014github_label" + + "\030h \001(\t\022\036\n\026codeowner_github_teams\030i \003(\t\022\026" + + "\n\016doc_tag_prefix\030j \001(\t\022;\n\014organization\030k" + + " \001(\0162%.google.api.ClientLibraryOrganizat" + + "ion\022;\n\020library_settings\030m \003(\0132!.google.a" + + "pi.ClientLibrarySettings\022)\n!proto_refere" + + "nce_documentation_uri\030n \001(\t\"\343\001\n\014JavaSett" + + "ings\022\027\n\017library_package\030\001 \001(\t\022L\n\023service" + + "_class_names\030\002 \003(\0132/.google.api.JavaSett" + + "ings.ServiceClassNamesEntry\0222\n\006common\030\003 " + + "\001(\0132\".google.api.CommonLanguageSettings\032" + + "8\n\026ServiceClassNamesEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001\"A\n\013CppSettings\0222\n\006comm" + + "on\030\001 \001(\0132\".google.api.CommonLanguageSett" + + "ings\"A\n\013PhpSettings\0222\n\006common\030\001 \001(\0132\".go" + + "ogle.api.CommonLanguageSettings\"D\n\016Pytho" + + "nSettings\0222\n\006common\030\001 \001(\0132\".google.api.C" + + "ommonLanguageSettings\"B\n\014NodeSettings\0222\n" + + "\006common\030\001 \001(\0132\".google.api.CommonLanguag" + + "eSettings\"\252\003\n\016DotnetSettings\0222\n\006common\030\001" + + " \001(\0132\".google.api.CommonLanguageSettings" + + "\022I\n\020renamed_services\030\002 \003(\0132/.google.api." + + "DotnetSettings.RenamedServicesEntry\022K\n\021r" + + "enamed_resources\030\003 \003(\01320.google.api.Dotn" + + "etSettings.RenamedResourcesEntry\022\031\n\021igno" + + "red_resources\030\004 \003(\t\022 \n\030forced_namespace_" + + "aliases\030\005 \003(\t\022\036\n\026handwritten_signatures\030" + + "\006 \003(\t\0326\n\024RenamedServicesEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0327\n\025RenamedResource" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"B" + + "\n\014RubySettings\0222\n\006common\030\001 \001(\0132\".google." + + "api.CommonLanguageSettings\"@\n\nGoSettings" + + "\0222\n\006common\030\001 \001(\0132\".google.api.CommonLang" + + "uageSettings\"\260\002\n\016MethodSettings\022\020\n\010selec" + + "tor\030\001 \001(\t\022<\n\014long_running\030\002 \001(\0132&.google" + + ".api.MethodSettings.LongRunning\032\315\001\n\013Long" + + "Running\0225\n\022initial_poll_delay\030\001 \001(\0132\031.go" + + "ogle.protobuf.Duration\022\035\n\025poll_delay_mul" + + "tiplier\030\002 \001(\002\0221\n\016max_poll_delay\030\003 \001(\0132\031." + + "google.protobuf.Duration\0225\n\022total_poll_t" + + "imeout\030\004 \001(\0132\031.google.protobuf.Duration*" + + "\243\001\n\031ClientLibraryOrganization\022+\n\'CLIENT_" + + "LIBRARY_ORGANIZATION_UNSPECIFIED\020\000\022\t\n\005CL" + + "OUD\020\001\022\007\n\003ADS\020\002\022\n\n\006PHOTOS\020\003\022\017\n\013STREET_VIE" + + "W\020\004\022\014\n\010SHOPPING\020\005\022\007\n\003GEO\020\006\022\021\n\rGENERATIVE" + + "_AI\020\007*g\n\030ClientLibraryDestination\022*\n&CLI" + + "ENT_LIBRARY_DESTINATION_UNSPECIFIED\020\000\022\n\n" + + "\006GITHUB\020\n\022\023\n\017PACKAGE_MANAGER\020\024:9\n\020method" + + "_signature\022\036.google.protobuf.MethodOptio" + + "ns\030\233\010 \003(\t:6\n\014default_host\022\037.google.proto" + + "buf.ServiceOptions\030\231\010 \001(\t:6\n\014oauth_scope" + + "s\022\037.google.protobuf.ServiceOptions\030\232\010 \001(" + + "\tBi\n\016com.google.apiB\013ClientProtoP\001ZAgoog" + + "le.golang.org/genproto/googleapis/api/an" + + "notations;annotations\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.LaunchStageProto.getDescriptor(), + com.google.protobuf.DescriptorProtos.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + }); + internal_static_google_api_CommonLanguageSettings_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_CommonLanguageSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_CommonLanguageSettings_descriptor, + new java.lang.String[] { + "ReferenceDocsUri", "Destinations", + }); + internal_static_google_api_ClientLibrarySettings_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_ClientLibrarySettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_ClientLibrarySettings_descriptor, + new java.lang.String[] { + "Version", + "LaunchStage", + "RestNumericEnums", + "JavaSettings", + "CppSettings", + "PhpSettings", + "PythonSettings", + "NodeSettings", + "DotnetSettings", + "RubySettings", + "GoSettings", + }); + internal_static_google_api_Publishing_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_google_api_Publishing_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Publishing_descriptor, + new java.lang.String[] { + "MethodSettings", + "NewIssueUri", + "DocumentationUri", + "ApiShortName", + "GithubLabel", + "CodeownerGithubTeams", + "DocTagPrefix", + "Organization", + "LibrarySettings", + "ProtoReferenceDocumentationUri", + }); + internal_static_google_api_JavaSettings_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_google_api_JavaSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_JavaSettings_descriptor, + new java.lang.String[] { + "LibraryPackage", "ServiceClassNames", "Common", + }); + internal_static_google_api_JavaSettings_ServiceClassNamesEntry_descriptor = + internal_static_google_api_JavaSettings_descriptor.getNestedTypes().get(0); + internal_static_google_api_JavaSettings_ServiceClassNamesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_JavaSettings_ServiceClassNamesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_api_CppSettings_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_google_api_CppSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_CppSettings_descriptor, + new java.lang.String[] { + "Common", + }); + internal_static_google_api_PhpSettings_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_google_api_PhpSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_PhpSettings_descriptor, + new java.lang.String[] { + "Common", + }); + internal_static_google_api_PythonSettings_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_google_api_PythonSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_PythonSettings_descriptor, + new java.lang.String[] { + "Common", + }); + internal_static_google_api_NodeSettings_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_google_api_NodeSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_NodeSettings_descriptor, + new java.lang.String[] { + "Common", + }); + internal_static_google_api_DotnetSettings_descriptor = getDescriptor().getMessageTypes().get(8); + internal_static_google_api_DotnetSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_DotnetSettings_descriptor, + new java.lang.String[] { + "Common", + "RenamedServices", + "RenamedResources", + "IgnoredResources", + "ForcedNamespaceAliases", + "HandwrittenSignatures", + }); + internal_static_google_api_DotnetSettings_RenamedServicesEntry_descriptor = + internal_static_google_api_DotnetSettings_descriptor.getNestedTypes().get(0); + internal_static_google_api_DotnetSettings_RenamedServicesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_DotnetSettings_RenamedServicesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_api_DotnetSettings_RenamedResourcesEntry_descriptor = + internal_static_google_api_DotnetSettings_descriptor.getNestedTypes().get(1); + internal_static_google_api_DotnetSettings_RenamedResourcesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_DotnetSettings_RenamedResourcesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_api_RubySettings_descriptor = getDescriptor().getMessageTypes().get(9); + internal_static_google_api_RubySettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_RubySettings_descriptor, + new java.lang.String[] { + "Common", + }); + internal_static_google_api_GoSettings_descriptor = getDescriptor().getMessageTypes().get(10); + internal_static_google_api_GoSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_GoSettings_descriptor, + new java.lang.String[] { + "Common", + }); + internal_static_google_api_MethodSettings_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_api_MethodSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MethodSettings_descriptor, + new java.lang.String[] { + "Selector", "LongRunning", + }); + internal_static_google_api_MethodSettings_LongRunning_descriptor = + internal_static_google_api_MethodSettings_descriptor.getNestedTypes().get(0); + internal_static_google_api_MethodSettings_LongRunning_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MethodSettings_LongRunning_descriptor, + new java.lang.String[] { + "InitialPollDelay", "PollDelayMultiplier", "MaxPollDelay", "TotalPollTimeout", + }); + methodSignature.internalInit(descriptor.getExtensions().get(0)); + defaultHost.internalInit(descriptor.getExtensions().get(1)); + oauthScopes.internalInit(descriptor.getExtensions().get(2)); + com.google.api.LaunchStageProto.getDescriptor(); + com.google.protobuf.DescriptorProtos.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CommonLanguageSettings.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CommonLanguageSettings.java new file mode 100644 index 000000000000..15eccb13d1bc --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CommonLanguageSettings.java @@ -0,0 +1,1034 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * Required information for every language.
+ * 
+ * + * Protobuf type {@code google.api.CommonLanguageSettings} + */ +public final class CommonLanguageSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.CommonLanguageSettings) + CommonLanguageSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CommonLanguageSettings.newBuilder() to construct. + private CommonLanguageSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CommonLanguageSettings() { + referenceDocsUri_ = ""; + destinations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CommonLanguageSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_CommonLanguageSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto + .internal_static_google_api_CommonLanguageSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CommonLanguageSettings.class, + com.google.api.CommonLanguageSettings.Builder.class); + } + + public static final int REFERENCE_DOCS_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object referenceDocsUri_ = ""; + /** + * + * + *
+   * Link to automatically generated reference documentation.  Example:
+   * https://cloud.google.com/nodejs/docs/reference/asset/latest
+   * 
+ * + * string reference_docs_uri = 1 [deprecated = true]; + * + * @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See + * google/api/client.proto;l=106 + * @return The referenceDocsUri. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getReferenceDocsUri() { + java.lang.Object ref = referenceDocsUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referenceDocsUri_ = s; + return s; + } + } + /** + * + * + *
+   * Link to automatically generated reference documentation.  Example:
+   * https://cloud.google.com/nodejs/docs/reference/asset/latest
+   * 
+ * + * string reference_docs_uri = 1 [deprecated = true]; + * + * @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See + * google/api/client.proto;l=106 + * @return The bytes for referenceDocsUri. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getReferenceDocsUriBytes() { + java.lang.Object ref = referenceDocsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + referenceDocsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List destinations_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.api.ClientLibraryDestination> + destinations_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.api.ClientLibraryDestination>() { + public com.google.api.ClientLibraryDestination convert(java.lang.Integer from) { + com.google.api.ClientLibraryDestination result = + com.google.api.ClientLibraryDestination.forNumber(from); + return result == null ? com.google.api.ClientLibraryDestination.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+   * The destination where API teams want this client library to be published.
+   * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @return A list containing the destinations. + */ + @java.lang.Override + public java.util.List getDestinationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.api.ClientLibraryDestination>( + destinations_, destinations_converter_); + } + /** + * + * + *
+   * The destination where API teams want this client library to be published.
+   * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @return The count of destinations. + */ + @java.lang.Override + public int getDestinationsCount() { + return destinations_.size(); + } + /** + * + * + *
+   * The destination where API teams want this client library to be published.
+   * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param index The index of the element to return. + * @return The destinations at the given index. + */ + @java.lang.Override + public com.google.api.ClientLibraryDestination getDestinations(int index) { + return destinations_converter_.convert(destinations_.get(index)); + } + /** + * + * + *
+   * The destination where API teams want this client library to be published.
+   * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @return A list containing the enum numeric values on the wire for destinations. + */ + @java.lang.Override + public java.util.List getDestinationsValueList() { + return destinations_; + } + /** + * + * + *
+   * The destination where API teams want this client library to be published.
+   * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of destinations at the given index. + */ + @java.lang.Override + public int getDestinationsValue(int index) { + return destinations_.get(index); + } + + private int destinationsMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referenceDocsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, referenceDocsUri_); + } + if (getDestinationsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(destinationsMemoizedSerializedSize); + } + for (int i = 0; i < destinations_.size(); i++) { + output.writeEnumNoTag(destinations_.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(referenceDocsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, referenceDocsUri_); + } + { + int dataSize = 0; + for (int i = 0; i < destinations_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(destinations_.get(i)); + } + size += dataSize; + if (!getDestinationsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + destinationsMemoizedSerializedSize = 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.api.CommonLanguageSettings)) { + return super.equals(obj); + } + com.google.api.CommonLanguageSettings other = (com.google.api.CommonLanguageSettings) obj; + + if (!getReferenceDocsUri().equals(other.getReferenceDocsUri())) return false; + if (!destinations_.equals(other.destinations_)) 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) + REFERENCE_DOCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getReferenceDocsUri().hashCode(); + if (getDestinationsCount() > 0) { + hash = (37 * hash) + DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + destinations_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.CommonLanguageSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.CommonLanguageSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.CommonLanguageSettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.CommonLanguageSettings 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.api.CommonLanguageSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.CommonLanguageSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.CommonLanguageSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.CommonLanguageSettings 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.api.CommonLanguageSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.CommonLanguageSettings 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.api.CommonLanguageSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.CommonLanguageSettings 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.api.CommonLanguageSettings 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; + } + /** + * + * + *
+   * Required information for every language.
+   * 
+ * + * Protobuf type {@code google.api.CommonLanguageSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.CommonLanguageSettings) + com.google.api.CommonLanguageSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto + .internal_static_google_api_CommonLanguageSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto + .internal_static_google_api_CommonLanguageSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CommonLanguageSettings.class, + com.google.api.CommonLanguageSettings.Builder.class); + } + + // Construct using com.google.api.CommonLanguageSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + referenceDocsUri_ = ""; + destinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto + .internal_static_google_api_CommonLanguageSettings_descriptor; + } + + @java.lang.Override + public com.google.api.CommonLanguageSettings getDefaultInstanceForType() { + return com.google.api.CommonLanguageSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.CommonLanguageSettings build() { + com.google.api.CommonLanguageSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.CommonLanguageSettings buildPartial() { + com.google.api.CommonLanguageSettings result = + new com.google.api.CommonLanguageSettings(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.CommonLanguageSettings result) { + if (((bitField0_ & 0x00000002) != 0)) { + destinations_ = java.util.Collections.unmodifiableList(destinations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.destinations_ = destinations_; + } + + private void buildPartial0(com.google.api.CommonLanguageSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.referenceDocsUri_ = referenceDocsUri_; + } + } + + @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.api.CommonLanguageSettings) { + return mergeFrom((com.google.api.CommonLanguageSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.CommonLanguageSettings other) { + if (other == com.google.api.CommonLanguageSettings.getDefaultInstance()) return this; + if (!other.getReferenceDocsUri().isEmpty()) { + referenceDocsUri_ = other.referenceDocsUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.destinations_.isEmpty()) { + if (destinations_.isEmpty()) { + destinations_ = other.destinations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDestinationsIsMutable(); + destinations_.addAll(other.destinations_); + } + 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: + { + referenceDocsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + int tmpRaw = input.readEnum(); + ensureDestinationsIsMutable(); + destinations_.add(tmpRaw); + break; + } // case 16 + case 18: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureDestinationsIsMutable(); + destinations_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object referenceDocsUri_ = ""; + /** + * + * + *
+     * Link to automatically generated reference documentation.  Example:
+     * https://cloud.google.com/nodejs/docs/reference/asset/latest
+     * 
+ * + * string reference_docs_uri = 1 [deprecated = true]; + * + * @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See + * google/api/client.proto;l=106 + * @return The referenceDocsUri. + */ + @java.lang.Deprecated + public java.lang.String getReferenceDocsUri() { + java.lang.Object ref = referenceDocsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referenceDocsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Link to automatically generated reference documentation.  Example:
+     * https://cloud.google.com/nodejs/docs/reference/asset/latest
+     * 
+ * + * string reference_docs_uri = 1 [deprecated = true]; + * + * @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See + * google/api/client.proto;l=106 + * @return The bytes for referenceDocsUri. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getReferenceDocsUriBytes() { + java.lang.Object ref = referenceDocsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + referenceDocsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Link to automatically generated reference documentation.  Example:
+     * https://cloud.google.com/nodejs/docs/reference/asset/latest
+     * 
+ * + * string reference_docs_uri = 1 [deprecated = true]; + * + * @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See + * google/api/client.proto;l=106 + * @param value The referenceDocsUri to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setReferenceDocsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + referenceDocsUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Link to automatically generated reference documentation.  Example:
+     * https://cloud.google.com/nodejs/docs/reference/asset/latest
+     * 
+ * + * string reference_docs_uri = 1 [deprecated = true]; + * + * @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See + * google/api/client.proto;l=106 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearReferenceDocsUri() { + referenceDocsUri_ = getDefaultInstance().getReferenceDocsUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Link to automatically generated reference documentation.  Example:
+     * https://cloud.google.com/nodejs/docs/reference/asset/latest
+     * 
+ * + * string reference_docs_uri = 1 [deprecated = true]; + * + * @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See + * google/api/client.proto;l=106 + * @param value The bytes for referenceDocsUri to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setReferenceDocsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + referenceDocsUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List destinations_ = java.util.Collections.emptyList(); + + private void ensureDestinationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + destinations_ = new java.util.ArrayList(destinations_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @return A list containing the destinations. + */ + public java.util.List getDestinationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.api.ClientLibraryDestination>( + destinations_, destinations_converter_); + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @return The count of destinations. + */ + public int getDestinationsCount() { + return destinations_.size(); + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param index The index of the element to return. + * @return The destinations at the given index. + */ + public com.google.api.ClientLibraryDestination getDestinations(int index) { + return destinations_converter_.convert(destinations_.get(index)); + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param index The index to set the value at. + * @param value The destinations to set. + * @return This builder for chaining. + */ + public Builder setDestinations(int index, com.google.api.ClientLibraryDestination value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationsIsMutable(); + destinations_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param value The destinations to add. + * @return This builder for chaining. + */ + public Builder addDestinations(com.google.api.ClientLibraryDestination value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationsIsMutable(); + destinations_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param values The destinations to add. + * @return This builder for chaining. + */ + public Builder addAllDestinations( + java.lang.Iterable values) { + ensureDestinationsIsMutable(); + for (com.google.api.ClientLibraryDestination value : values) { + destinations_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @return This builder for chaining. + */ + public Builder clearDestinations() { + destinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @return A list containing the enum numeric values on the wire for destinations. + */ + public java.util.List getDestinationsValueList() { + return java.util.Collections.unmodifiableList(destinations_); + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of destinations at the given index. + */ + public int getDestinationsValue(int index) { + return destinations_.get(index); + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for destinations to set. + * @return This builder for chaining. + */ + public Builder setDestinationsValue(int index, int value) { + ensureDestinationsIsMutable(); + destinations_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param value The enum numeric value on the wire for destinations to add. + * @return This builder for chaining. + */ + public Builder addDestinationsValue(int value) { + ensureDestinationsIsMutable(); + destinations_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The destination where API teams want this client library to be published.
+     * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param values The enum numeric values on the wire for destinations to add. + * @return This builder for chaining. + */ + public Builder addAllDestinationsValue(java.lang.Iterable values) { + ensureDestinationsIsMutable(); + for (int value : values) { + destinations_.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.api.CommonLanguageSettings) + } + + // @@protoc_insertion_point(class_scope:google.api.CommonLanguageSettings) + private static final com.google.api.CommonLanguageSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.CommonLanguageSettings(); + } + + public static com.google.api.CommonLanguageSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CommonLanguageSettings 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.api.CommonLanguageSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CommonLanguageSettingsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CommonLanguageSettingsOrBuilder.java new file mode 100644 index 000000000000..c8610bc6bb0b --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CommonLanguageSettingsOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface CommonLanguageSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.CommonLanguageSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Link to automatically generated reference documentation.  Example:
+   * https://cloud.google.com/nodejs/docs/reference/asset/latest
+   * 
+ * + * string reference_docs_uri = 1 [deprecated = true]; + * + * @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See + * google/api/client.proto;l=106 + * @return The referenceDocsUri. + */ + @java.lang.Deprecated + java.lang.String getReferenceDocsUri(); + /** + * + * + *
+   * Link to automatically generated reference documentation.  Example:
+   * https://cloud.google.com/nodejs/docs/reference/asset/latest
+   * 
+ * + * string reference_docs_uri = 1 [deprecated = true]; + * + * @deprecated google.api.CommonLanguageSettings.reference_docs_uri is deprecated. See + * google/api/client.proto;l=106 + * @return The bytes for referenceDocsUri. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getReferenceDocsUriBytes(); + + /** + * + * + *
+   * The destination where API teams want this client library to be published.
+   * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @return A list containing the destinations. + */ + java.util.List getDestinationsList(); + /** + * + * + *
+   * The destination where API teams want this client library to be published.
+   * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @return The count of destinations. + */ + int getDestinationsCount(); + /** + * + * + *
+   * The destination where API teams want this client library to be published.
+   * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param index The index of the element to return. + * @return The destinations at the given index. + */ + com.google.api.ClientLibraryDestination getDestinations(int index); + /** + * + * + *
+   * The destination where API teams want this client library to be published.
+   * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @return A list containing the enum numeric values on the wire for destinations. + */ + java.util.List getDestinationsValueList(); + /** + * + * + *
+   * The destination where API teams want this client library to be published.
+   * 
+ * + * repeated .google.api.ClientLibraryDestination destinations = 2; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of destinations at the given index. + */ + int getDestinationsValue(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConfigChange.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConfigChange.java new file mode 100644 index 000000000000..2256a26dd4af --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConfigChange.java @@ -0,0 +1,1706 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/config_change.proto + +package com.google.api; + +/** + * + * + *
+ * Output generated from semantically comparing two versions of a service
+ * configuration.
+ *
+ * Includes detailed information about a field that have changed with
+ * applicable advice about potential consequences for the change, such as
+ * backwards-incompatibility.
+ * 
+ * + * Protobuf type {@code google.api.ConfigChange} + */ +public final class ConfigChange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.ConfigChange) + ConfigChangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfigChange.newBuilder() to construct. + private ConfigChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigChange() { + element_ = ""; + oldValue_ = ""; + newValue_ = ""; + changeType_ = 0; + advices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfigChange(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ConfigChangeProto.internal_static_google_api_ConfigChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ConfigChangeProto + .internal_static_google_api_ConfigChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ConfigChange.class, com.google.api.ConfigChange.Builder.class); + } + + public static final int ELEMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object element_ = ""; + /** + * + * + *
+   * Object hierarchy path to the change, with levels separated by a '.'
+   * character. For repeated fields, an applicable unique identifier field is
+   * used for the index (usually selector, name, or id). For maps, the term
+   * 'key' is used. If the field has no unique identifier, the numeric index
+   * is used.
+   * Examples:
+   * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+   * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+   * - logging.producer_destinations[0]
+   * 
+ * + * string element = 1; + * + * @return The element. + */ + @java.lang.Override + public java.lang.String getElement() { + java.lang.Object ref = element_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + element_ = s; + return s; + } + } + /** + * + * + *
+   * Object hierarchy path to the change, with levels separated by a '.'
+   * character. For repeated fields, an applicable unique identifier field is
+   * used for the index (usually selector, name, or id). For maps, the term
+   * 'key' is used. If the field has no unique identifier, the numeric index
+   * is used.
+   * Examples:
+   * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+   * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+   * - logging.producer_destinations[0]
+   * 
+ * + * string element = 1; + * + * @return The bytes for element. + */ + @java.lang.Override + public com.google.protobuf.ByteString getElementBytes() { + java.lang.Object ref = element_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + element_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OLD_VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object oldValue_ = ""; + /** + * + * + *
+   * Value of the changed object in the old Service configuration,
+   * in JSON format. This field will not be populated if ChangeType == ADDED.
+   * 
+ * + * string old_value = 2; + * + * @return The oldValue. + */ + @java.lang.Override + public java.lang.String getOldValue() { + java.lang.Object ref = oldValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oldValue_ = s; + return s; + } + } + /** + * + * + *
+   * Value of the changed object in the old Service configuration,
+   * in JSON format. This field will not be populated if ChangeType == ADDED.
+   * 
+ * + * string old_value = 2; + * + * @return The bytes for oldValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOldValueBytes() { + java.lang.Object ref = oldValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oldValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEW_VALUE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object newValue_ = ""; + /** + * + * + *
+   * Value of the changed object in the new Service configuration,
+   * in JSON format. This field will not be populated if ChangeType == REMOVED.
+   * 
+ * + * string new_value = 3; + * + * @return The newValue. + */ + @java.lang.Override + public java.lang.String getNewValue() { + java.lang.Object ref = newValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newValue_ = s; + return s; + } + } + /** + * + * + *
+   * Value of the changed object in the new Service configuration,
+   * in JSON format. This field will not be populated if ChangeType == REMOVED.
+   * 
+ * + * string new_value = 3; + * + * @return The bytes for newValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNewValueBytes() { + java.lang.Object ref = newValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANGE_TYPE_FIELD_NUMBER = 4; + private int changeType_ = 0; + /** + * + * + *
+   * The type for this change, either ADDED, REMOVED, or MODIFIED.
+   * 
+ * + * .google.api.ChangeType change_type = 4; + * + * @return The enum numeric value on the wire for changeType. + */ + @java.lang.Override + public int getChangeTypeValue() { + return changeType_; + } + /** + * + * + *
+   * The type for this change, either ADDED, REMOVED, or MODIFIED.
+   * 
+ * + * .google.api.ChangeType change_type = 4; + * + * @return The changeType. + */ + @java.lang.Override + public com.google.api.ChangeType getChangeType() { + com.google.api.ChangeType result = com.google.api.ChangeType.forNumber(changeType_); + return result == null ? com.google.api.ChangeType.UNRECOGNIZED : result; + } + + public static final int ADVICES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List advices_; + /** + * + * + *
+   * Collection of advice provided for this change, useful for determining the
+   * possible impact of this change.
+   * 
+ * + * repeated .google.api.Advice advices = 5; + */ + @java.lang.Override + public java.util.List getAdvicesList() { + return advices_; + } + /** + * + * + *
+   * Collection of advice provided for this change, useful for determining the
+   * possible impact of this change.
+   * 
+ * + * repeated .google.api.Advice advices = 5; + */ + @java.lang.Override + public java.util.List getAdvicesOrBuilderList() { + return advices_; + } + /** + * + * + *
+   * Collection of advice provided for this change, useful for determining the
+   * possible impact of this change.
+   * 
+ * + * repeated .google.api.Advice advices = 5; + */ + @java.lang.Override + public int getAdvicesCount() { + return advices_.size(); + } + /** + * + * + *
+   * Collection of advice provided for this change, useful for determining the
+   * possible impact of this change.
+   * 
+ * + * repeated .google.api.Advice advices = 5; + */ + @java.lang.Override + public com.google.api.Advice getAdvices(int index) { + return advices_.get(index); + } + /** + * + * + *
+   * Collection of advice provided for this change, useful for determining the
+   * possible impact of this change.
+   * 
+ * + * repeated .google.api.Advice advices = 5; + */ + @java.lang.Override + public com.google.api.AdviceOrBuilder getAdvicesOrBuilder(int index) { + return advices_.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(element_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, element_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oldValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, oldValue_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, newValue_); + } + if (changeType_ != com.google.api.ChangeType.CHANGE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, changeType_); + } + for (int i = 0; i < advices_.size(); i++) { + output.writeMessage(5, advices_.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(element_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, element_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oldValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, oldValue_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, newValue_); + } + if (changeType_ != com.google.api.ChangeType.CHANGE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, changeType_); + } + for (int i = 0; i < advices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, advices_.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.api.ConfigChange)) { + return super.equals(obj); + } + com.google.api.ConfigChange other = (com.google.api.ConfigChange) obj; + + if (!getElement().equals(other.getElement())) return false; + if (!getOldValue().equals(other.getOldValue())) return false; + if (!getNewValue().equals(other.getNewValue())) return false; + if (changeType_ != other.changeType_) return false; + if (!getAdvicesList().equals(other.getAdvicesList())) 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) + ELEMENT_FIELD_NUMBER; + hash = (53 * hash) + getElement().hashCode(); + hash = (37 * hash) + OLD_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getOldValue().hashCode(); + hash = (37 * hash) + NEW_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getNewValue().hashCode(); + hash = (37 * hash) + CHANGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + changeType_; + if (getAdvicesCount() > 0) { + hash = (37 * hash) + ADVICES_FIELD_NUMBER; + hash = (53 * hash) + getAdvicesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.ConfigChange parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ConfigChange parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.ConfigChange parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ConfigChange 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.api.ConfigChange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ConfigChange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.ConfigChange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.ConfigChange 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.api.ConfigChange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.ConfigChange 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.api.ConfigChange parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.ConfigChange 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.api.ConfigChange 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; + } + /** + * + * + *
+   * Output generated from semantically comparing two versions of a service
+   * configuration.
+   *
+   * Includes detailed information about a field that have changed with
+   * applicable advice about potential consequences for the change, such as
+   * backwards-incompatibility.
+   * 
+ * + * Protobuf type {@code google.api.ConfigChange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.ConfigChange) + com.google.api.ConfigChangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ConfigChangeProto.internal_static_google_api_ConfigChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ConfigChangeProto + .internal_static_google_api_ConfigChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ConfigChange.class, com.google.api.ConfigChange.Builder.class); + } + + // Construct using com.google.api.ConfigChange.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + element_ = ""; + oldValue_ = ""; + newValue_ = ""; + changeType_ = 0; + if (advicesBuilder_ == null) { + advices_ = java.util.Collections.emptyList(); + } else { + advices_ = null; + advicesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ConfigChangeProto.internal_static_google_api_ConfigChange_descriptor; + } + + @java.lang.Override + public com.google.api.ConfigChange getDefaultInstanceForType() { + return com.google.api.ConfigChange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.ConfigChange build() { + com.google.api.ConfigChange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.ConfigChange buildPartial() { + com.google.api.ConfigChange result = new com.google.api.ConfigChange(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.ConfigChange result) { + if (advicesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + advices_ = java.util.Collections.unmodifiableList(advices_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.advices_ = advices_; + } else { + result.advices_ = advicesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.ConfigChange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.element_ = element_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.oldValue_ = oldValue_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.newValue_ = newValue_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.changeType_ = changeType_; + } + } + + @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.api.ConfigChange) { + return mergeFrom((com.google.api.ConfigChange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.ConfigChange other) { + if (other == com.google.api.ConfigChange.getDefaultInstance()) return this; + if (!other.getElement().isEmpty()) { + element_ = other.element_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOldValue().isEmpty()) { + oldValue_ = other.oldValue_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getNewValue().isEmpty()) { + newValue_ = other.newValue_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.changeType_ != 0) { + setChangeTypeValue(other.getChangeTypeValue()); + } + if (advicesBuilder_ == null) { + if (!other.advices_.isEmpty()) { + if (advices_.isEmpty()) { + advices_ = other.advices_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureAdvicesIsMutable(); + advices_.addAll(other.advices_); + } + onChanged(); + } + } else { + if (!other.advices_.isEmpty()) { + if (advicesBuilder_.isEmpty()) { + advicesBuilder_.dispose(); + advicesBuilder_ = null; + advices_ = other.advices_; + bitField0_ = (bitField0_ & ~0x00000010); + advicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAdvicesFieldBuilder() + : null; + } else { + advicesBuilder_.addAllMessages(other.advices_); + } + } + } + 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: + { + element_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + oldValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + newValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + changeType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + com.google.api.Advice m = + input.readMessage(com.google.api.Advice.parser(), extensionRegistry); + if (advicesBuilder_ == null) { + ensureAdvicesIsMutable(); + advices_.add(m); + } else { + advicesBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object element_ = ""; + /** + * + * + *
+     * Object hierarchy path to the change, with levels separated by a '.'
+     * character. For repeated fields, an applicable unique identifier field is
+     * used for the index (usually selector, name, or id). For maps, the term
+     * 'key' is used. If the field has no unique identifier, the numeric index
+     * is used.
+     * Examples:
+     * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+     * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+     * - logging.producer_destinations[0]
+     * 
+ * + * string element = 1; + * + * @return The element. + */ + public java.lang.String getElement() { + java.lang.Object ref = element_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + element_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Object hierarchy path to the change, with levels separated by a '.'
+     * character. For repeated fields, an applicable unique identifier field is
+     * used for the index (usually selector, name, or id). For maps, the term
+     * 'key' is used. If the field has no unique identifier, the numeric index
+     * is used.
+     * Examples:
+     * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+     * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+     * - logging.producer_destinations[0]
+     * 
+ * + * string element = 1; + * + * @return The bytes for element. + */ + public com.google.protobuf.ByteString getElementBytes() { + java.lang.Object ref = element_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + element_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Object hierarchy path to the change, with levels separated by a '.'
+     * character. For repeated fields, an applicable unique identifier field is
+     * used for the index (usually selector, name, or id). For maps, the term
+     * 'key' is used. If the field has no unique identifier, the numeric index
+     * is used.
+     * Examples:
+     * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+     * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+     * - logging.producer_destinations[0]
+     * 
+ * + * string element = 1; + * + * @param value The element to set. + * @return This builder for chaining. + */ + public Builder setElement(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + element_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Object hierarchy path to the change, with levels separated by a '.'
+     * character. For repeated fields, an applicable unique identifier field is
+     * used for the index (usually selector, name, or id). For maps, the term
+     * 'key' is used. If the field has no unique identifier, the numeric index
+     * is used.
+     * Examples:
+     * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+     * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+     * - logging.producer_destinations[0]
+     * 
+ * + * string element = 1; + * + * @return This builder for chaining. + */ + public Builder clearElement() { + element_ = getDefaultInstance().getElement(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Object hierarchy path to the change, with levels separated by a '.'
+     * character. For repeated fields, an applicable unique identifier field is
+     * used for the index (usually selector, name, or id). For maps, the term
+     * 'key' is used. If the field has no unique identifier, the numeric index
+     * is used.
+     * Examples:
+     * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+     * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+     * - logging.producer_destinations[0]
+     * 
+ * + * string element = 1; + * + * @param value The bytes for element to set. + * @return This builder for chaining. + */ + public Builder setElementBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + element_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object oldValue_ = ""; + /** + * + * + *
+     * Value of the changed object in the old Service configuration,
+     * in JSON format. This field will not be populated if ChangeType == ADDED.
+     * 
+ * + * string old_value = 2; + * + * @return The oldValue. + */ + public java.lang.String getOldValue() { + java.lang.Object ref = oldValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oldValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Value of the changed object in the old Service configuration,
+     * in JSON format. This field will not be populated if ChangeType == ADDED.
+     * 
+ * + * string old_value = 2; + * + * @return The bytes for oldValue. + */ + public com.google.protobuf.ByteString getOldValueBytes() { + java.lang.Object ref = oldValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oldValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Value of the changed object in the old Service configuration,
+     * in JSON format. This field will not be populated if ChangeType == ADDED.
+     * 
+ * + * string old_value = 2; + * + * @param value The oldValue to set. + * @return This builder for chaining. + */ + public Builder setOldValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oldValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of the changed object in the old Service configuration,
+     * in JSON format. This field will not be populated if ChangeType == ADDED.
+     * 
+ * + * string old_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearOldValue() { + oldValue_ = getDefaultInstance().getOldValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Value of the changed object in the old Service configuration,
+     * in JSON format. This field will not be populated if ChangeType == ADDED.
+     * 
+ * + * string old_value = 2; + * + * @param value The bytes for oldValue to set. + * @return This builder for chaining. + */ + public Builder setOldValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oldValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object newValue_ = ""; + /** + * + * + *
+     * Value of the changed object in the new Service configuration,
+     * in JSON format. This field will not be populated if ChangeType == REMOVED.
+     * 
+ * + * string new_value = 3; + * + * @return The newValue. + */ + public java.lang.String getNewValue() { + java.lang.Object ref = newValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Value of the changed object in the new Service configuration,
+     * in JSON format. This field will not be populated if ChangeType == REMOVED.
+     * 
+ * + * string new_value = 3; + * + * @return The bytes for newValue. + */ + public com.google.protobuf.ByteString getNewValueBytes() { + java.lang.Object ref = newValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Value of the changed object in the new Service configuration,
+     * in JSON format. This field will not be populated if ChangeType == REMOVED.
+     * 
+ * + * string new_value = 3; + * + * @param value The newValue to set. + * @return This builder for chaining. + */ + public Builder setNewValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + newValue_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of the changed object in the new Service configuration,
+     * in JSON format. This field will not be populated if ChangeType == REMOVED.
+     * 
+ * + * string new_value = 3; + * + * @return This builder for chaining. + */ + public Builder clearNewValue() { + newValue_ = getDefaultInstance().getNewValue(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Value of the changed object in the new Service configuration,
+     * in JSON format. This field will not be populated if ChangeType == REMOVED.
+     * 
+ * + * string new_value = 3; + * + * @param value The bytes for newValue to set. + * @return This builder for chaining. + */ + public Builder setNewValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + newValue_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int changeType_ = 0; + /** + * + * + *
+     * The type for this change, either ADDED, REMOVED, or MODIFIED.
+     * 
+ * + * .google.api.ChangeType change_type = 4; + * + * @return The enum numeric value on the wire for changeType. + */ + @java.lang.Override + public int getChangeTypeValue() { + return changeType_; + } + /** + * + * + *
+     * The type for this change, either ADDED, REMOVED, or MODIFIED.
+     * 
+ * + * .google.api.ChangeType change_type = 4; + * + * @param value The enum numeric value on the wire for changeType to set. + * @return This builder for chaining. + */ + public Builder setChangeTypeValue(int value) { + changeType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The type for this change, either ADDED, REMOVED, or MODIFIED.
+     * 
+ * + * .google.api.ChangeType change_type = 4; + * + * @return The changeType. + */ + @java.lang.Override + public com.google.api.ChangeType getChangeType() { + com.google.api.ChangeType result = com.google.api.ChangeType.forNumber(changeType_); + return result == null ? com.google.api.ChangeType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The type for this change, either ADDED, REMOVED, or MODIFIED.
+     * 
+ * + * .google.api.ChangeType change_type = 4; + * + * @param value The changeType to set. + * @return This builder for chaining. + */ + public Builder setChangeType(com.google.api.ChangeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + changeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type for this change, either ADDED, REMOVED, or MODIFIED.
+     * 
+ * + * .google.api.ChangeType change_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearChangeType() { + bitField0_ = (bitField0_ & ~0x00000008); + changeType_ = 0; + onChanged(); + return this; + } + + private java.util.List advices_ = java.util.Collections.emptyList(); + + private void ensureAdvicesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + advices_ = new java.util.ArrayList(advices_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Advice, com.google.api.Advice.Builder, com.google.api.AdviceOrBuilder> + advicesBuilder_; + + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public java.util.List getAdvicesList() { + if (advicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(advices_); + } else { + return advicesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public int getAdvicesCount() { + if (advicesBuilder_ == null) { + return advices_.size(); + } else { + return advicesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public com.google.api.Advice getAdvices(int index) { + if (advicesBuilder_ == null) { + return advices_.get(index); + } else { + return advicesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public Builder setAdvices(int index, com.google.api.Advice value) { + if (advicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvicesIsMutable(); + advices_.set(index, value); + onChanged(); + } else { + advicesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public Builder setAdvices(int index, com.google.api.Advice.Builder builderForValue) { + if (advicesBuilder_ == null) { + ensureAdvicesIsMutable(); + advices_.set(index, builderForValue.build()); + onChanged(); + } else { + advicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public Builder addAdvices(com.google.api.Advice value) { + if (advicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvicesIsMutable(); + advices_.add(value); + onChanged(); + } else { + advicesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public Builder addAdvices(int index, com.google.api.Advice value) { + if (advicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvicesIsMutable(); + advices_.add(index, value); + onChanged(); + } else { + advicesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public Builder addAdvices(com.google.api.Advice.Builder builderForValue) { + if (advicesBuilder_ == null) { + ensureAdvicesIsMutable(); + advices_.add(builderForValue.build()); + onChanged(); + } else { + advicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public Builder addAdvices(int index, com.google.api.Advice.Builder builderForValue) { + if (advicesBuilder_ == null) { + ensureAdvicesIsMutable(); + advices_.add(index, builderForValue.build()); + onChanged(); + } else { + advicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public Builder addAllAdvices(java.lang.Iterable values) { + if (advicesBuilder_ == null) { + ensureAdvicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, advices_); + onChanged(); + } else { + advicesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public Builder clearAdvices() { + if (advicesBuilder_ == null) { + advices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + advicesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public Builder removeAdvices(int index) { + if (advicesBuilder_ == null) { + ensureAdvicesIsMutable(); + advices_.remove(index); + onChanged(); + } else { + advicesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public com.google.api.Advice.Builder getAdvicesBuilder(int index) { + return getAdvicesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public com.google.api.AdviceOrBuilder getAdvicesOrBuilder(int index) { + if (advicesBuilder_ == null) { + return advices_.get(index); + } else { + return advicesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public java.util.List getAdvicesOrBuilderList() { + if (advicesBuilder_ != null) { + return advicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(advices_); + } + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public com.google.api.Advice.Builder addAdvicesBuilder() { + return getAdvicesFieldBuilder().addBuilder(com.google.api.Advice.getDefaultInstance()); + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public com.google.api.Advice.Builder addAdvicesBuilder(int index) { + return getAdvicesFieldBuilder().addBuilder(index, com.google.api.Advice.getDefaultInstance()); + } + /** + * + * + *
+     * Collection of advice provided for this change, useful for determining the
+     * possible impact of this change.
+     * 
+ * + * repeated .google.api.Advice advices = 5; + */ + public java.util.List getAdvicesBuilderList() { + return getAdvicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Advice, com.google.api.Advice.Builder, com.google.api.AdviceOrBuilder> + getAdvicesFieldBuilder() { + if (advicesBuilder_ == null) { + advicesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Advice, + com.google.api.Advice.Builder, + com.google.api.AdviceOrBuilder>( + advices_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + advices_ = null; + } + return advicesBuilder_; + } + + @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.api.ConfigChange) + } + + // @@protoc_insertion_point(class_scope:google.api.ConfigChange) + private static final com.google.api.ConfigChange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.ConfigChange(); + } + + public static com.google.api.ConfigChange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigChange 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.api.ConfigChange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConfigChangeOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConfigChangeOrBuilder.java new file mode 100644 index 000000000000..39ff56df4c9e --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConfigChangeOrBuilder.java @@ -0,0 +1,201 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/config_change.proto + +package com.google.api; + +public interface ConfigChangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.ConfigChange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Object hierarchy path to the change, with levels separated by a '.'
+   * character. For repeated fields, an applicable unique identifier field is
+   * used for the index (usually selector, name, or id). For maps, the term
+   * 'key' is used. If the field has no unique identifier, the numeric index
+   * is used.
+   * Examples:
+   * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+   * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+   * - logging.producer_destinations[0]
+   * 
+ * + * string element = 1; + * + * @return The element. + */ + java.lang.String getElement(); + /** + * + * + *
+   * Object hierarchy path to the change, with levels separated by a '.'
+   * character. For repeated fields, an applicable unique identifier field is
+   * used for the index (usually selector, name, or id). For maps, the term
+   * 'key' is used. If the field has no unique identifier, the numeric index
+   * is used.
+   * Examples:
+   * - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction
+   * - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value
+   * - logging.producer_destinations[0]
+   * 
+ * + * string element = 1; + * + * @return The bytes for element. + */ + com.google.protobuf.ByteString getElementBytes(); + + /** + * + * + *
+   * Value of the changed object in the old Service configuration,
+   * in JSON format. This field will not be populated if ChangeType == ADDED.
+   * 
+ * + * string old_value = 2; + * + * @return The oldValue. + */ + java.lang.String getOldValue(); + /** + * + * + *
+   * Value of the changed object in the old Service configuration,
+   * in JSON format. This field will not be populated if ChangeType == ADDED.
+   * 
+ * + * string old_value = 2; + * + * @return The bytes for oldValue. + */ + com.google.protobuf.ByteString getOldValueBytes(); + + /** + * + * + *
+   * Value of the changed object in the new Service configuration,
+   * in JSON format. This field will not be populated if ChangeType == REMOVED.
+   * 
+ * + * string new_value = 3; + * + * @return The newValue. + */ + java.lang.String getNewValue(); + /** + * + * + *
+   * Value of the changed object in the new Service configuration,
+   * in JSON format. This field will not be populated if ChangeType == REMOVED.
+   * 
+ * + * string new_value = 3; + * + * @return The bytes for newValue. + */ + com.google.protobuf.ByteString getNewValueBytes(); + + /** + * + * + *
+   * The type for this change, either ADDED, REMOVED, or MODIFIED.
+   * 
+ * + * .google.api.ChangeType change_type = 4; + * + * @return The enum numeric value on the wire for changeType. + */ + int getChangeTypeValue(); + /** + * + * + *
+   * The type for this change, either ADDED, REMOVED, or MODIFIED.
+   * 
+ * + * .google.api.ChangeType change_type = 4; + * + * @return The changeType. + */ + com.google.api.ChangeType getChangeType(); + + /** + * + * + *
+   * Collection of advice provided for this change, useful for determining the
+   * possible impact of this change.
+   * 
+ * + * repeated .google.api.Advice advices = 5; + */ + java.util.List getAdvicesList(); + /** + * + * + *
+   * Collection of advice provided for this change, useful for determining the
+   * possible impact of this change.
+   * 
+ * + * repeated .google.api.Advice advices = 5; + */ + com.google.api.Advice getAdvices(int index); + /** + * + * + *
+   * Collection of advice provided for this change, useful for determining the
+   * possible impact of this change.
+   * 
+ * + * repeated .google.api.Advice advices = 5; + */ + int getAdvicesCount(); + /** + * + * + *
+   * Collection of advice provided for this change, useful for determining the
+   * possible impact of this change.
+   * 
+ * + * repeated .google.api.Advice advices = 5; + */ + java.util.List getAdvicesOrBuilderList(); + /** + * + * + *
+   * Collection of advice provided for this change, useful for determining the
+   * possible impact of this change.
+   * 
+ * + * repeated .google.api.Advice advices = 5; + */ + com.google.api.AdviceOrBuilder getAdvicesOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConfigChangeProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConfigChangeProto.java new file mode 100644 index 000000000000..d7f523c196f4 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConfigChangeProto.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/config_change.proto + +package com.google.api; + +public final class ConfigChangeProto { + private ConfigChangeProto() {} + + 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_api_ConfigChange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_ConfigChange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Advice_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Advice_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\036google/api/config_change.proto\022\ngoogle" + + ".api\"\227\001\n\014ConfigChange\022\017\n\007element\030\001 \001(\t\022\021" + + "\n\told_value\030\002 \001(\t\022\021\n\tnew_value\030\003 \001(\t\022+\n\013" + + "change_type\030\004 \001(\0162\026.google.api.ChangeTyp" + + "e\022#\n\007advices\030\005 \003(\0132\022.google.api.Advice\"\035" + + "\n\006Advice\022\023\n\013description\030\002 \001(\t*O\n\nChangeT" + + "ype\022\033\n\027CHANGE_TYPE_UNSPECIFIED\020\000\022\t\n\005ADDE" + + "D\020\001\022\013\n\007REMOVED\020\002\022\014\n\010MODIFIED\020\003Bq\n\016com.go" + + "ogle.apiB\021ConfigChangeProtoP\001ZCgoogle.go" + + "lang.org/genproto/googleapis/api/configc" + + "hange;configchange\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_ConfigChange_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_ConfigChange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_ConfigChange_descriptor, + new java.lang.String[] { + "Element", "OldValue", "NewValue", "ChangeType", "Advices", + }); + internal_static_google_api_Advice_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_api_Advice_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Advice_descriptor, + new java.lang.String[] { + "Description", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConsumerProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConsumerProto.java new file mode 100644 index 000000000000..d32f751c7cff --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ConsumerProto.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/consumer.proto + +package com.google.api; + +public final class ConsumerProto { + private ConsumerProto() {} + + 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_api_ProjectProperties_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_ProjectProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Property_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Property_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\031google/api/consumer.proto\022\ngoogle.api\"" + + "=\n\021ProjectProperties\022(\n\nproperties\030\001 \003(\013" + + "2\024.google.api.Property\"\254\001\n\010Property\022\014\n\004n" + + "ame\030\001 \001(\t\022/\n\004type\030\002 \001(\0162!.google.api.Pro" + + "perty.PropertyType\022\023\n\013description\030\003 \001(\t\"" + + "L\n\014PropertyType\022\017\n\013UNSPECIFIED\020\000\022\t\n\005INT6" + + "4\020\001\022\010\n\004BOOL\020\002\022\n\n\006STRING\020\003\022\n\n\006DOUBLE\020\004Bh\n" + + "\016com.google.apiB\rConsumerProtoP\001ZEgoogle" + + ".golang.org/genproto/googleapis/api/serv" + + "iceconfig;serviceconfigb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_ProjectProperties_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_ProjectProperties_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_ProjectProperties_descriptor, + new java.lang.String[] { + "Properties", + }); + internal_static_google_api_Property_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_api_Property_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Property_descriptor, + new java.lang.String[] { + "Name", "Type", "Description", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Context.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Context.java new file mode 100644 index 000000000000..333ddb39955d --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Context.java @@ -0,0 +1,1030 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +/** + * + * + *
+ * `Context` defines which contexts an API requests.
+ *
+ * Example:
+ *
+ *     context:
+ *       rules:
+ *       - selector: "*"
+ *         requested:
+ *         - google.rpc.context.ProjectContext
+ *         - google.rpc.context.OriginContext
+ *
+ * The above specifies that all methods in the API request
+ * `google.rpc.context.ProjectContext` and
+ * `google.rpc.context.OriginContext`.
+ *
+ * Available context types are defined in package
+ * `google.rpc.context`.
+ *
+ * This also provides mechanism to allowlist any protobuf message extension that
+ * can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and
+ * “x-goog-ext-<extension_id>-jspb” format. For example, list any service
+ * specific protobuf types that can appear in grpc metadata as follows in your
+ * yaml file:
+ *
+ * Example:
+ *
+ *     context:
+ *       rules:
+ *        - selector: "google.example.library.v1.LibraryService.CreateBook"
+ *          allowed_request_extensions:
+ *          - google.foo.v1.NewExtension
+ *          allowed_response_extensions:
+ *          - google.foo.v1.NewExtension
+ *
+ * You can also specify extension ID instead of fully qualified extension name
+ * here.
+ * 
+ * + * Protobuf type {@code google.api.Context} + */ +public final class Context extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Context) + ContextOrBuilder { + private static final long serialVersionUID = 0L; + // Use Context.newBuilder() to construct. + private Context(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Context() { + rules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Context(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_Context_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Context.class, com.google.api.Context.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List rules_; + /** + * + * + *
+   * A list of RPC context rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + /** + * + * + *
+   * A list of RPC context rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + @java.lang.Override + public java.util.List getRulesOrBuilderList() { + return rules_; + } + /** + * + * + *
+   * A list of RPC context rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + /** + * + * + *
+   * A list of RPC context rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + @java.lang.Override + public com.google.api.ContextRule getRules(int index) { + return rules_.get(index); + } + /** + * + * + *
+   * A list of RPC context rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + @java.lang.Override + public com.google.api.ContextRuleOrBuilder getRulesOrBuilder(int index) { + return rules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(1, rules_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rules_.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.api.Context)) { + return super.equals(obj); + } + com.google.api.Context other = (com.google.api.Context) obj; + + if (!getRulesList().equals(other.getRulesList())) 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 (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Context parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Context parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Context parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Context 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.api.Context parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Context parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Context parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Context 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.api.Context parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Context 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.api.Context parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Context 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.api.Context 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; + } + /** + * + * + *
+   * `Context` defines which contexts an API requests.
+   *
+   * Example:
+   *
+   *     context:
+   *       rules:
+   *       - selector: "*"
+   *         requested:
+   *         - google.rpc.context.ProjectContext
+   *         - google.rpc.context.OriginContext
+   *
+   * The above specifies that all methods in the API request
+   * `google.rpc.context.ProjectContext` and
+   * `google.rpc.context.OriginContext`.
+   *
+   * Available context types are defined in package
+   * `google.rpc.context`.
+   *
+   * This also provides mechanism to allowlist any protobuf message extension that
+   * can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and
+   * “x-goog-ext-<extension_id>-jspb” format. For example, list any service
+   * specific protobuf types that can appear in grpc metadata as follows in your
+   * yaml file:
+   *
+   * Example:
+   *
+   *     context:
+   *       rules:
+   *        - selector: "google.example.library.v1.LibraryService.CreateBook"
+   *          allowed_request_extensions:
+   *          - google.foo.v1.NewExtension
+   *          allowed_response_extensions:
+   *          - google.foo.v1.NewExtension
+   *
+   * You can also specify extension ID instead of fully qualified extension name
+   * here.
+   * 
+ * + * Protobuf type {@code google.api.Context} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Context) + com.google.api.ContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_Context_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Context.class, com.google.api.Context.Builder.class); + } + + // Construct using com.google.api.Context.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; + } + + @java.lang.Override + public com.google.api.Context getDefaultInstanceForType() { + return com.google.api.Context.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Context build() { + com.google.api.Context result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Context buildPartial() { + com.google.api.Context result = new com.google.api.Context(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Context result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Context result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Context) { + return mergeFrom((com.google.api.Context) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Context other) { + if (other == com.google.api.Context.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + 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.api.ContextRule m = + input.readMessage(com.google.api.ContextRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List rules_ = java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.ContextRule, + com.google.api.ContextRule.Builder, + com.google.api.ContextRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public com.google.api.ContextRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public Builder setRules(int index, com.google.api.ContextRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public Builder setRules(int index, com.google.api.ContextRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public Builder addRules(com.google.api.ContextRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public Builder addRules(int index, com.google.api.ContextRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public Builder addRules(com.google.api.ContextRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public Builder addRules(int index, com.google.api.ContextRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public Builder addAllRules(java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public com.google.api.ContextRule.Builder getRulesBuilder(int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public com.google.api.ContextRuleOrBuilder getRulesOrBuilder(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public java.util.List getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public com.google.api.ContextRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder(com.google.api.ContextRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public com.google.api.ContextRule.Builder addRulesBuilder(int index) { + return getRulesFieldBuilder() + .addBuilder(index, com.google.api.ContextRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of RPC context rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + public java.util.List getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.ContextRule, + com.google.api.ContextRule.Builder, + com.google.api.ContextRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.ContextRule, + com.google.api.ContextRule.Builder, + com.google.api.ContextRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + @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.api.Context) + } + + // @@protoc_insertion_point(class_scope:google.api.Context) + private static final com.google.api.Context DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Context(); + } + + public static com.google.api.Context getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Context 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.api.Context getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextOrBuilder.java new file mode 100644 index 000000000000..ea5daea92d77 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +public interface ContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Context) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of RPC context rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + java.util.List getRulesList(); + /** + * + * + *
+   * A list of RPC context rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + com.google.api.ContextRule getRules(int index); + /** + * + * + *
+   * A list of RPC context rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + int getRulesCount(); + /** + * + * + *
+   * A list of RPC context rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + java.util.List getRulesOrBuilderList(); + /** + * + * + *
+   * A list of RPC context rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.ContextRule rules = 1; + */ + com.google.api.ContextRuleOrBuilder getRulesOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextProto.java new file mode 100644 index 000000000000..6da35fe3059e --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextProto.java @@ -0,0 +1,81 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +public final class ContextProto { + private ContextProto() {} + + 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_api_Context_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Context_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_ContextRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_ContextRule_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\030google/api/context.proto\022\ngoogle.api\"1" + + "\n\007Context\022&\n\005rules\030\001 \003(\0132\027.google.api.Co" + + "ntextRule\"\215\001\n\013ContextRule\022\020\n\010selector\030\001 " + + "\001(\t\022\021\n\trequested\030\002 \003(\t\022\020\n\010provided\030\003 \003(\t" + + "\022\"\n\032allowed_request_extensions\030\004 \003(\t\022#\n\033" + + "allowed_response_extensions\030\005 \003(\tBn\n\016com" + + ".google.apiB\014ContextProtoP\001ZEgoogle.gola" + + "ng.org/genproto/googleapis/api/serviceco" + + "nfig;serviceconfig\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_Context_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Context_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Context_descriptor, + new java.lang.String[] { + "Rules", + }); + internal_static_google_api_ContextRule_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_api_ContextRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_ContextRule_descriptor, + new java.lang.String[] { + "Selector", + "Requested", + "Provided", + "AllowedRequestExtensions", + "AllowedResponseExtensions", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextRule.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextRule.java new file mode 100644 index 000000000000..4e9f328e367c --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextRule.java @@ -0,0 +1,1776 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +/** + * + * + *
+ * A context rule provides information about the context for an individual API
+ * element.
+ * 
+ * + * Protobuf type {@code google.api.ContextRule} + */ +public final class ContextRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.ContextRule) + ContextRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContextRule.newBuilder() to construct. + private ContextRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContextRule() { + selector_ = ""; + requested_ = com.google.protobuf.LazyStringArrayList.emptyList(); + provided_ = com.google.protobuf.LazyStringArrayList.emptyList(); + allowedRequestExtensions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + allowedResponseExtensions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContextRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ContextRule.class, com.google.api.ContextRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object selector_ = ""; + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + @java.lang.Override + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList requested_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A list of full type names of requested contexts.
+   * 
+ * + * repeated string requested = 2; + * + * @return A list containing the requested. + */ + public com.google.protobuf.ProtocolStringList getRequestedList() { + return requested_; + } + /** + * + * + *
+   * A list of full type names of requested contexts.
+   * 
+ * + * repeated string requested = 2; + * + * @return The count of requested. + */ + public int getRequestedCount() { + return requested_.size(); + } + /** + * + * + *
+   * A list of full type names of requested contexts.
+   * 
+ * + * repeated string requested = 2; + * + * @param index The index of the element to return. + * @return The requested at the given index. + */ + public java.lang.String getRequested(int index) { + return requested_.get(index); + } + /** + * + * + *
+   * A list of full type names of requested contexts.
+   * 
+ * + * repeated string requested = 2; + * + * @param index The index of the value to return. + * @return The bytes of the requested at the given index. + */ + public com.google.protobuf.ByteString getRequestedBytes(int index) { + return requested_.getByteString(index); + } + + public static final int PROVIDED_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList provided_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A list of full type names of provided contexts.
+   * 
+ * + * repeated string provided = 3; + * + * @return A list containing the provided. + */ + public com.google.protobuf.ProtocolStringList getProvidedList() { + return provided_; + } + /** + * + * + *
+   * A list of full type names of provided contexts.
+   * 
+ * + * repeated string provided = 3; + * + * @return The count of provided. + */ + public int getProvidedCount() { + return provided_.size(); + } + /** + * + * + *
+   * A list of full type names of provided contexts.
+   * 
+ * + * repeated string provided = 3; + * + * @param index The index of the element to return. + * @return The provided at the given index. + */ + public java.lang.String getProvided(int index) { + return provided_.get(index); + } + /** + * + * + *
+   * A list of full type names of provided contexts.
+   * 
+ * + * repeated string provided = 3; + * + * @param index The index of the value to return. + * @return The bytes of the provided at the given index. + */ + public com.google.protobuf.ByteString getProvidedBytes(int index) { + return provided_.getByteString(index); + } + + public static final int ALLOWED_REQUEST_EXTENSIONS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList allowedRequestExtensions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from client to backend.
+   * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @return A list containing the allowedRequestExtensions. + */ + public com.google.protobuf.ProtocolStringList getAllowedRequestExtensionsList() { + return allowedRequestExtensions_; + } + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from client to backend.
+   * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @return The count of allowedRequestExtensions. + */ + public int getAllowedRequestExtensionsCount() { + return allowedRequestExtensions_.size(); + } + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from client to backend.
+   * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @param index The index of the element to return. + * @return The allowedRequestExtensions at the given index. + */ + public java.lang.String getAllowedRequestExtensions(int index) { + return allowedRequestExtensions_.get(index); + } + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from client to backend.
+   * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @param index The index of the value to return. + * @return The bytes of the allowedRequestExtensions at the given index. + */ + public com.google.protobuf.ByteString getAllowedRequestExtensionsBytes(int index) { + return allowedRequestExtensions_.getByteString(index); + } + + public static final int ALLOWED_RESPONSE_EXTENSIONS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList allowedResponseExtensions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from backend to client.
+   * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @return A list containing the allowedResponseExtensions. + */ + public com.google.protobuf.ProtocolStringList getAllowedResponseExtensionsList() { + return allowedResponseExtensions_; + } + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from backend to client.
+   * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @return The count of allowedResponseExtensions. + */ + public int getAllowedResponseExtensionsCount() { + return allowedResponseExtensions_.size(); + } + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from backend to client.
+   * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @param index The index of the element to return. + * @return The allowedResponseExtensions at the given index. + */ + public java.lang.String getAllowedResponseExtensions(int index) { + return allowedResponseExtensions_.get(index); + } + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from backend to client.
+   * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @param index The index of the value to return. + * @return The bytes of the allowedResponseExtensions at the given index. + */ + public com.google.protobuf.ByteString getAllowedResponseExtensionsBytes(int index) { + return allowedResponseExtensions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_); + } + for (int i = 0; i < requested_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requested_.getRaw(i)); + } + for (int i = 0; i < provided_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, provided_.getRaw(i)); + } + for (int i = 0; i < allowedRequestExtensions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 4, allowedRequestExtensions_.getRaw(i)); + } + for (int i = 0; i < allowedResponseExtensions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, allowedResponseExtensions_.getRaw(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(selector_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_); + } + { + int dataSize = 0; + for (int i = 0; i < requested_.size(); i++) { + dataSize += computeStringSizeNoTag(requested_.getRaw(i)); + } + size += dataSize; + size += 1 * getRequestedList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < provided_.size(); i++) { + dataSize += computeStringSizeNoTag(provided_.getRaw(i)); + } + size += dataSize; + size += 1 * getProvidedList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < allowedRequestExtensions_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedRequestExtensions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedRequestExtensionsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < allowedResponseExtensions_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedResponseExtensions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedResponseExtensionsList().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.api.ContextRule)) { + return super.equals(obj); + } + com.google.api.ContextRule other = (com.google.api.ContextRule) obj; + + if (!getSelector().equals(other.getSelector())) return false; + if (!getRequestedList().equals(other.getRequestedList())) return false; + if (!getProvidedList().equals(other.getProvidedList())) return false; + if (!getAllowedRequestExtensionsList().equals(other.getAllowedRequestExtensionsList())) + return false; + if (!getAllowedResponseExtensionsList().equals(other.getAllowedResponseExtensionsList())) + 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) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + if (getRequestedCount() > 0) { + hash = (37 * hash) + REQUESTED_FIELD_NUMBER; + hash = (53 * hash) + getRequestedList().hashCode(); + } + if (getProvidedCount() > 0) { + hash = (37 * hash) + PROVIDED_FIELD_NUMBER; + hash = (53 * hash) + getProvidedList().hashCode(); + } + if (getAllowedRequestExtensionsCount() > 0) { + hash = (37 * hash) + ALLOWED_REQUEST_EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedRequestExtensionsList().hashCode(); + } + if (getAllowedResponseExtensionsCount() > 0) { + hash = (37 * hash) + ALLOWED_RESPONSE_EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedResponseExtensionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.ContextRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ContextRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.ContextRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ContextRule 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.api.ContextRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ContextRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.ContextRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.ContextRule 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.api.ContextRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.ContextRule 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.api.ContextRule parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.ContextRule 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.api.ContextRule 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 context rule provides information about the context for an individual API
+   * element.
+   * 
+ * + * Protobuf type {@code google.api.ContextRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.ContextRule) + com.google.api.ContextRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ContextRule.class, com.google.api.ContextRule.Builder.class); + } + + // Construct using com.google.api.ContextRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selector_ = ""; + requested_ = com.google.protobuf.LazyStringArrayList.emptyList(); + provided_ = com.google.protobuf.LazyStringArrayList.emptyList(); + allowedRequestExtensions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + allowedResponseExtensions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; + } + + @java.lang.Override + public com.google.api.ContextRule getDefaultInstanceForType() { + return com.google.api.ContextRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.ContextRule build() { + com.google.api.ContextRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.ContextRule buildPartial() { + com.google.api.ContextRule result = new com.google.api.ContextRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.ContextRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selector_ = selector_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + requested_.makeImmutable(); + result.requested_ = requested_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + provided_.makeImmutable(); + result.provided_ = provided_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + allowedRequestExtensions_.makeImmutable(); + result.allowedRequestExtensions_ = allowedRequestExtensions_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + allowedResponseExtensions_.makeImmutable(); + result.allowedResponseExtensions_ = allowedResponseExtensions_; + } + } + + @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.api.ContextRule) { + return mergeFrom((com.google.api.ContextRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.ContextRule other) { + if (other == com.google.api.ContextRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.requested_.isEmpty()) { + if (requested_.isEmpty()) { + requested_ = other.requested_; + bitField0_ |= 0x00000002; + } else { + ensureRequestedIsMutable(); + requested_.addAll(other.requested_); + } + onChanged(); + } + if (!other.provided_.isEmpty()) { + if (provided_.isEmpty()) { + provided_ = other.provided_; + bitField0_ |= 0x00000004; + } else { + ensureProvidedIsMutable(); + provided_.addAll(other.provided_); + } + onChanged(); + } + if (!other.allowedRequestExtensions_.isEmpty()) { + if (allowedRequestExtensions_.isEmpty()) { + allowedRequestExtensions_ = other.allowedRequestExtensions_; + bitField0_ |= 0x00000008; + } else { + ensureAllowedRequestExtensionsIsMutable(); + allowedRequestExtensions_.addAll(other.allowedRequestExtensions_); + } + onChanged(); + } + if (!other.allowedResponseExtensions_.isEmpty()) { + if (allowedResponseExtensions_.isEmpty()) { + allowedResponseExtensions_ = other.allowedResponseExtensions_; + bitField0_ |= 0x00000010; + } else { + ensureAllowedResponseExtensionsIsMutable(); + allowedResponseExtensions_.addAll(other.allowedResponseExtensions_); + } + 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: + { + selector_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequestedIsMutable(); + requested_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProvidedIsMutable(); + provided_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowedRequestExtensionsIsMutable(); + allowedRequestExtensions_.add(s); + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowedResponseExtensionsIsMutable(); + allowedResponseExtensions_.add(s); + 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 selector_ = ""; + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return The selector. + */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @param value The selector to set. + * @return This builder for chaining. + */ + public Builder setSelector(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return This builder for chaining. + */ + public Builder clearSelector() { + selector_ = getDefaultInstance().getSelector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @param value The bytes for selector to set. + * @return This builder for chaining. + */ + public Builder setSelectorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList requested_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRequestedIsMutable() { + if (!requested_.isModifiable()) { + requested_ = new com.google.protobuf.LazyStringArrayList(requested_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * A list of full type names of requested contexts.
+     * 
+ * + * repeated string requested = 2; + * + * @return A list containing the requested. + */ + public com.google.protobuf.ProtocolStringList getRequestedList() { + requested_.makeImmutable(); + return requested_; + } + /** + * + * + *
+     * A list of full type names of requested contexts.
+     * 
+ * + * repeated string requested = 2; + * + * @return The count of requested. + */ + public int getRequestedCount() { + return requested_.size(); + } + /** + * + * + *
+     * A list of full type names of requested contexts.
+     * 
+ * + * repeated string requested = 2; + * + * @param index The index of the element to return. + * @return The requested at the given index. + */ + public java.lang.String getRequested(int index) { + return requested_.get(index); + } + /** + * + * + *
+     * A list of full type names of requested contexts.
+     * 
+ * + * repeated string requested = 2; + * + * @param index The index of the value to return. + * @return The bytes of the requested at the given index. + */ + public com.google.protobuf.ByteString getRequestedBytes(int index) { + return requested_.getByteString(index); + } + /** + * + * + *
+     * A list of full type names of requested contexts.
+     * 
+ * + * repeated string requested = 2; + * + * @param index The index to set the value at. + * @param value The requested to set. + * @return This builder for chaining. + */ + public Builder setRequested(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestedIsMutable(); + requested_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names of requested contexts.
+     * 
+ * + * repeated string requested = 2; + * + * @param value The requested to add. + * @return This builder for chaining. + */ + public Builder addRequested(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestedIsMutable(); + requested_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names of requested contexts.
+     * 
+ * + * repeated string requested = 2; + * + * @param values The requested to add. + * @return This builder for chaining. + */ + public Builder addAllRequested(java.lang.Iterable values) { + ensureRequestedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requested_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names of requested contexts.
+     * 
+ * + * repeated string requested = 2; + * + * @return This builder for chaining. + */ + public Builder clearRequested() { + requested_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names of requested contexts.
+     * 
+ * + * repeated string requested = 2; + * + * @param value The bytes of the requested to add. + * @return This builder for chaining. + */ + public Builder addRequestedBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRequestedIsMutable(); + requested_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList provided_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureProvidedIsMutable() { + if (!provided_.isModifiable()) { + provided_ = new com.google.protobuf.LazyStringArrayList(provided_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * A list of full type names of provided contexts.
+     * 
+ * + * repeated string provided = 3; + * + * @return A list containing the provided. + */ + public com.google.protobuf.ProtocolStringList getProvidedList() { + provided_.makeImmutable(); + return provided_; + } + /** + * + * + *
+     * A list of full type names of provided contexts.
+     * 
+ * + * repeated string provided = 3; + * + * @return The count of provided. + */ + public int getProvidedCount() { + return provided_.size(); + } + /** + * + * + *
+     * A list of full type names of provided contexts.
+     * 
+ * + * repeated string provided = 3; + * + * @param index The index of the element to return. + * @return The provided at the given index. + */ + public java.lang.String getProvided(int index) { + return provided_.get(index); + } + /** + * + * + *
+     * A list of full type names of provided contexts.
+     * 
+ * + * repeated string provided = 3; + * + * @param index The index of the value to return. + * @return The bytes of the provided at the given index. + */ + public com.google.protobuf.ByteString getProvidedBytes(int index) { + return provided_.getByteString(index); + } + /** + * + * + *
+     * A list of full type names of provided contexts.
+     * 
+ * + * repeated string provided = 3; + * + * @param index The index to set the value at. + * @param value The provided to set. + * @return This builder for chaining. + */ + public Builder setProvided(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidedIsMutable(); + provided_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names of provided contexts.
+     * 
+ * + * repeated string provided = 3; + * + * @param value The provided to add. + * @return This builder for chaining. + */ + public Builder addProvided(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidedIsMutable(); + provided_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names of provided contexts.
+     * 
+ * + * repeated string provided = 3; + * + * @param values The provided to add. + * @return This builder for chaining. + */ + public Builder addAllProvided(java.lang.Iterable values) { + ensureProvidedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, provided_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names of provided contexts.
+     * 
+ * + * repeated string provided = 3; + * + * @return This builder for chaining. + */ + public Builder clearProvided() { + provided_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names of provided contexts.
+     * 
+ * + * repeated string provided = 3; + * + * @param value The bytes of the provided to add. + * @return This builder for chaining. + */ + public Builder addProvidedBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProvidedIsMutable(); + provided_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList allowedRequestExtensions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAllowedRequestExtensionsIsMutable() { + if (!allowedRequestExtensions_.isModifiable()) { + allowedRequestExtensions_ = + new com.google.protobuf.LazyStringArrayList(allowedRequestExtensions_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from client to backend.
+     * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @return A list containing the allowedRequestExtensions. + */ + public com.google.protobuf.ProtocolStringList getAllowedRequestExtensionsList() { + allowedRequestExtensions_.makeImmutable(); + return allowedRequestExtensions_; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from client to backend.
+     * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @return The count of allowedRequestExtensions. + */ + public int getAllowedRequestExtensionsCount() { + return allowedRequestExtensions_.size(); + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from client to backend.
+     * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @param index The index of the element to return. + * @return The allowedRequestExtensions at the given index. + */ + public java.lang.String getAllowedRequestExtensions(int index) { + return allowedRequestExtensions_.get(index); + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from client to backend.
+     * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @param index The index of the value to return. + * @return The bytes of the allowedRequestExtensions at the given index. + */ + public com.google.protobuf.ByteString getAllowedRequestExtensionsBytes(int index) { + return allowedRequestExtensions_.getByteString(index); + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from client to backend.
+     * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @param index The index to set the value at. + * @param value The allowedRequestExtensions to set. + * @return This builder for chaining. + */ + public Builder setAllowedRequestExtensions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedRequestExtensionsIsMutable(); + allowedRequestExtensions_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from client to backend.
+     * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @param value The allowedRequestExtensions to add. + * @return This builder for chaining. + */ + public Builder addAllowedRequestExtensions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedRequestExtensionsIsMutable(); + allowedRequestExtensions_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from client to backend.
+     * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @param values The allowedRequestExtensions to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedRequestExtensions(java.lang.Iterable values) { + ensureAllowedRequestExtensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedRequestExtensions_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from client to backend.
+     * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @return This builder for chaining. + */ + public Builder clearAllowedRequestExtensions() { + allowedRequestExtensions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from client to backend.
+     * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @param value The bytes of the allowedRequestExtensions to add. + * @return This builder for chaining. + */ + public Builder addAllowedRequestExtensionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedRequestExtensionsIsMutable(); + allowedRequestExtensions_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList allowedResponseExtensions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAllowedResponseExtensionsIsMutable() { + if (!allowedResponseExtensions_.isModifiable()) { + allowedResponseExtensions_ = + new com.google.protobuf.LazyStringArrayList(allowedResponseExtensions_); + } + bitField0_ |= 0x00000010; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from backend to client.
+     * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @return A list containing the allowedResponseExtensions. + */ + public com.google.protobuf.ProtocolStringList getAllowedResponseExtensionsList() { + allowedResponseExtensions_.makeImmutable(); + return allowedResponseExtensions_; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from backend to client.
+     * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @return The count of allowedResponseExtensions. + */ + public int getAllowedResponseExtensionsCount() { + return allowedResponseExtensions_.size(); + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from backend to client.
+     * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @param index The index of the element to return. + * @return The allowedResponseExtensions at the given index. + */ + public java.lang.String getAllowedResponseExtensions(int index) { + return allowedResponseExtensions_.get(index); + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from backend to client.
+     * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @param index The index of the value to return. + * @return The bytes of the allowedResponseExtensions at the given index. + */ + public com.google.protobuf.ByteString getAllowedResponseExtensionsBytes(int index) { + return allowedResponseExtensions_.getByteString(index); + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from backend to client.
+     * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @param index The index to set the value at. + * @param value The allowedResponseExtensions to set. + * @return This builder for chaining. + */ + public Builder setAllowedResponseExtensions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedResponseExtensionsIsMutable(); + allowedResponseExtensions_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from backend to client.
+     * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @param value The allowedResponseExtensions to add. + * @return This builder for chaining. + */ + public Builder addAllowedResponseExtensions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedResponseExtensionsIsMutable(); + allowedResponseExtensions_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from backend to client.
+     * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @param values The allowedResponseExtensions to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedResponseExtensions(java.lang.Iterable values) { + ensureAllowedResponseExtensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedResponseExtensions_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from backend to client.
+     * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @return This builder for chaining. + */ + public Builder clearAllowedResponseExtensions() { + allowedResponseExtensions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * A list of full type names or extension IDs of extensions allowed in grpc
+     * side channel from backend to client.
+     * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @param value The bytes of the allowedResponseExtensions to add. + * @return This builder for chaining. + */ + public Builder addAllowedResponseExtensionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedResponseExtensionsIsMutable(); + allowedResponseExtensions_.add(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.api.ContextRule) + } + + // @@protoc_insertion_point(class_scope:google.api.ContextRule) + private static final com.google.api.ContextRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.ContextRule(); + } + + public static com.google.api.ContextRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContextRule 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.api.ContextRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextRuleOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextRuleOrBuilder.java new file mode 100644 index 000000000000..7ec5c4aa0e9d --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ContextRuleOrBuilder.java @@ -0,0 +1,268 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/context.proto + +package com.google.api; + +public interface ContextRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.ContextRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + java.lang.String getSelector(); + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + com.google.protobuf.ByteString getSelectorBytes(); + + /** + * + * + *
+   * A list of full type names of requested contexts.
+   * 
+ * + * repeated string requested = 2; + * + * @return A list containing the requested. + */ + java.util.List getRequestedList(); + /** + * + * + *
+   * A list of full type names of requested contexts.
+   * 
+ * + * repeated string requested = 2; + * + * @return The count of requested. + */ + int getRequestedCount(); + /** + * + * + *
+   * A list of full type names of requested contexts.
+   * 
+ * + * repeated string requested = 2; + * + * @param index The index of the element to return. + * @return The requested at the given index. + */ + java.lang.String getRequested(int index); + /** + * + * + *
+   * A list of full type names of requested contexts.
+   * 
+ * + * repeated string requested = 2; + * + * @param index The index of the value to return. + * @return The bytes of the requested at the given index. + */ + com.google.protobuf.ByteString getRequestedBytes(int index); + + /** + * + * + *
+   * A list of full type names of provided contexts.
+   * 
+ * + * repeated string provided = 3; + * + * @return A list containing the provided. + */ + java.util.List getProvidedList(); + /** + * + * + *
+   * A list of full type names of provided contexts.
+   * 
+ * + * repeated string provided = 3; + * + * @return The count of provided. + */ + int getProvidedCount(); + /** + * + * + *
+   * A list of full type names of provided contexts.
+   * 
+ * + * repeated string provided = 3; + * + * @param index The index of the element to return. + * @return The provided at the given index. + */ + java.lang.String getProvided(int index); + /** + * + * + *
+   * A list of full type names of provided contexts.
+   * 
+ * + * repeated string provided = 3; + * + * @param index The index of the value to return. + * @return The bytes of the provided at the given index. + */ + com.google.protobuf.ByteString getProvidedBytes(int index); + + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from client to backend.
+   * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @return A list containing the allowedRequestExtensions. + */ + java.util.List getAllowedRequestExtensionsList(); + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from client to backend.
+   * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @return The count of allowedRequestExtensions. + */ + int getAllowedRequestExtensionsCount(); + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from client to backend.
+   * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @param index The index of the element to return. + * @return The allowedRequestExtensions at the given index. + */ + java.lang.String getAllowedRequestExtensions(int index); + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from client to backend.
+   * 
+ * + * repeated string allowed_request_extensions = 4; + * + * @param index The index of the value to return. + * @return The bytes of the allowedRequestExtensions at the given index. + */ + com.google.protobuf.ByteString getAllowedRequestExtensionsBytes(int index); + + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from backend to client.
+   * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @return A list containing the allowedResponseExtensions. + */ + java.util.List getAllowedResponseExtensionsList(); + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from backend to client.
+   * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @return The count of allowedResponseExtensions. + */ + int getAllowedResponseExtensionsCount(); + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from backend to client.
+   * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @param index The index of the element to return. + * @return The allowedResponseExtensions at the given index. + */ + java.lang.String getAllowedResponseExtensions(int index); + /** + * + * + *
+   * A list of full type names or extension IDs of extensions allowed in grpc
+   * side channel from backend to client.
+   * 
+ * + * repeated string allowed_response_extensions = 5; + * + * @param index The index of the value to return. + * @return The bytes of the allowedResponseExtensions at the given index. + */ + com.google.protobuf.ByteString getAllowedResponseExtensionsBytes(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Control.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Control.java new file mode 100644 index 000000000000..646473e036d4 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Control.java @@ -0,0 +1,1130 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/control.proto + +package com.google.api; + +/** + * + * + *
+ * Selects and configures the service controller used by the service.
+ *
+ * Example:
+ *
+ *     control:
+ *       environment: servicecontrol.googleapis.com
+ * 
+ * + * Protobuf type {@code google.api.Control} + */ +public final class Control extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Control) + ControlOrBuilder { + private static final long serialVersionUID = 0L; + // Use Control.newBuilder() to construct. + private Control(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Control() { + environment_ = ""; + methodPolicies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Control(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ControlProto.internal_static_google_api_Control_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ControlProto.internal_static_google_api_Control_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Control.class, com.google.api.Control.Builder.class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * The service controller environment to use. If empty, no control plane
+   * feature (like quota and billing) will be enabled. The recommended value for
+   * most services is servicecontrol.googleapis.com
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * The service controller environment to use. If empty, no control plane
+   * feature (like quota and billing) will be enabled. The recommended value for
+   * most services is servicecontrol.googleapis.com
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METHOD_POLICIES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List methodPolicies_; + /** + * + * + *
+   * Defines policies applying to the API methods of the service.
+   * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + @java.lang.Override + public java.util.List getMethodPoliciesList() { + return methodPolicies_; + } + /** + * + * + *
+   * Defines policies applying to the API methods of the service.
+   * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + @java.lang.Override + public java.util.List + getMethodPoliciesOrBuilderList() { + return methodPolicies_; + } + /** + * + * + *
+   * Defines policies applying to the API methods of the service.
+   * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + @java.lang.Override + public int getMethodPoliciesCount() { + return methodPolicies_.size(); + } + /** + * + * + *
+   * Defines policies applying to the API methods of the service.
+   * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + @java.lang.Override + public com.google.api.MethodPolicy getMethodPolicies(int index) { + return methodPolicies_.get(index); + } + /** + * + * + *
+   * Defines policies applying to the API methods of the service.
+   * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + @java.lang.Override + public com.google.api.MethodPolicyOrBuilder getMethodPoliciesOrBuilder(int index) { + return methodPolicies_.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(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + for (int i = 0; i < methodPolicies_.size(); i++) { + output.writeMessage(4, methodPolicies_.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(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + for (int i = 0; i < methodPolicies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, methodPolicies_.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.api.Control)) { + return super.equals(obj); + } + com.google.api.Control other = (com.google.api.Control) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getMethodPoliciesList().equals(other.getMethodPoliciesList())) 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) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + if (getMethodPoliciesCount() > 0) { + hash = (37 * hash) + METHOD_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getMethodPoliciesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Control parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Control parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Control parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Control 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.api.Control parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Control parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Control parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Control 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.api.Control parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Control 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.api.Control parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Control 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.api.Control 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; + } + /** + * + * + *
+   * Selects and configures the service controller used by the service.
+   *
+   * Example:
+   *
+   *     control:
+   *       environment: servicecontrol.googleapis.com
+   * 
+ * + * Protobuf type {@code google.api.Control} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Control) + com.google.api.ControlOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ControlProto.internal_static_google_api_Control_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ControlProto.internal_static_google_api_Control_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Control.class, com.google.api.Control.Builder.class); + } + + // Construct using com.google.api.Control.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + if (methodPoliciesBuilder_ == null) { + methodPolicies_ = java.util.Collections.emptyList(); + } else { + methodPolicies_ = null; + methodPoliciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ControlProto.internal_static_google_api_Control_descriptor; + } + + @java.lang.Override + public com.google.api.Control getDefaultInstanceForType() { + return com.google.api.Control.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Control build() { + com.google.api.Control result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Control buildPartial() { + com.google.api.Control result = new com.google.api.Control(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Control result) { + if (methodPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + methodPolicies_ = java.util.Collections.unmodifiableList(methodPolicies_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.methodPolicies_ = methodPolicies_; + } else { + result.methodPolicies_ = methodPoliciesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Control result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + } + + @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.api.Control) { + return mergeFrom((com.google.api.Control) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Control other) { + if (other == com.google.api.Control.getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (methodPoliciesBuilder_ == null) { + if (!other.methodPolicies_.isEmpty()) { + if (methodPolicies_.isEmpty()) { + methodPolicies_ = other.methodPolicies_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMethodPoliciesIsMutable(); + methodPolicies_.addAll(other.methodPolicies_); + } + onChanged(); + } + } else { + if (!other.methodPolicies_.isEmpty()) { + if (methodPoliciesBuilder_.isEmpty()) { + methodPoliciesBuilder_.dispose(); + methodPoliciesBuilder_ = null; + methodPolicies_ = other.methodPolicies_; + bitField0_ = (bitField0_ & ~0x00000002); + methodPoliciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMethodPoliciesFieldBuilder() + : null; + } else { + methodPoliciesBuilder_.addAllMessages(other.methodPolicies_); + } + } + } + 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: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 34: + { + com.google.api.MethodPolicy m = + input.readMessage(com.google.api.MethodPolicy.parser(), extensionRegistry); + if (methodPoliciesBuilder_ == null) { + ensureMethodPoliciesIsMutable(); + methodPolicies_.add(m); + } else { + methodPoliciesBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * The service controller environment to use. If empty, no control plane
+     * feature (like quota and billing) will be enabled. The recommended value for
+     * most services is servicecontrol.googleapis.com
+     * 
+ * + * string environment = 1; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The service controller environment to use. If empty, no control plane
+     * feature (like quota and billing) will be enabled. The recommended value for
+     * most services is servicecontrol.googleapis.com
+     * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The service controller environment to use. If empty, no control plane
+     * feature (like quota and billing) will be enabled. The recommended value for
+     * most services is servicecontrol.googleapis.com
+     * 
+ * + * string environment = 1; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The service controller environment to use. If empty, no control plane
+     * feature (like quota and billing) will be enabled. The recommended value for
+     * most services is servicecontrol.googleapis.com
+     * 
+ * + * string environment = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The service controller environment to use. If empty, no control plane
+     * feature (like quota and billing) will be enabled. The recommended value for
+     * most services is servicecontrol.googleapis.com
+     * 
+ * + * string environment = 1; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List methodPolicies_ = + java.util.Collections.emptyList(); + + private void ensureMethodPoliciesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + methodPolicies_ = new java.util.ArrayList(methodPolicies_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.MethodPolicy, + com.google.api.MethodPolicy.Builder, + com.google.api.MethodPolicyOrBuilder> + methodPoliciesBuilder_; + + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public java.util.List getMethodPoliciesList() { + if (methodPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(methodPolicies_); + } else { + return methodPoliciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public int getMethodPoliciesCount() { + if (methodPoliciesBuilder_ == null) { + return methodPolicies_.size(); + } else { + return methodPoliciesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public com.google.api.MethodPolicy getMethodPolicies(int index) { + if (methodPoliciesBuilder_ == null) { + return methodPolicies_.get(index); + } else { + return methodPoliciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public Builder setMethodPolicies(int index, com.google.api.MethodPolicy value) { + if (methodPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodPoliciesIsMutable(); + methodPolicies_.set(index, value); + onChanged(); + } else { + methodPoliciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public Builder setMethodPolicies( + int index, com.google.api.MethodPolicy.Builder builderForValue) { + if (methodPoliciesBuilder_ == null) { + ensureMethodPoliciesIsMutable(); + methodPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + methodPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public Builder addMethodPolicies(com.google.api.MethodPolicy value) { + if (methodPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodPoliciesIsMutable(); + methodPolicies_.add(value); + onChanged(); + } else { + methodPoliciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public Builder addMethodPolicies(int index, com.google.api.MethodPolicy value) { + if (methodPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodPoliciesIsMutable(); + methodPolicies_.add(index, value); + onChanged(); + } else { + methodPoliciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public Builder addMethodPolicies(com.google.api.MethodPolicy.Builder builderForValue) { + if (methodPoliciesBuilder_ == null) { + ensureMethodPoliciesIsMutable(); + methodPolicies_.add(builderForValue.build()); + onChanged(); + } else { + methodPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public Builder addMethodPolicies( + int index, com.google.api.MethodPolicy.Builder builderForValue) { + if (methodPoliciesBuilder_ == null) { + ensureMethodPoliciesIsMutable(); + methodPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + methodPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public Builder addAllMethodPolicies( + java.lang.Iterable values) { + if (methodPoliciesBuilder_ == null) { + ensureMethodPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, methodPolicies_); + onChanged(); + } else { + methodPoliciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public Builder clearMethodPolicies() { + if (methodPoliciesBuilder_ == null) { + methodPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + methodPoliciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public Builder removeMethodPolicies(int index) { + if (methodPoliciesBuilder_ == null) { + ensureMethodPoliciesIsMutable(); + methodPolicies_.remove(index); + onChanged(); + } else { + methodPoliciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public com.google.api.MethodPolicy.Builder getMethodPoliciesBuilder(int index) { + return getMethodPoliciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public com.google.api.MethodPolicyOrBuilder getMethodPoliciesOrBuilder(int index) { + if (methodPoliciesBuilder_ == null) { + return methodPolicies_.get(index); + } else { + return methodPoliciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public java.util.List + getMethodPoliciesOrBuilderList() { + if (methodPoliciesBuilder_ != null) { + return methodPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(methodPolicies_); + } + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public com.google.api.MethodPolicy.Builder addMethodPoliciesBuilder() { + return getMethodPoliciesFieldBuilder() + .addBuilder(com.google.api.MethodPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public com.google.api.MethodPolicy.Builder addMethodPoliciesBuilder(int index) { + return getMethodPoliciesFieldBuilder() + .addBuilder(index, com.google.api.MethodPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Defines policies applying to the API methods of the service.
+     * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + public java.util.List getMethodPoliciesBuilderList() { + return getMethodPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.MethodPolicy, + com.google.api.MethodPolicy.Builder, + com.google.api.MethodPolicyOrBuilder> + getMethodPoliciesFieldBuilder() { + if (methodPoliciesBuilder_ == null) { + methodPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.MethodPolicy, + com.google.api.MethodPolicy.Builder, + com.google.api.MethodPolicyOrBuilder>( + methodPolicies_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + methodPolicies_ = null; + } + return methodPoliciesBuilder_; + } + + @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.api.Control) + } + + // @@protoc_insertion_point(class_scope:google.api.Control) + private static final com.google.api.Control DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Control(); + } + + public static com.google.api.Control getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Control 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.api.Control getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ControlOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ControlOrBuilder.java new file mode 100644 index 000000000000..d2be99afbc9f --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ControlOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/control.proto + +package com.google.api; + +public interface ControlOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Control) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The service controller environment to use. If empty, no control plane
+   * feature (like quota and billing) will be enabled. The recommended value for
+   * most services is servicecontrol.googleapis.com
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * The service controller environment to use. If empty, no control plane
+   * feature (like quota and billing) will be enabled. The recommended value for
+   * most services is servicecontrol.googleapis.com
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * Defines policies applying to the API methods of the service.
+   * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + java.util.List getMethodPoliciesList(); + /** + * + * + *
+   * Defines policies applying to the API methods of the service.
+   * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + com.google.api.MethodPolicy getMethodPolicies(int index); + /** + * + * + *
+   * Defines policies applying to the API methods of the service.
+   * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + int getMethodPoliciesCount(); + /** + * + * + *
+   * Defines policies applying to the API methods of the service.
+   * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + java.util.List getMethodPoliciesOrBuilderList(); + /** + * + * + *
+   * Defines policies applying to the API methods of the service.
+   * 
+ * + * repeated .google.api.MethodPolicy method_policies = 4; + */ + com.google.api.MethodPolicyOrBuilder getMethodPoliciesOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ControlProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ControlProto.java new file mode 100644 index 000000000000..ef52a688e296 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ControlProto.java @@ -0,0 +1,68 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/control.proto + +package com.google.api; + +public final class ControlProto { + private ControlProto() {} + + 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_api_Control_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Control_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\030google/api/control.proto\022\ngoogle.api\032\027" + + "google/api/policy.proto\"Q\n\007Control\022\023\n\013en" + + "vironment\030\001 \001(\t\0221\n\017method_policies\030\004 \003(\013" + + "2\030.google.api.MethodPolicyBn\n\016com.google" + + ".apiB\014ControlProtoP\001ZEgoogle.golang.org/" + + "genproto/googleapis/api/serviceconfig;se" + + "rviceconfig\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.PolicyProto.getDescriptor(), + }); + internal_static_google_api_Control_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Control_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Control_descriptor, + new java.lang.String[] { + "Environment", "MethodPolicies", + }); + com.google.api.PolicyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CppSettings.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CppSettings.java new file mode 100644 index 000000000000..e599a43a05fa --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CppSettings.java @@ -0,0 +1,690 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * Settings for C++ client libraries.
+ * 
+ * + * Protobuf type {@code google.api.CppSettings} + */ +public final class CppSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.CppSettings) + CppSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CppSettings.newBuilder() to construct. + private CppSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CppSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CppSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_CppSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_CppSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CppSettings.class, com.google.api.CppSettings.Builder.class); + } + + public static final int COMMON_FIELD_NUMBER = 1; + private com.google.api.CommonLanguageSettings common_; + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + @java.lang.Override + public com.google.api.CommonLanguageSettings getCommon() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + @java.lang.Override + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + + 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 (common_ != null) { + output.writeMessage(1, getCommon()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommon()); + } + 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.api.CppSettings)) { + return super.equals(obj); + } + com.google.api.CppSettings other = (com.google.api.CppSettings) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon().equals(other.getCommon())) 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 (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.CppSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.CppSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.CppSettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.CppSettings 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.api.CppSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.CppSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.CppSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.CppSettings 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.api.CppSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.CppSettings 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.api.CppSettings parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.CppSettings 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.api.CppSettings 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; + } + /** + * + * + *
+   * Settings for C++ client libraries.
+   * 
+ * + * Protobuf type {@code google.api.CppSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.CppSettings) + com.google.api.CppSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_CppSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_CppSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CppSettings.class, com.google.api.CppSettings.Builder.class); + } + + // Construct using com.google.api.CppSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto.internal_static_google_api_CppSettings_descriptor; + } + + @java.lang.Override + public com.google.api.CppSettings getDefaultInstanceForType() { + return com.google.api.CppSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.CppSettings build() { + com.google.api.CppSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.CppSettings buildPartial() { + com.google.api.CppSettings result = new com.google.api.CppSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.CppSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null ? common_ : commonBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.CppSettings) { + return mergeFrom((com.google.api.CppSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.CppSettings other) { + if (other == com.google.api.CppSettings.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + 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(getCommonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.api.CommonLanguageSettings common_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + commonBuilder_; + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + public com.google.api.CommonLanguageSettings getCommon() { + if (commonBuilder_ == null) { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder mergeCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && common_ != null + && common_ != com.google.api.CommonLanguageSettings.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettings.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder>( + getCommon(), getParentForChildren(), isClean()); + common_ = null; + } + return commonBuilder_; + } + + @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.api.CppSettings) + } + + // @@protoc_insertion_point(class_scope:google.api.CppSettings) + private static final com.google.api.CppSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.CppSettings(); + } + + public static com.google.api.CppSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CppSettings 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.api.CppSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CppSettingsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CppSettingsOrBuilder.java new file mode 100644 index 000000000000..7d61e6c30fea --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CppSettingsOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface CppSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.CppSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + com.google.api.CommonLanguageSettings getCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CustomHttpPattern.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CustomHttpPattern.java new file mode 100644 index 000000000000..da0a37a65d50 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CustomHttpPattern.java @@ -0,0 +1,797 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * + * + *
+ * A custom pattern is used for defining custom HTTP verb.
+ * 
+ * + * Protobuf type {@code google.api.CustomHttpPattern} + */ +public final class CustomHttpPattern extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.CustomHttpPattern) + CustomHttpPatternOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomHttpPattern.newBuilder() to construct. + private CustomHttpPattern(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomHttpPattern() { + kind_ = ""; + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomHttpPattern(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class); + } + + public static final int KIND_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; + /** + * + * + *
+   * The name of this custom HTTP verb.
+   * 
+ * + * string kind = 1; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + /** + * + * + *
+   * The name of this custom HTTP verb.
+   * 
+ * + * string kind = 1; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + * + * + *
+   * The path matched by this custom verb.
+   * 
+ * + * string path = 2; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * The path matched by this custom verb.
+   * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(kind_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_); + } + 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(kind_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_); + } + 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.api.CustomHttpPattern)) { + return super.equals(obj); + } + com.google.api.CustomHttpPattern other = (com.google.api.CustomHttpPattern) obj; + + if (!getKind().equals(other.getKind())) return false; + if (!getPath().equals(other.getPath())) 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) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.CustomHttpPattern parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.CustomHttpPattern parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.CustomHttpPattern parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.CustomHttpPattern 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.api.CustomHttpPattern parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.CustomHttpPattern parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.CustomHttpPattern parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.CustomHttpPattern 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.api.CustomHttpPattern parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.CustomHttpPattern 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.api.CustomHttpPattern parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.CustomHttpPattern 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.api.CustomHttpPattern 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 custom pattern is used for defining custom HTTP verb.
+   * 
+ * + * Protobuf type {@code google.api.CustomHttpPattern} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.CustomHttpPattern) + com.google.api.CustomHttpPatternOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto + .internal_static_google_api_CustomHttpPattern_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.CustomHttpPattern.class, + com.google.api.CustomHttpPattern.Builder.class); + } + + // Construct using com.google.api.CustomHttpPattern.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kind_ = ""; + path_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; + } + + @java.lang.Override + public com.google.api.CustomHttpPattern getDefaultInstanceForType() { + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.CustomHttpPattern build() { + com.google.api.CustomHttpPattern result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.CustomHttpPattern buildPartial() { + com.google.api.CustomHttpPattern result = new com.google.api.CustomHttpPattern(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.CustomHttpPattern result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kind_ = kind_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.path_ = path_; + } + } + + @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.api.CustomHttpPattern) { + return mergeFrom((com.google.api.CustomHttpPattern) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.CustomHttpPattern other) { + if (other == com.google.api.CustomHttpPattern.getDefaultInstance()) return this; + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + 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: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + path_ = 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 kind_ = ""; + /** + * + * + *
+     * The name of this custom HTTP verb.
+     * 
+ * + * string kind = 1; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of this custom HTTP verb.
+     * 
+ * + * string kind = 1; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of this custom HTTP verb.
+     * 
+ * + * string kind = 1; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this custom HTTP verb.
+     * 
+ * + * string kind = 1; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + kind_ = getDefaultInstance().getKind(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this custom HTTP verb.
+     * 
+ * + * string kind = 1; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kind_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * The path matched by this custom verb.
+     * 
+ * + * string path = 2; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The path matched by this custom verb.
+     * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The path matched by this custom verb.
+     * 
+ * + * string path = 2; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The path matched by this custom verb.
+     * 
+ * + * string path = 2; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The path matched by this custom verb.
+     * 
+ * + * string path = 2; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @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.api.CustomHttpPattern) + } + + // @@protoc_insertion_point(class_scope:google.api.CustomHttpPattern) + private static final com.google.api.CustomHttpPattern DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.CustomHttpPattern(); + } + + public static com.google.api.CustomHttpPattern getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomHttpPattern 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.api.CustomHttpPattern getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java new file mode 100644 index 000000000000..a3c0fb4ea824 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface CustomHttpPatternOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.CustomHttpPattern) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of this custom HTTP verb.
+   * 
+ * + * string kind = 1; + * + * @return The kind. + */ + java.lang.String getKind(); + /** + * + * + *
+   * The name of this custom HTTP verb.
+   * 
+ * + * string kind = 1; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + /** + * + * + *
+   * The path matched by this custom verb.
+   * 
+ * + * string path = 2; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * The path matched by this custom verb.
+   * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Distribution.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Distribution.java new file mode 100644 index 000000000000..052b977ed5ba --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Distribution.java @@ -0,0 +1,8361 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/distribution.proto + +package com.google.api; + +/** + * + * + *
+ * `Distribution` contains summary statistics for a population of values. It
+ * optionally contains a histogram representing the distribution of those values
+ * across a set of buckets.
+ *
+ * The summary statistics are the count, mean, sum of the squared deviation from
+ * the mean, the minimum, and the maximum of the set of population of values.
+ * The histogram is based on a sequence of buckets and gives a count of values
+ * that fall into each bucket. The boundaries of the buckets are given either
+ * explicitly or by formulas for buckets of fixed or exponentially increasing
+ * widths.
+ *
+ * Although it is not forbidden, it is generally a bad idea to include
+ * non-finite values (infinities or NaNs) in the population of values, as this
+ * will render the `mean` and `sum_of_squared_deviation` fields meaningless.
+ * 
+ * + * Protobuf type {@code google.api.Distribution} + */ +public final class Distribution extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Distribution) + DistributionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Distribution.newBuilder() to construct. + private Distribution(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Distribution() { + bucketCounts_ = emptyLongList(); + exemplars_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Distribution(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto.internal_static_google_api_Distribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.class, com.google.api.Distribution.Builder.class); + } + + public interface RangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Distribution.Range) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The minimum of the population values.
+     * 
+ * + * double min = 1; + * + * @return The min. + */ + double getMin(); + + /** + * + * + *
+     * The maximum of the population values.
+     * 
+ * + * double max = 2; + * + * @return The max. + */ + double getMax(); + } + /** + * + * + *
+   * The range of the population values.
+   * 
+ * + * Protobuf type {@code google.api.Distribution.Range} + */ + public static final class Range extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Distribution.Range) + RangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Range.newBuilder() to construct. + private Range(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Range() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Range(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.Range.class, + com.google.api.Distribution.Range.Builder.class); + } + + public static final int MIN_FIELD_NUMBER = 1; + private double min_ = 0D; + /** + * + * + *
+     * The minimum of the population values.
+     * 
+ * + * double min = 1; + * + * @return The min. + */ + @java.lang.Override + public double getMin() { + return min_; + } + + public static final int MAX_FIELD_NUMBER = 2; + private double max_ = 0D; + /** + * + * + *
+     * The maximum of the population values.
+     * 
+ * + * double max = 2; + * + * @return The max. + */ + @java.lang.Override + public double getMax() { + return max_; + } + + 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.Double.doubleToRawLongBits(min_) != 0) { + output.writeDouble(1, min_); + } + if (java.lang.Double.doubleToRawLongBits(max_) != 0) { + output.writeDouble(2, max_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(min_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, min_); + } + if (java.lang.Double.doubleToRawLongBits(max_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, max_); + } + 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.api.Distribution.Range)) { + return super.equals(obj); + } + com.google.api.Distribution.Range other = (com.google.api.Distribution.Range) obj; + + if (java.lang.Double.doubleToLongBits(getMin()) + != java.lang.Double.doubleToLongBits(other.getMin())) return false; + if (java.lang.Double.doubleToLongBits(getMax()) + != java.lang.Double.doubleToLongBits(other.getMax())) 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) + MIN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMin())); + hash = (37 * hash) + MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMax())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Distribution.Range parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.Range parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.Range parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.Range 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.api.Distribution.Range parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.Range parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.Range parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.Range 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.api.Distribution.Range parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.Range 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.api.Distribution.Range parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.Range 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.api.Distribution.Range prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The range of the population values.
+     * 
+ * + * Protobuf type {@code google.api.Distribution.Range} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Distribution.Range) + com.google.api.Distribution.RangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.Range.class, + com.google.api.Distribution.Range.Builder.class); + } + + // Construct using com.google.api.Distribution.Range.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + min_ = 0D; + max_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_Range_descriptor; + } + + @java.lang.Override + public com.google.api.Distribution.Range getDefaultInstanceForType() { + return com.google.api.Distribution.Range.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Distribution.Range build() { + com.google.api.Distribution.Range result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Distribution.Range buildPartial() { + com.google.api.Distribution.Range result = new com.google.api.Distribution.Range(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Distribution.Range result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.min_ = min_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.max_ = max_; + } + } + + @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.api.Distribution.Range) { + return mergeFrom((com.google.api.Distribution.Range) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Distribution.Range other) { + if (other == com.google.api.Distribution.Range.getDefaultInstance()) return this; + if (other.getMin() != 0D) { + setMin(other.getMin()); + } + if (other.getMax() != 0D) { + setMax(other.getMax()); + } + 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 9: + { + min_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + max_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // 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 double min_; + /** + * + * + *
+       * The minimum of the population values.
+       * 
+ * + * double min = 1; + * + * @return The min. + */ + @java.lang.Override + public double getMin() { + return min_; + } + /** + * + * + *
+       * The minimum of the population values.
+       * 
+ * + * double min = 1; + * + * @param value The min to set. + * @return This builder for chaining. + */ + public Builder setMin(double value) { + + min_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The minimum of the population values.
+       * 
+ * + * double min = 1; + * + * @return This builder for chaining. + */ + public Builder clearMin() { + bitField0_ = (bitField0_ & ~0x00000001); + min_ = 0D; + onChanged(); + return this; + } + + private double max_; + /** + * + * + *
+       * The maximum of the population values.
+       * 
+ * + * double max = 2; + * + * @return The max. + */ + @java.lang.Override + public double getMax() { + return max_; + } + /** + * + * + *
+       * The maximum of the population values.
+       * 
+ * + * double max = 2; + * + * @param value The max to set. + * @return This builder for chaining. + */ + public Builder setMax(double value) { + + max_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum of the population values.
+       * 
+ * + * double max = 2; + * + * @return This builder for chaining. + */ + public Builder clearMax() { + bitField0_ = (bitField0_ & ~0x00000002); + max_ = 0D; + 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.api.Distribution.Range) + } + + // @@protoc_insertion_point(class_scope:google.api.Distribution.Range) + private static final com.google.api.Distribution.Range DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Distribution.Range(); + } + + public static com.google.api.Distribution.Range getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Range 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.api.Distribution.Range getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BucketOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Distribution.BucketOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The linear bucket.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + * + * @return Whether the linearBuckets field is set. + */ + boolean hasLinearBuckets(); + /** + * + * + *
+     * The linear bucket.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + * + * @return The linearBuckets. + */ + com.google.api.Distribution.BucketOptions.Linear getLinearBuckets(); + /** + * + * + *
+     * The linear bucket.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + */ + com.google.api.Distribution.BucketOptions.LinearOrBuilder getLinearBucketsOrBuilder(); + + /** + * + * + *
+     * The exponential buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + * + * @return Whether the exponentialBuckets field is set. + */ + boolean hasExponentialBuckets(); + /** + * + * + *
+     * The exponential buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + * + * @return The exponentialBuckets. + */ + com.google.api.Distribution.BucketOptions.Exponential getExponentialBuckets(); + /** + * + * + *
+     * The exponential buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + */ + com.google.api.Distribution.BucketOptions.ExponentialOrBuilder getExponentialBucketsOrBuilder(); + + /** + * + * + *
+     * The explicit buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + * + * @return Whether the explicitBuckets field is set. + */ + boolean hasExplicitBuckets(); + /** + * + * + *
+     * The explicit buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + * + * @return The explicitBuckets. + */ + com.google.api.Distribution.BucketOptions.Explicit getExplicitBuckets(); + /** + * + * + *
+     * The explicit buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + */ + com.google.api.Distribution.BucketOptions.ExplicitOrBuilder getExplicitBucketsOrBuilder(); + + com.google.api.Distribution.BucketOptions.OptionsCase getOptionsCase(); + } + /** + * + * + *
+   * `BucketOptions` describes the bucket boundaries used to create a histogram
+   * for the distribution. The buckets can be in a linear sequence, an
+   * exponential sequence, or each bucket can be specified explicitly.
+   * `BucketOptions` does not include the number of values in each bucket.
+   *
+   * A bucket has an inclusive lower bound and exclusive upper bound for the
+   * values that are counted for that bucket. The upper bound of a bucket must
+   * be strictly greater than the lower bound. The sequence of N buckets for a
+   * distribution consists of an underflow bucket (number 0), zero or more
+   * finite buckets (number 1 through N - 2) and an overflow bucket (number N -
+   * 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the
+   * same as the upper bound of bucket i - 1. The buckets span the whole range
+   * of finite values: lower bound of the underflow bucket is -infinity and the
+   * upper bound of the overflow bucket is +infinity. The finite buckets are
+   * so-called because both bounds are finite.
+   * 
+ * + * Protobuf type {@code google.api.Distribution.BucketOptions} + */ + public static final class BucketOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions) + BucketOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use BucketOptions.newBuilder() to construct. + private BucketOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BucketOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BucketOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.BucketOptions.class, + com.google.api.Distribution.BucketOptions.Builder.class); + } + + public interface LinearOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Distribution.BucketOptions.Linear) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Must be greater than 0.
+       * 
+ * + * int32 num_finite_buckets = 1; + * + * @return The numFiniteBuckets. + */ + int getNumFiniteBuckets(); + + /** + * + * + *
+       * Must be greater than 0.
+       * 
+ * + * double width = 2; + * + * @return The width. + */ + double getWidth(); + + /** + * + * + *
+       * Lower bound of the first bucket.
+       * 
+ * + * double offset = 3; + * + * @return The offset. + */ + double getOffset(); + } + /** + * + * + *
+     * Specifies a linear sequence of buckets that all have the same width
+     * (except overflow and underflow). Each bucket represents a constant
+     * absolute uncertainty on the specific value in the bucket.
+     *
+     * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
+     * following boundaries:
+     *
+     *    Upper bound (0 <= i < N-1):     offset + (width * i).
+     *
+     *    Lower bound (1 <= i < N):       offset + (width * (i - 1)).
+     * 
+ * + * Protobuf type {@code google.api.Distribution.BucketOptions.Linear} + */ + public static final class Linear extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions.Linear) + LinearOrBuilder { + private static final long serialVersionUID = 0L; + // Use Linear.newBuilder() to construct. + private Linear(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Linear() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Linear(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Linear_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Linear_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.BucketOptions.Linear.class, + com.google.api.Distribution.BucketOptions.Linear.Builder.class); + } + + public static final int NUM_FINITE_BUCKETS_FIELD_NUMBER = 1; + private int numFiniteBuckets_ = 0; + /** + * + * + *
+       * Must be greater than 0.
+       * 
+ * + * int32 num_finite_buckets = 1; + * + * @return The numFiniteBuckets. + */ + @java.lang.Override + public int getNumFiniteBuckets() { + return numFiniteBuckets_; + } + + public static final int WIDTH_FIELD_NUMBER = 2; + private double width_ = 0D; + /** + * + * + *
+       * Must be greater than 0.
+       * 
+ * + * double width = 2; + * + * @return The width. + */ + @java.lang.Override + public double getWidth() { + return width_; + } + + public static final int OFFSET_FIELD_NUMBER = 3; + private double offset_ = 0D; + /** + * + * + *
+       * Lower bound of the first bucket.
+       * 
+ * + * double offset = 3; + * + * @return The offset. + */ + @java.lang.Override + public double getOffset() { + return offset_; + } + + 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 (numFiniteBuckets_ != 0) { + output.writeInt32(1, numFiniteBuckets_); + } + if (java.lang.Double.doubleToRawLongBits(width_) != 0) { + output.writeDouble(2, width_); + } + if (java.lang.Double.doubleToRawLongBits(offset_) != 0) { + output.writeDouble(3, offset_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (numFiniteBuckets_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, numFiniteBuckets_); + } + if (java.lang.Double.doubleToRawLongBits(width_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, width_); + } + if (java.lang.Double.doubleToRawLongBits(offset_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, offset_); + } + 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.api.Distribution.BucketOptions.Linear)) { + return super.equals(obj); + } + com.google.api.Distribution.BucketOptions.Linear other = + (com.google.api.Distribution.BucketOptions.Linear) obj; + + if (getNumFiniteBuckets() != other.getNumFiniteBuckets()) return false; + if (java.lang.Double.doubleToLongBits(getWidth()) + != java.lang.Double.doubleToLongBits(other.getWidth())) return false; + if (java.lang.Double.doubleToLongBits(getOffset()) + != java.lang.Double.doubleToLongBits(other.getOffset())) 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) + NUM_FINITE_BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getNumFiniteBuckets(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getWidth())); + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getOffset())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Distribution.BucketOptions.Linear parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions.Linear parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.BucketOptions.Linear parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions.Linear 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.api.Distribution.BucketOptions.Linear parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions.Linear parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.BucketOptions.Linear parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions.Linear 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.api.Distribution.BucketOptions.Linear parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions.Linear 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.api.Distribution.BucketOptions.Linear parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions.Linear 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.api.Distribution.BucketOptions.Linear 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; + } + /** + * + * + *
+       * Specifies a linear sequence of buckets that all have the same width
+       * (except overflow and underflow). Each bucket represents a constant
+       * absolute uncertainty on the specific value in the bucket.
+       *
+       * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
+       * following boundaries:
+       *
+       *    Upper bound (0 <= i < N-1):     offset + (width * i).
+       *
+       *    Lower bound (1 <= i < N):       offset + (width * (i - 1)).
+       * 
+ * + * Protobuf type {@code google.api.Distribution.BucketOptions.Linear} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions.Linear) + com.google.api.Distribution.BucketOptions.LinearOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Linear_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Linear_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.BucketOptions.Linear.class, + com.google.api.Distribution.BucketOptions.Linear.Builder.class); + } + + // Construct using com.google.api.Distribution.BucketOptions.Linear.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + numFiniteBuckets_ = 0; + width_ = 0D; + offset_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Linear_descriptor; + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Linear getDefaultInstanceForType() { + return com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Linear build() { + com.google.api.Distribution.BucketOptions.Linear result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Linear buildPartial() { + com.google.api.Distribution.BucketOptions.Linear result = + new com.google.api.Distribution.BucketOptions.Linear(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Distribution.BucketOptions.Linear result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.numFiniteBuckets_ = numFiniteBuckets_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.offset_ = offset_; + } + } + + @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.api.Distribution.BucketOptions.Linear) { + return mergeFrom((com.google.api.Distribution.BucketOptions.Linear) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Distribution.BucketOptions.Linear other) { + if (other == com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance()) + return this; + if (other.getNumFiniteBuckets() != 0) { + setNumFiniteBuckets(other.getNumFiniteBuckets()); + } + if (other.getWidth() != 0D) { + setWidth(other.getWidth()); + } + if (other.getOffset() != 0D) { + setOffset(other.getOffset()); + } + 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: + { + numFiniteBuckets_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: + { + width_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + offset_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // 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 numFiniteBuckets_; + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * int32 num_finite_buckets = 1; + * + * @return The numFiniteBuckets. + */ + @java.lang.Override + public int getNumFiniteBuckets() { + return numFiniteBuckets_; + } + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * int32 num_finite_buckets = 1; + * + * @param value The numFiniteBuckets to set. + * @return This builder for chaining. + */ + public Builder setNumFiniteBuckets(int value) { + + numFiniteBuckets_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * int32 num_finite_buckets = 1; + * + * @return This builder for chaining. + */ + public Builder clearNumFiniteBuckets() { + bitField0_ = (bitField0_ & ~0x00000001); + numFiniteBuckets_ = 0; + onChanged(); + return this; + } + + private double width_; + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * double width = 2; + * + * @return The width. + */ + @java.lang.Override + public double getWidth() { + return width_; + } + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * double width = 2; + * + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(double value) { + + width_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * double width = 2; + * + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000002); + width_ = 0D; + onChanged(); + return this; + } + + private double offset_; + /** + * + * + *
+         * Lower bound of the first bucket.
+         * 
+ * + * double offset = 3; + * + * @return The offset. + */ + @java.lang.Override + public double getOffset() { + return offset_; + } + /** + * + * + *
+         * Lower bound of the first bucket.
+         * 
+ * + * double offset = 3; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(double value) { + + offset_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Lower bound of the first bucket.
+         * 
+ * + * double offset = 3; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000004); + offset_ = 0D; + 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.api.Distribution.BucketOptions.Linear) + } + + // @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Linear) + private static final com.google.api.Distribution.BucketOptions.Linear DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Distribution.BucketOptions.Linear(); + } + + public static com.google.api.Distribution.BucketOptions.Linear getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Linear 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.api.Distribution.BucketOptions.Linear getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExponentialOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Distribution.BucketOptions.Exponential) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Must be greater than 0.
+       * 
+ * + * int32 num_finite_buckets = 1; + * + * @return The numFiniteBuckets. + */ + int getNumFiniteBuckets(); + + /** + * + * + *
+       * Must be greater than 1.
+       * 
+ * + * double growth_factor = 2; + * + * @return The growthFactor. + */ + double getGrowthFactor(); + + /** + * + * + *
+       * Must be greater than 0.
+       * 
+ * + * double scale = 3; + * + * @return The scale. + */ + double getScale(); + } + /** + * + * + *
+     * Specifies an exponential sequence of buckets that have a width that is
+     * proportional to the value of the lower bound. Each bucket represents a
+     * constant relative uncertainty on a specific value in the bucket.
+     *
+     * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
+     * following boundaries:
+     *
+     *    Upper bound (0 <= i < N-1):     scale * (growth_factor ^ i).
+     *
+     *    Lower bound (1 <= i < N):       scale * (growth_factor ^ (i - 1)).
+     * 
+ * + * Protobuf type {@code google.api.Distribution.BucketOptions.Exponential} + */ + public static final class Exponential extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions.Exponential) + ExponentialOrBuilder { + private static final long serialVersionUID = 0L; + // Use Exponential.newBuilder() to construct. + private Exponential(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Exponential() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Exponential(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Exponential_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Exponential_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.BucketOptions.Exponential.class, + com.google.api.Distribution.BucketOptions.Exponential.Builder.class); + } + + public static final int NUM_FINITE_BUCKETS_FIELD_NUMBER = 1; + private int numFiniteBuckets_ = 0; + /** + * + * + *
+       * Must be greater than 0.
+       * 
+ * + * int32 num_finite_buckets = 1; + * + * @return The numFiniteBuckets. + */ + @java.lang.Override + public int getNumFiniteBuckets() { + return numFiniteBuckets_; + } + + public static final int GROWTH_FACTOR_FIELD_NUMBER = 2; + private double growthFactor_ = 0D; + /** + * + * + *
+       * Must be greater than 1.
+       * 
+ * + * double growth_factor = 2; + * + * @return The growthFactor. + */ + @java.lang.Override + public double getGrowthFactor() { + return growthFactor_; + } + + public static final int SCALE_FIELD_NUMBER = 3; + private double scale_ = 0D; + /** + * + * + *
+       * Must be greater than 0.
+       * 
+ * + * double scale = 3; + * + * @return The scale. + */ + @java.lang.Override + public double getScale() { + return scale_; + } + + 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 (numFiniteBuckets_ != 0) { + output.writeInt32(1, numFiniteBuckets_); + } + if (java.lang.Double.doubleToRawLongBits(growthFactor_) != 0) { + output.writeDouble(2, growthFactor_); + } + if (java.lang.Double.doubleToRawLongBits(scale_) != 0) { + output.writeDouble(3, scale_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (numFiniteBuckets_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, numFiniteBuckets_); + } + if (java.lang.Double.doubleToRawLongBits(growthFactor_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, growthFactor_); + } + if (java.lang.Double.doubleToRawLongBits(scale_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, scale_); + } + 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.api.Distribution.BucketOptions.Exponential)) { + return super.equals(obj); + } + com.google.api.Distribution.BucketOptions.Exponential other = + (com.google.api.Distribution.BucketOptions.Exponential) obj; + + if (getNumFiniteBuckets() != other.getNumFiniteBuckets()) return false; + if (java.lang.Double.doubleToLongBits(getGrowthFactor()) + != java.lang.Double.doubleToLongBits(other.getGrowthFactor())) return false; + if (java.lang.Double.doubleToLongBits(getScale()) + != java.lang.Double.doubleToLongBits(other.getScale())) 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) + NUM_FINITE_BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getNumFiniteBuckets(); + hash = (37 * hash) + GROWTH_FACTOR_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getGrowthFactor())); + hash = (37 * hash) + SCALE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getScale())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Distribution.BucketOptions.Exponential parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions.Exponential parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.BucketOptions.Exponential parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions.Exponential 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.api.Distribution.BucketOptions.Exponential parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions.Exponential parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.BucketOptions.Exponential parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions.Exponential 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.api.Distribution.BucketOptions.Exponential parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions.Exponential 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.api.Distribution.BucketOptions.Exponential parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions.Exponential 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.api.Distribution.BucketOptions.Exponential 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; + } + /** + * + * + *
+       * Specifies an exponential sequence of buckets that have a width that is
+       * proportional to the value of the lower bound. Each bucket represents a
+       * constant relative uncertainty on a specific value in the bucket.
+       *
+       * There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the
+       * following boundaries:
+       *
+       *    Upper bound (0 <= i < N-1):     scale * (growth_factor ^ i).
+       *
+       *    Lower bound (1 <= i < N):       scale * (growth_factor ^ (i - 1)).
+       * 
+ * + * Protobuf type {@code google.api.Distribution.BucketOptions.Exponential} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions.Exponential) + com.google.api.Distribution.BucketOptions.ExponentialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Exponential_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Exponential_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.BucketOptions.Exponential.class, + com.google.api.Distribution.BucketOptions.Exponential.Builder.class); + } + + // Construct using com.google.api.Distribution.BucketOptions.Exponential.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + numFiniteBuckets_ = 0; + growthFactor_ = 0D; + scale_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Exponential_descriptor; + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Exponential getDefaultInstanceForType() { + return com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Exponential build() { + com.google.api.Distribution.BucketOptions.Exponential result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Exponential buildPartial() { + com.google.api.Distribution.BucketOptions.Exponential result = + new com.google.api.Distribution.BucketOptions.Exponential(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Distribution.BucketOptions.Exponential result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.numFiniteBuckets_ = numFiniteBuckets_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.growthFactor_ = growthFactor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.scale_ = scale_; + } + } + + @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.api.Distribution.BucketOptions.Exponential) { + return mergeFrom((com.google.api.Distribution.BucketOptions.Exponential) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Distribution.BucketOptions.Exponential other) { + if (other == com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance()) + return this; + if (other.getNumFiniteBuckets() != 0) { + setNumFiniteBuckets(other.getNumFiniteBuckets()); + } + if (other.getGrowthFactor() != 0D) { + setGrowthFactor(other.getGrowthFactor()); + } + if (other.getScale() != 0D) { + setScale(other.getScale()); + } + 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: + { + numFiniteBuckets_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: + { + growthFactor_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + scale_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // 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 numFiniteBuckets_; + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * int32 num_finite_buckets = 1; + * + * @return The numFiniteBuckets. + */ + @java.lang.Override + public int getNumFiniteBuckets() { + return numFiniteBuckets_; + } + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * int32 num_finite_buckets = 1; + * + * @param value The numFiniteBuckets to set. + * @return This builder for chaining. + */ + public Builder setNumFiniteBuckets(int value) { + + numFiniteBuckets_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * int32 num_finite_buckets = 1; + * + * @return This builder for chaining. + */ + public Builder clearNumFiniteBuckets() { + bitField0_ = (bitField0_ & ~0x00000001); + numFiniteBuckets_ = 0; + onChanged(); + return this; + } + + private double growthFactor_; + /** + * + * + *
+         * Must be greater than 1.
+         * 
+ * + * double growth_factor = 2; + * + * @return The growthFactor. + */ + @java.lang.Override + public double getGrowthFactor() { + return growthFactor_; + } + /** + * + * + *
+         * Must be greater than 1.
+         * 
+ * + * double growth_factor = 2; + * + * @param value The growthFactor to set. + * @return This builder for chaining. + */ + public Builder setGrowthFactor(double value) { + + growthFactor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Must be greater than 1.
+         * 
+ * + * double growth_factor = 2; + * + * @return This builder for chaining. + */ + public Builder clearGrowthFactor() { + bitField0_ = (bitField0_ & ~0x00000002); + growthFactor_ = 0D; + onChanged(); + return this; + } + + private double scale_; + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * double scale = 3; + * + * @return The scale. + */ + @java.lang.Override + public double getScale() { + return scale_; + } + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * double scale = 3; + * + * @param value The scale to set. + * @return This builder for chaining. + */ + public Builder setScale(double value) { + + scale_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Must be greater than 0.
+         * 
+ * + * double scale = 3; + * + * @return This builder for chaining. + */ + public Builder clearScale() { + bitField0_ = (bitField0_ & ~0x00000004); + scale_ = 0D; + 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.api.Distribution.BucketOptions.Exponential) + } + + // @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Exponential) + private static final com.google.api.Distribution.BucketOptions.Exponential DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Distribution.BucketOptions.Exponential(); + } + + public static com.google.api.Distribution.BucketOptions.Exponential getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Exponential 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.api.Distribution.BucketOptions.Exponential getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExplicitOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Distribution.BucketOptions.Explicit) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The values must be monotonically increasing.
+       * 
+ * + * repeated double bounds = 1; + * + * @return A list containing the bounds. + */ + java.util.List getBoundsList(); + /** + * + * + *
+       * The values must be monotonically increasing.
+       * 
+ * + * repeated double bounds = 1; + * + * @return The count of bounds. + */ + int getBoundsCount(); + /** + * + * + *
+       * The values must be monotonically increasing.
+       * 
+ * + * repeated double bounds = 1; + * + * @param index The index of the element to return. + * @return The bounds at the given index. + */ + double getBounds(int index); + } + /** + * + * + *
+     * Specifies a set of buckets with arbitrary widths.
+     *
+     * There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following
+     * boundaries:
+     *
+     *    Upper bound (0 <= i < N-1):     bounds[i]
+     *    Lower bound (1 <= i < N);       bounds[i - 1]
+     *
+     * The `bounds` field must contain at least one element. If `bounds` has
+     * only one element, then there are no finite buckets, and that single
+     * element is the common boundary of the overflow and underflow buckets.
+     * 
+ * + * Protobuf type {@code google.api.Distribution.BucketOptions.Explicit} + */ + public static final class Explicit extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Distribution.BucketOptions.Explicit) + ExplicitOrBuilder { + private static final long serialVersionUID = 0L; + // Use Explicit.newBuilder() to construct. + private Explicit(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Explicit() { + bounds_ = emptyDoubleList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Explicit(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Explicit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Explicit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.BucketOptions.Explicit.class, + com.google.api.Distribution.BucketOptions.Explicit.Builder.class); + } + + public static final int BOUNDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.DoubleList bounds_; + /** + * + * + *
+       * The values must be monotonically increasing.
+       * 
+ * + * repeated double bounds = 1; + * + * @return A list containing the bounds. + */ + @java.lang.Override + public java.util.List getBoundsList() { + return bounds_; + } + /** + * + * + *
+       * The values must be monotonically increasing.
+       * 
+ * + * repeated double bounds = 1; + * + * @return The count of bounds. + */ + public int getBoundsCount() { + return bounds_.size(); + } + /** + * + * + *
+       * The values must be monotonically increasing.
+       * 
+ * + * repeated double bounds = 1; + * + * @param index The index of the element to return. + * @return The bounds at the given index. + */ + public double getBounds(int index) { + return bounds_.getDouble(index); + } + + private int boundsMemoizedSerializedSize = -1; + + 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 (getBoundsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(boundsMemoizedSerializedSize); + } + for (int i = 0; i < bounds_.size(); i++) { + output.writeDoubleNoTag(bounds_.getDouble(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 8 * getBoundsList().size(); + size += dataSize; + if (!getBoundsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + boundsMemoizedSerializedSize = 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.api.Distribution.BucketOptions.Explicit)) { + return super.equals(obj); + } + com.google.api.Distribution.BucketOptions.Explicit other = + (com.google.api.Distribution.BucketOptions.Explicit) obj; + + if (!getBoundsList().equals(other.getBoundsList())) 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 (getBoundsCount() > 0) { + hash = (37 * hash) + BOUNDS_FIELD_NUMBER; + hash = (53 * hash) + getBoundsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Distribution.BucketOptions.Explicit parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions.Explicit parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.BucketOptions.Explicit parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions.Explicit 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.api.Distribution.BucketOptions.Explicit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions.Explicit parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.BucketOptions.Explicit parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions.Explicit 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.api.Distribution.BucketOptions.Explicit parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions.Explicit 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.api.Distribution.BucketOptions.Explicit parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions.Explicit 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.api.Distribution.BucketOptions.Explicit 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; + } + /** + * + * + *
+       * Specifies a set of buckets with arbitrary widths.
+       *
+       * There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following
+       * boundaries:
+       *
+       *    Upper bound (0 <= i < N-1):     bounds[i]
+       *    Lower bound (1 <= i < N);       bounds[i - 1]
+       *
+       * The `bounds` field must contain at least one element. If `bounds` has
+       * only one element, then there are no finite buckets, and that single
+       * element is the common boundary of the overflow and underflow buckets.
+       * 
+ * + * Protobuf type {@code google.api.Distribution.BucketOptions.Explicit} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions.Explicit) + com.google.api.Distribution.BucketOptions.ExplicitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Explicit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Explicit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.BucketOptions.Explicit.class, + com.google.api.Distribution.BucketOptions.Explicit.Builder.class); + } + + // Construct using com.google.api.Distribution.BucketOptions.Explicit.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bounds_ = emptyDoubleList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_Explicit_descriptor; + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Explicit getDefaultInstanceForType() { + return com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Explicit build() { + com.google.api.Distribution.BucketOptions.Explicit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Explicit buildPartial() { + com.google.api.Distribution.BucketOptions.Explicit result = + new com.google.api.Distribution.BucketOptions.Explicit(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.api.Distribution.BucketOptions.Explicit result) { + if (((bitField0_ & 0x00000001) != 0)) { + bounds_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bounds_ = bounds_; + } + + private void buildPartial0(com.google.api.Distribution.BucketOptions.Explicit result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Distribution.BucketOptions.Explicit) { + return mergeFrom((com.google.api.Distribution.BucketOptions.Explicit) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Distribution.BucketOptions.Explicit other) { + if (other == com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance()) + return this; + if (!other.bounds_.isEmpty()) { + if (bounds_.isEmpty()) { + bounds_ = other.bounds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoundsIsMutable(); + bounds_.addAll(other.bounds_); + } + 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 9: + { + double v = input.readDouble(); + ensureBoundsIsMutable(); + bounds_.addDouble(v); + break; + } // case 9 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureBoundsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + bounds_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.DoubleList bounds_ = emptyDoubleList(); + + private void ensureBoundsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bounds_ = mutableCopy(bounds_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+         * The values must be monotonically increasing.
+         * 
+ * + * repeated double bounds = 1; + * + * @return A list containing the bounds. + */ + public java.util.List getBoundsList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(bounds_) + : bounds_; + } + /** + * + * + *
+         * The values must be monotonically increasing.
+         * 
+ * + * repeated double bounds = 1; + * + * @return The count of bounds. + */ + public int getBoundsCount() { + return bounds_.size(); + } + /** + * + * + *
+         * The values must be monotonically increasing.
+         * 
+ * + * repeated double bounds = 1; + * + * @param index The index of the element to return. + * @return The bounds at the given index. + */ + public double getBounds(int index) { + return bounds_.getDouble(index); + } + /** + * + * + *
+         * The values must be monotonically increasing.
+         * 
+ * + * repeated double bounds = 1; + * + * @param index The index to set the value at. + * @param value The bounds to set. + * @return This builder for chaining. + */ + public Builder setBounds(int index, double value) { + + ensureBoundsIsMutable(); + bounds_.setDouble(index, value); + onChanged(); + return this; + } + /** + * + * + *
+         * The values must be monotonically increasing.
+         * 
+ * + * repeated double bounds = 1; + * + * @param value The bounds to add. + * @return This builder for chaining. + */ + public Builder addBounds(double value) { + + ensureBoundsIsMutable(); + bounds_.addDouble(value); + onChanged(); + return this; + } + /** + * + * + *
+         * The values must be monotonically increasing.
+         * 
+ * + * repeated double bounds = 1; + * + * @param values The bounds to add. + * @return This builder for chaining. + */ + public Builder addAllBounds(java.lang.Iterable values) { + ensureBoundsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bounds_); + onChanged(); + return this; + } + /** + * + * + *
+         * The values must be monotonically increasing.
+         * 
+ * + * repeated double bounds = 1; + * + * @return This builder for chaining. + */ + public Builder clearBounds() { + bounds_ = emptyDoubleList(); + bitField0_ = (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.api.Distribution.BucketOptions.Explicit) + } + + // @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Explicit) + private static final com.google.api.Distribution.BucketOptions.Explicit DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Distribution.BucketOptions.Explicit(); + } + + public static com.google.api.Distribution.BucketOptions.Explicit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Explicit 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.api.Distribution.BucketOptions.Explicit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int optionsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object options_; + + public enum OptionsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LINEAR_BUCKETS(1), + EXPONENTIAL_BUCKETS(2), + EXPLICIT_BUCKETS(3), + OPTIONS_NOT_SET(0); + private final int value; + + private OptionsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OptionsCase valueOf(int value) { + return forNumber(value); + } + + public static OptionsCase forNumber(int value) { + switch (value) { + case 1: + return LINEAR_BUCKETS; + case 2: + return EXPONENTIAL_BUCKETS; + case 3: + return EXPLICIT_BUCKETS; + case 0: + return OPTIONS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OptionsCase getOptionsCase() { + return OptionsCase.forNumber(optionsCase_); + } + + public static final int LINEAR_BUCKETS_FIELD_NUMBER = 1; + /** + * + * + *
+     * The linear bucket.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + * + * @return Whether the linearBuckets field is set. + */ + @java.lang.Override + public boolean hasLinearBuckets() { + return optionsCase_ == 1; + } + /** + * + * + *
+     * The linear bucket.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + * + * @return The linearBuckets. + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Linear getLinearBuckets() { + if (optionsCase_ == 1) { + return (com.google.api.Distribution.BucketOptions.Linear) options_; + } + return com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance(); + } + /** + * + * + *
+     * The linear bucket.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.LinearOrBuilder getLinearBucketsOrBuilder() { + if (optionsCase_ == 1) { + return (com.google.api.Distribution.BucketOptions.Linear) options_; + } + return com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance(); + } + + public static final int EXPONENTIAL_BUCKETS_FIELD_NUMBER = 2; + /** + * + * + *
+     * The exponential buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + * + * @return Whether the exponentialBuckets field is set. + */ + @java.lang.Override + public boolean hasExponentialBuckets() { + return optionsCase_ == 2; + } + /** + * + * + *
+     * The exponential buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + * + * @return The exponentialBuckets. + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Exponential getExponentialBuckets() { + if (optionsCase_ == 2) { + return (com.google.api.Distribution.BucketOptions.Exponential) options_; + } + return com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance(); + } + /** + * + * + *
+     * The exponential buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.ExponentialOrBuilder + getExponentialBucketsOrBuilder() { + if (optionsCase_ == 2) { + return (com.google.api.Distribution.BucketOptions.Exponential) options_; + } + return com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance(); + } + + public static final int EXPLICIT_BUCKETS_FIELD_NUMBER = 3; + /** + * + * + *
+     * The explicit buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + * + * @return Whether the explicitBuckets field is set. + */ + @java.lang.Override + public boolean hasExplicitBuckets() { + return optionsCase_ == 3; + } + /** + * + * + *
+     * The explicit buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + * + * @return The explicitBuckets. + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Explicit getExplicitBuckets() { + if (optionsCase_ == 3) { + return (com.google.api.Distribution.BucketOptions.Explicit) options_; + } + return com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance(); + } + /** + * + * + *
+     * The explicit buckets.
+     * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.ExplicitOrBuilder + getExplicitBucketsOrBuilder() { + if (optionsCase_ == 3) { + return (com.google.api.Distribution.BucketOptions.Explicit) options_; + } + return com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (optionsCase_ == 1) { + output.writeMessage(1, (com.google.api.Distribution.BucketOptions.Linear) options_); + } + if (optionsCase_ == 2) { + output.writeMessage(2, (com.google.api.Distribution.BucketOptions.Exponential) options_); + } + if (optionsCase_ == 3) { + output.writeMessage(3, (com.google.api.Distribution.BucketOptions.Explicit) options_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (optionsCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.api.Distribution.BucketOptions.Linear) options_); + } + if (optionsCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.api.Distribution.BucketOptions.Exponential) options_); + } + if (optionsCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.api.Distribution.BucketOptions.Explicit) options_); + } + 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.api.Distribution.BucketOptions)) { + return super.equals(obj); + } + com.google.api.Distribution.BucketOptions other = + (com.google.api.Distribution.BucketOptions) obj; + + if (!getOptionsCase().equals(other.getOptionsCase())) return false; + switch (optionsCase_) { + case 1: + if (!getLinearBuckets().equals(other.getLinearBuckets())) return false; + break; + case 2: + if (!getExponentialBuckets().equals(other.getExponentialBuckets())) return false; + break; + case 3: + if (!getExplicitBuckets().equals(other.getExplicitBuckets())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (optionsCase_) { + case 1: + hash = (37 * hash) + LINEAR_BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getLinearBuckets().hashCode(); + break; + case 2: + hash = (37 * hash) + EXPONENTIAL_BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getExponentialBuckets().hashCode(); + break; + case 3: + hash = (37 * hash) + EXPLICIT_BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getExplicitBuckets().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Distribution.BucketOptions parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.BucketOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions 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.api.Distribution.BucketOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.BucketOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.BucketOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions 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.api.Distribution.BucketOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions 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.api.Distribution.BucketOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.BucketOptions 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.api.Distribution.BucketOptions 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; + } + /** + * + * + *
+     * `BucketOptions` describes the bucket boundaries used to create a histogram
+     * for the distribution. The buckets can be in a linear sequence, an
+     * exponential sequence, or each bucket can be specified explicitly.
+     * `BucketOptions` does not include the number of values in each bucket.
+     *
+     * A bucket has an inclusive lower bound and exclusive upper bound for the
+     * values that are counted for that bucket. The upper bound of a bucket must
+     * be strictly greater than the lower bound. The sequence of N buckets for a
+     * distribution consists of an underflow bucket (number 0), zero or more
+     * finite buckets (number 1 through N - 2) and an overflow bucket (number N -
+     * 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the
+     * same as the upper bound of bucket i - 1. The buckets span the whole range
+     * of finite values: lower bound of the underflow bucket is -infinity and the
+     * upper bound of the overflow bucket is +infinity. The finite buckets are
+     * so-called because both bounds are finite.
+     * 
+ * + * Protobuf type {@code google.api.Distribution.BucketOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Distribution.BucketOptions) + com.google.api.Distribution.BucketOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.BucketOptions.class, + com.google.api.Distribution.BucketOptions.Builder.class); + } + + // Construct using com.google.api.Distribution.BucketOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (linearBucketsBuilder_ != null) { + linearBucketsBuilder_.clear(); + } + if (exponentialBucketsBuilder_ != null) { + exponentialBucketsBuilder_.clear(); + } + if (explicitBucketsBuilder_ != null) { + explicitBucketsBuilder_.clear(); + } + optionsCase_ = 0; + options_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_BucketOptions_descriptor; + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions getDefaultInstanceForType() { + return com.google.api.Distribution.BucketOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions build() { + com.google.api.Distribution.BucketOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Distribution.BucketOptions buildPartial() { + com.google.api.Distribution.BucketOptions result = + new com.google.api.Distribution.BucketOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Distribution.BucketOptions result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.api.Distribution.BucketOptions result) { + result.optionsCase_ = optionsCase_; + result.options_ = this.options_; + if (optionsCase_ == 1 && linearBucketsBuilder_ != null) { + result.options_ = linearBucketsBuilder_.build(); + } + if (optionsCase_ == 2 && exponentialBucketsBuilder_ != null) { + result.options_ = exponentialBucketsBuilder_.build(); + } + if (optionsCase_ == 3 && explicitBucketsBuilder_ != null) { + result.options_ = explicitBucketsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Distribution.BucketOptions) { + return mergeFrom((com.google.api.Distribution.BucketOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Distribution.BucketOptions other) { + if (other == com.google.api.Distribution.BucketOptions.getDefaultInstance()) return this; + switch (other.getOptionsCase()) { + case LINEAR_BUCKETS: + { + mergeLinearBuckets(other.getLinearBuckets()); + break; + } + case EXPONENTIAL_BUCKETS: + { + mergeExponentialBuckets(other.getExponentialBuckets()); + break; + } + case EXPLICIT_BUCKETS: + { + mergeExplicitBuckets(other.getExplicitBuckets()); + break; + } + case OPTIONS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getLinearBucketsFieldBuilder().getBuilder(), extensionRegistry); + optionsCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getExponentialBucketsFieldBuilder().getBuilder(), extensionRegistry); + optionsCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getExplicitBucketsFieldBuilder().getBuilder(), extensionRegistry); + optionsCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int optionsCase_ = 0; + private java.lang.Object options_; + + public OptionsCase getOptionsCase() { + return OptionsCase.forNumber(optionsCase_); + } + + public Builder clearOptions() { + optionsCase_ = 0; + options_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions.Linear, + com.google.api.Distribution.BucketOptions.Linear.Builder, + com.google.api.Distribution.BucketOptions.LinearOrBuilder> + linearBucketsBuilder_; + /** + * + * + *
+       * The linear bucket.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + * + * @return Whether the linearBuckets field is set. + */ + @java.lang.Override + public boolean hasLinearBuckets() { + return optionsCase_ == 1; + } + /** + * + * + *
+       * The linear bucket.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + * + * @return The linearBuckets. + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Linear getLinearBuckets() { + if (linearBucketsBuilder_ == null) { + if (optionsCase_ == 1) { + return (com.google.api.Distribution.BucketOptions.Linear) options_; + } + return com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance(); + } else { + if (optionsCase_ == 1) { + return linearBucketsBuilder_.getMessage(); + } + return com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance(); + } + } + /** + * + * + *
+       * The linear bucket.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + */ + public Builder setLinearBuckets(com.google.api.Distribution.BucketOptions.Linear value) { + if (linearBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + onChanged(); + } else { + linearBucketsBuilder_.setMessage(value); + } + optionsCase_ = 1; + return this; + } + /** + * + * + *
+       * The linear bucket.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + */ + public Builder setLinearBuckets( + com.google.api.Distribution.BucketOptions.Linear.Builder builderForValue) { + if (linearBucketsBuilder_ == null) { + options_ = builderForValue.build(); + onChanged(); + } else { + linearBucketsBuilder_.setMessage(builderForValue.build()); + } + optionsCase_ = 1; + return this; + } + /** + * + * + *
+       * The linear bucket.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + */ + public Builder mergeLinearBuckets(com.google.api.Distribution.BucketOptions.Linear value) { + if (linearBucketsBuilder_ == null) { + if (optionsCase_ == 1 + && options_ + != com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance()) { + options_ = + com.google.api.Distribution.BucketOptions.Linear.newBuilder( + (com.google.api.Distribution.BucketOptions.Linear) options_) + .mergeFrom(value) + .buildPartial(); + } else { + options_ = value; + } + onChanged(); + } else { + if (optionsCase_ == 1) { + linearBucketsBuilder_.mergeFrom(value); + } else { + linearBucketsBuilder_.setMessage(value); + } + } + optionsCase_ = 1; + return this; + } + /** + * + * + *
+       * The linear bucket.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + */ + public Builder clearLinearBuckets() { + if (linearBucketsBuilder_ == null) { + if (optionsCase_ == 1) { + optionsCase_ = 0; + options_ = null; + onChanged(); + } + } else { + if (optionsCase_ == 1) { + optionsCase_ = 0; + options_ = null; + } + linearBucketsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The linear bucket.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + */ + public com.google.api.Distribution.BucketOptions.Linear.Builder getLinearBucketsBuilder() { + return getLinearBucketsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The linear bucket.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.LinearOrBuilder getLinearBucketsOrBuilder() { + if ((optionsCase_ == 1) && (linearBucketsBuilder_ != null)) { + return linearBucketsBuilder_.getMessageOrBuilder(); + } else { + if (optionsCase_ == 1) { + return (com.google.api.Distribution.BucketOptions.Linear) options_; + } + return com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance(); + } + } + /** + * + * + *
+       * The linear bucket.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Linear linear_buckets = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions.Linear, + com.google.api.Distribution.BucketOptions.Linear.Builder, + com.google.api.Distribution.BucketOptions.LinearOrBuilder> + getLinearBucketsFieldBuilder() { + if (linearBucketsBuilder_ == null) { + if (!(optionsCase_ == 1)) { + options_ = com.google.api.Distribution.BucketOptions.Linear.getDefaultInstance(); + } + linearBucketsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions.Linear, + com.google.api.Distribution.BucketOptions.Linear.Builder, + com.google.api.Distribution.BucketOptions.LinearOrBuilder>( + (com.google.api.Distribution.BucketOptions.Linear) options_, + getParentForChildren(), + isClean()); + options_ = null; + } + optionsCase_ = 1; + onChanged(); + return linearBucketsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions.Exponential, + com.google.api.Distribution.BucketOptions.Exponential.Builder, + com.google.api.Distribution.BucketOptions.ExponentialOrBuilder> + exponentialBucketsBuilder_; + /** + * + * + *
+       * The exponential buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + * + * @return Whether the exponentialBuckets field is set. + */ + @java.lang.Override + public boolean hasExponentialBuckets() { + return optionsCase_ == 2; + } + /** + * + * + *
+       * The exponential buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + * + * @return The exponentialBuckets. + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Exponential getExponentialBuckets() { + if (exponentialBucketsBuilder_ == null) { + if (optionsCase_ == 2) { + return (com.google.api.Distribution.BucketOptions.Exponential) options_; + } + return com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance(); + } else { + if (optionsCase_ == 2) { + return exponentialBucketsBuilder_.getMessage(); + } + return com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance(); + } + } + /** + * + * + *
+       * The exponential buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + */ + public Builder setExponentialBuckets( + com.google.api.Distribution.BucketOptions.Exponential value) { + if (exponentialBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + onChanged(); + } else { + exponentialBucketsBuilder_.setMessage(value); + } + optionsCase_ = 2; + return this; + } + /** + * + * + *
+       * The exponential buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + */ + public Builder setExponentialBuckets( + com.google.api.Distribution.BucketOptions.Exponential.Builder builderForValue) { + if (exponentialBucketsBuilder_ == null) { + options_ = builderForValue.build(); + onChanged(); + } else { + exponentialBucketsBuilder_.setMessage(builderForValue.build()); + } + optionsCase_ = 2; + return this; + } + /** + * + * + *
+       * The exponential buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + */ + public Builder mergeExponentialBuckets( + com.google.api.Distribution.BucketOptions.Exponential value) { + if (exponentialBucketsBuilder_ == null) { + if (optionsCase_ == 2 + && options_ + != com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance()) { + options_ = + com.google.api.Distribution.BucketOptions.Exponential.newBuilder( + (com.google.api.Distribution.BucketOptions.Exponential) options_) + .mergeFrom(value) + .buildPartial(); + } else { + options_ = value; + } + onChanged(); + } else { + if (optionsCase_ == 2) { + exponentialBucketsBuilder_.mergeFrom(value); + } else { + exponentialBucketsBuilder_.setMessage(value); + } + } + optionsCase_ = 2; + return this; + } + /** + * + * + *
+       * The exponential buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + */ + public Builder clearExponentialBuckets() { + if (exponentialBucketsBuilder_ == null) { + if (optionsCase_ == 2) { + optionsCase_ = 0; + options_ = null; + onChanged(); + } + } else { + if (optionsCase_ == 2) { + optionsCase_ = 0; + options_ = null; + } + exponentialBucketsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The exponential buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + */ + public com.google.api.Distribution.BucketOptions.Exponential.Builder + getExponentialBucketsBuilder() { + return getExponentialBucketsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The exponential buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.ExponentialOrBuilder + getExponentialBucketsOrBuilder() { + if ((optionsCase_ == 2) && (exponentialBucketsBuilder_ != null)) { + return exponentialBucketsBuilder_.getMessageOrBuilder(); + } else { + if (optionsCase_ == 2) { + return (com.google.api.Distribution.BucketOptions.Exponential) options_; + } + return com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance(); + } + } + /** + * + * + *
+       * The exponential buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Exponential exponential_buckets = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions.Exponential, + com.google.api.Distribution.BucketOptions.Exponential.Builder, + com.google.api.Distribution.BucketOptions.ExponentialOrBuilder> + getExponentialBucketsFieldBuilder() { + if (exponentialBucketsBuilder_ == null) { + if (!(optionsCase_ == 2)) { + options_ = com.google.api.Distribution.BucketOptions.Exponential.getDefaultInstance(); + } + exponentialBucketsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions.Exponential, + com.google.api.Distribution.BucketOptions.Exponential.Builder, + com.google.api.Distribution.BucketOptions.ExponentialOrBuilder>( + (com.google.api.Distribution.BucketOptions.Exponential) options_, + getParentForChildren(), + isClean()); + options_ = null; + } + optionsCase_ = 2; + onChanged(); + return exponentialBucketsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions.Explicit, + com.google.api.Distribution.BucketOptions.Explicit.Builder, + com.google.api.Distribution.BucketOptions.ExplicitOrBuilder> + explicitBucketsBuilder_; + /** + * + * + *
+       * The explicit buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + * + * @return Whether the explicitBuckets field is set. + */ + @java.lang.Override + public boolean hasExplicitBuckets() { + return optionsCase_ == 3; + } + /** + * + * + *
+       * The explicit buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + * + * @return The explicitBuckets. + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.Explicit getExplicitBuckets() { + if (explicitBucketsBuilder_ == null) { + if (optionsCase_ == 3) { + return (com.google.api.Distribution.BucketOptions.Explicit) options_; + } + return com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance(); + } else { + if (optionsCase_ == 3) { + return explicitBucketsBuilder_.getMessage(); + } + return com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance(); + } + } + /** + * + * + *
+       * The explicit buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + */ + public Builder setExplicitBuckets(com.google.api.Distribution.BucketOptions.Explicit value) { + if (explicitBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + onChanged(); + } else { + explicitBucketsBuilder_.setMessage(value); + } + optionsCase_ = 3; + return this; + } + /** + * + * + *
+       * The explicit buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + */ + public Builder setExplicitBuckets( + com.google.api.Distribution.BucketOptions.Explicit.Builder builderForValue) { + if (explicitBucketsBuilder_ == null) { + options_ = builderForValue.build(); + onChanged(); + } else { + explicitBucketsBuilder_.setMessage(builderForValue.build()); + } + optionsCase_ = 3; + return this; + } + /** + * + * + *
+       * The explicit buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + */ + public Builder mergeExplicitBuckets( + com.google.api.Distribution.BucketOptions.Explicit value) { + if (explicitBucketsBuilder_ == null) { + if (optionsCase_ == 3 + && options_ + != com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance()) { + options_ = + com.google.api.Distribution.BucketOptions.Explicit.newBuilder( + (com.google.api.Distribution.BucketOptions.Explicit) options_) + .mergeFrom(value) + .buildPartial(); + } else { + options_ = value; + } + onChanged(); + } else { + if (optionsCase_ == 3) { + explicitBucketsBuilder_.mergeFrom(value); + } else { + explicitBucketsBuilder_.setMessage(value); + } + } + optionsCase_ = 3; + return this; + } + /** + * + * + *
+       * The explicit buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + */ + public Builder clearExplicitBuckets() { + if (explicitBucketsBuilder_ == null) { + if (optionsCase_ == 3) { + optionsCase_ = 0; + options_ = null; + onChanged(); + } + } else { + if (optionsCase_ == 3) { + optionsCase_ = 0; + options_ = null; + } + explicitBucketsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The explicit buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + */ + public com.google.api.Distribution.BucketOptions.Explicit.Builder + getExplicitBucketsBuilder() { + return getExplicitBucketsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The explicit buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions.ExplicitOrBuilder + getExplicitBucketsOrBuilder() { + if ((optionsCase_ == 3) && (explicitBucketsBuilder_ != null)) { + return explicitBucketsBuilder_.getMessageOrBuilder(); + } else { + if (optionsCase_ == 3) { + return (com.google.api.Distribution.BucketOptions.Explicit) options_; + } + return com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance(); + } + } + /** + * + * + *
+       * The explicit buckets.
+       * 
+ * + * .google.api.Distribution.BucketOptions.Explicit explicit_buckets = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions.Explicit, + com.google.api.Distribution.BucketOptions.Explicit.Builder, + com.google.api.Distribution.BucketOptions.ExplicitOrBuilder> + getExplicitBucketsFieldBuilder() { + if (explicitBucketsBuilder_ == null) { + if (!(optionsCase_ == 3)) { + options_ = com.google.api.Distribution.BucketOptions.Explicit.getDefaultInstance(); + } + explicitBucketsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions.Explicit, + com.google.api.Distribution.BucketOptions.Explicit.Builder, + com.google.api.Distribution.BucketOptions.ExplicitOrBuilder>( + (com.google.api.Distribution.BucketOptions.Explicit) options_, + getParentForChildren(), + isClean()); + options_ = null; + } + optionsCase_ = 3; + onChanged(); + return explicitBucketsBuilder_; + } + + @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.api.Distribution.BucketOptions) + } + + // @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions) + private static final com.google.api.Distribution.BucketOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Distribution.BucketOptions(); + } + + public static com.google.api.Distribution.BucketOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BucketOptions 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.api.Distribution.BucketOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExemplarOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Distribution.Exemplar) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Value of the exemplar point. This value determines to which bucket the
+     * exemplar belongs.
+     * 
+ * + * double value = 1; + * + * @return The value. + */ + double getValue(); + + /** + * + * + *
+     * The observation (sampling) time of the above value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * + * + *
+     * The observation (sampling) time of the above value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + /** + * + * + *
+     * The observation (sampling) time of the above value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * + * + *
+     * Contextual information about the example value. Examples are:
+     *
+     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+     *
+     *   Literal string: type.googleapis.com/google.protobuf.StringValue
+     *
+     *   Labels dropped during aggregation:
+     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+     *
+     * There may be only a single attachment of any given message type in a
+     * single exemplar, and this is enforced by the system.
+     * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + java.util.List getAttachmentsList(); + /** + * + * + *
+     * Contextual information about the example value. Examples are:
+     *
+     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+     *
+     *   Literal string: type.googleapis.com/google.protobuf.StringValue
+     *
+     *   Labels dropped during aggregation:
+     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+     *
+     * There may be only a single attachment of any given message type in a
+     * single exemplar, and this is enforced by the system.
+     * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + com.google.protobuf.Any getAttachments(int index); + /** + * + * + *
+     * Contextual information about the example value. Examples are:
+     *
+     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+     *
+     *   Literal string: type.googleapis.com/google.protobuf.StringValue
+     *
+     *   Labels dropped during aggregation:
+     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+     *
+     * There may be only a single attachment of any given message type in a
+     * single exemplar, and this is enforced by the system.
+     * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + int getAttachmentsCount(); + /** + * + * + *
+     * Contextual information about the example value. Examples are:
+     *
+     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+     *
+     *   Literal string: type.googleapis.com/google.protobuf.StringValue
+     *
+     *   Labels dropped during aggregation:
+     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+     *
+     * There may be only a single attachment of any given message type in a
+     * single exemplar, and this is enforced by the system.
+     * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + java.util.List getAttachmentsOrBuilderList(); + /** + * + * + *
+     * Contextual information about the example value. Examples are:
+     *
+     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+     *
+     *   Literal string: type.googleapis.com/google.protobuf.StringValue
+     *
+     *   Labels dropped during aggregation:
+     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+     *
+     * There may be only a single attachment of any given message type in a
+     * single exemplar, and this is enforced by the system.
+     * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + com.google.protobuf.AnyOrBuilder getAttachmentsOrBuilder(int index); + } + /** + * + * + *
+   * Exemplars are example points that may be used to annotate aggregated
+   * distribution values. They are metadata that gives information about a
+   * particular value added to a Distribution bucket, such as a trace ID that
+   * was active when a value was added. They may contain further information,
+   * such as a example values and timestamps, origin, etc.
+   * 
+ * + * Protobuf type {@code google.api.Distribution.Exemplar} + */ + public static final class Exemplar extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Distribution.Exemplar) + ExemplarOrBuilder { + private static final long serialVersionUID = 0L; + // Use Exemplar.newBuilder() to construct. + private Exemplar(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Exemplar() { + attachments_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Exemplar(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_Exemplar_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_Exemplar_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.Exemplar.class, + com.google.api.Distribution.Exemplar.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private double value_ = 0D; + /** + * + * + *
+     * Value of the exemplar point. This value determines to which bucket the
+     * exemplar belongs.
+     * 
+ * + * double value = 1; + * + * @return The value. + */ + @java.lang.Override + public double getValue() { + return value_; + } + + public static final int TIMESTAMP_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp timestamp_; + /** + * + * + *
+     * The observation (sampling) time of the above value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + /** + * + * + *
+     * The observation (sampling) time of the above value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + * + * + *
+     * The observation (sampling) time of the above value.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + + public static final int ATTACHMENTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List attachments_; + /** + * + * + *
+     * Contextual information about the example value. Examples are:
+     *
+     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+     *
+     *   Literal string: type.googleapis.com/google.protobuf.StringValue
+     *
+     *   Labels dropped during aggregation:
+     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+     *
+     * There may be only a single attachment of any given message type in a
+     * single exemplar, and this is enforced by the system.
+     * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + @java.lang.Override + public java.util.List getAttachmentsList() { + return attachments_; + } + /** + * + * + *
+     * Contextual information about the example value. Examples are:
+     *
+     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+     *
+     *   Literal string: type.googleapis.com/google.protobuf.StringValue
+     *
+     *   Labels dropped during aggregation:
+     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+     *
+     * There may be only a single attachment of any given message type in a
+     * single exemplar, and this is enforced by the system.
+     * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + @java.lang.Override + public java.util.List + getAttachmentsOrBuilderList() { + return attachments_; + } + /** + * + * + *
+     * Contextual information about the example value. Examples are:
+     *
+     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+     *
+     *   Literal string: type.googleapis.com/google.protobuf.StringValue
+     *
+     *   Labels dropped during aggregation:
+     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+     *
+     * There may be only a single attachment of any given message type in a
+     * single exemplar, and this is enforced by the system.
+     * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + @java.lang.Override + public int getAttachmentsCount() { + return attachments_.size(); + } + /** + * + * + *
+     * Contextual information about the example value. Examples are:
+     *
+     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+     *
+     *   Literal string: type.googleapis.com/google.protobuf.StringValue
+     *
+     *   Labels dropped during aggregation:
+     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+     *
+     * There may be only a single attachment of any given message type in a
+     * single exemplar, and this is enforced by the system.
+     * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + @java.lang.Override + public com.google.protobuf.Any getAttachments(int index) { + return attachments_.get(index); + } + /** + * + * + *
+     * Contextual information about the example value. Examples are:
+     *
+     *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+     *
+     *   Literal string: type.googleapis.com/google.protobuf.StringValue
+     *
+     *   Labels dropped during aggregation:
+     *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+     *
+     * There may be only a single attachment of any given message type in a
+     * single exemplar, and this is enforced by the system.
+     * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getAttachmentsOrBuilder(int index) { + return attachments_.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 (java.lang.Double.doubleToRawLongBits(value_) != 0) { + output.writeDouble(1, value_); + } + if (timestamp_ != null) { + output.writeMessage(2, getTimestamp()); + } + for (int i = 0; i < attachments_.size(); i++) { + output.writeMessage(3, attachments_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(value_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, value_); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTimestamp()); + } + for (int i = 0; i < attachments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, attachments_.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.api.Distribution.Exemplar)) { + return super.equals(obj); + } + com.google.api.Distribution.Exemplar other = (com.google.api.Distribution.Exemplar) obj; + + if (java.lang.Double.doubleToLongBits(getValue()) + != java.lang.Double.doubleToLongBits(other.getValue())) return false; + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) return false; + } + if (!getAttachmentsList().equals(other.getAttachmentsList())) 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) + VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getValue())); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + if (getAttachmentsCount() > 0) { + hash = (37 * hash) + ATTACHMENTS_FIELD_NUMBER; + hash = (53 * hash) + getAttachmentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Distribution.Exemplar parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.Exemplar parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.Exemplar parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.Exemplar 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.api.Distribution.Exemplar parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution.Exemplar parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution.Exemplar parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.Exemplar 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.api.Distribution.Exemplar parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.Exemplar 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.api.Distribution.Exemplar parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution.Exemplar 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.api.Distribution.Exemplar 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; + } + /** + * + * + *
+     * Exemplars are example points that may be used to annotate aggregated
+     * distribution values. They are metadata that gives information about a
+     * particular value added to a Distribution bucket, such as a trace ID that
+     * was active when a value was added. They may contain further information,
+     * such as a example values and timestamps, origin, etc.
+     * 
+ * + * Protobuf type {@code google.api.Distribution.Exemplar} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Distribution.Exemplar) + com.google.api.Distribution.ExemplarOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_Exemplar_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_Exemplar_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.Exemplar.class, + com.google.api.Distribution.Exemplar.Builder.class); + } + + // Construct using com.google.api.Distribution.Exemplar.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = 0D; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + if (attachmentsBuilder_ == null) { + attachments_ = java.util.Collections.emptyList(); + } else { + attachments_ = null; + attachmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_Exemplar_descriptor; + } + + @java.lang.Override + public com.google.api.Distribution.Exemplar getDefaultInstanceForType() { + return com.google.api.Distribution.Exemplar.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Distribution.Exemplar build() { + com.google.api.Distribution.Exemplar result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Distribution.Exemplar buildPartial() { + com.google.api.Distribution.Exemplar result = + new com.google.api.Distribution.Exemplar(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Distribution.Exemplar result) { + if (attachmentsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + attachments_ = java.util.Collections.unmodifiableList(attachments_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.attachments_ = attachments_; + } else { + result.attachments_ = attachmentsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Distribution.Exemplar result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Distribution.Exemplar) { + return mergeFrom((com.google.api.Distribution.Exemplar) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Distribution.Exemplar other) { + if (other == com.google.api.Distribution.Exemplar.getDefaultInstance()) return this; + if (other.getValue() != 0D) { + setValue(other.getValue()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (attachmentsBuilder_ == null) { + if (!other.attachments_.isEmpty()) { + if (attachments_.isEmpty()) { + attachments_ = other.attachments_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAttachmentsIsMutable(); + attachments_.addAll(other.attachments_); + } + onChanged(); + } + } else { + if (!other.attachments_.isEmpty()) { + if (attachmentsBuilder_.isEmpty()) { + attachmentsBuilder_.dispose(); + attachmentsBuilder_ = null; + attachments_ = other.attachments_; + bitField0_ = (bitField0_ & ~0x00000004); + attachmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttachmentsFieldBuilder() + : null; + } else { + attachmentsBuilder_.addAllMessages(other.attachments_); + } + } + } + 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 9: + { + value_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 18: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.Any m = + input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (attachmentsBuilder_ == null) { + ensureAttachmentsIsMutable(); + attachments_.add(m); + } else { + attachmentsBuilder_.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 double value_; + /** + * + * + *
+       * Value of the exemplar point. This value determines to which bucket the
+       * exemplar belongs.
+       * 
+ * + * double value = 1; + * + * @return The value. + */ + @java.lang.Override + public double getValue() { + return value_; + } + /** + * + * + *
+       * Value of the exemplar point. This value determines to which bucket the
+       * exemplar belongs.
+       * 
+ * + * double value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(double value) { + + value_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Value of the exemplar point. This value determines to which bucket the
+       * exemplar belongs.
+       * 
+ * + * double value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0D; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + timestampBuilder_; + /** + * + * + *
+       * The observation (sampling) time of the above value.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The observation (sampling) time of the above value.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + * + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The observation (sampling) time of the above value.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + } else { + timestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The observation (sampling) time of the above value.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The observation (sampling) time of the above value.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && timestamp_ != null + && timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); + } else { + timestamp_ = value; + } + } else { + timestampBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The observation (sampling) time of the above value.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The observation (sampling) time of the above value.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The observation (sampling) time of the above value.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : timestamp_; + } + } + /** + * + * + *
+       * The observation (sampling) time of the above value.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private java.util.List attachments_ = + java.util.Collections.emptyList(); + + private void ensureAttachmentsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + attachments_ = new java.util.ArrayList(attachments_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + attachmentsBuilder_; + + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public java.util.List getAttachmentsList() { + if (attachmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(attachments_); + } else { + return attachmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public int getAttachmentsCount() { + if (attachmentsBuilder_ == null) { + return attachments_.size(); + } else { + return attachmentsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public com.google.protobuf.Any getAttachments(int index) { + if (attachmentsBuilder_ == null) { + return attachments_.get(index); + } else { + return attachmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public Builder setAttachments(int index, com.google.protobuf.Any value) { + if (attachmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttachmentsIsMutable(); + attachments_.set(index, value); + onChanged(); + } else { + attachmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public Builder setAttachments(int index, com.google.protobuf.Any.Builder builderForValue) { + if (attachmentsBuilder_ == null) { + ensureAttachmentsIsMutable(); + attachments_.set(index, builderForValue.build()); + onChanged(); + } else { + attachmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public Builder addAttachments(com.google.protobuf.Any value) { + if (attachmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttachmentsIsMutable(); + attachments_.add(value); + onChanged(); + } else { + attachmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public Builder addAttachments(int index, com.google.protobuf.Any value) { + if (attachmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttachmentsIsMutable(); + attachments_.add(index, value); + onChanged(); + } else { + attachmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public Builder addAttachments(com.google.protobuf.Any.Builder builderForValue) { + if (attachmentsBuilder_ == null) { + ensureAttachmentsIsMutable(); + attachments_.add(builderForValue.build()); + onChanged(); + } else { + attachmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public Builder addAttachments(int index, com.google.protobuf.Any.Builder builderForValue) { + if (attachmentsBuilder_ == null) { + ensureAttachmentsIsMutable(); + attachments_.add(index, builderForValue.build()); + onChanged(); + } else { + attachmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public Builder addAllAttachments( + java.lang.Iterable values) { + if (attachmentsBuilder_ == null) { + ensureAttachmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attachments_); + onChanged(); + } else { + attachmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public Builder clearAttachments() { + if (attachmentsBuilder_ == null) { + attachments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + attachmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public Builder removeAttachments(int index) { + if (attachmentsBuilder_ == null) { + ensureAttachmentsIsMutable(); + attachments_.remove(index); + onChanged(); + } else { + attachmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public com.google.protobuf.Any.Builder getAttachmentsBuilder(int index) { + return getAttachmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public com.google.protobuf.AnyOrBuilder getAttachmentsOrBuilder(int index) { + if (attachmentsBuilder_ == null) { + return attachments_.get(index); + } else { + return attachmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public java.util.List + getAttachmentsOrBuilderList() { + if (attachmentsBuilder_ != null) { + return attachmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attachments_); + } + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public com.google.protobuf.Any.Builder addAttachmentsBuilder() { + return getAttachmentsFieldBuilder() + .addBuilder(com.google.protobuf.Any.getDefaultInstance()); + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public com.google.protobuf.Any.Builder addAttachmentsBuilder(int index) { + return getAttachmentsFieldBuilder() + .addBuilder(index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + * + * + *
+       * Contextual information about the example value. Examples are:
+       *
+       *   Trace: type.googleapis.com/google.monitoring.v3.SpanContext
+       *
+       *   Literal string: type.googleapis.com/google.protobuf.StringValue
+       *
+       *   Labels dropped during aggregation:
+       *     type.googleapis.com/google.monitoring.v3.DroppedLabels
+       *
+       * There may be only a single attachment of any given message type in a
+       * single exemplar, and this is enforced by the system.
+       * 
+ * + * repeated .google.protobuf.Any attachments = 3; + */ + public java.util.List getAttachmentsBuilderList() { + return getAttachmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + getAttachmentsFieldBuilder() { + if (attachmentsBuilder_ == null) { + attachmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder>( + attachments_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + attachments_ = null; + } + return attachmentsBuilder_; + } + + @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.api.Distribution.Exemplar) + } + + // @@protoc_insertion_point(class_scope:google.api.Distribution.Exemplar) + private static final com.google.api.Distribution.Exemplar DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Distribution.Exemplar(); + } + + public static com.google.api.Distribution.Exemplar getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Exemplar 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.api.Distribution.Exemplar getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int COUNT_FIELD_NUMBER = 1; + private long count_ = 0L; + /** + * + * + *
+   * The number of values in the population. Must be non-negative. This value
+   * must equal the sum of the values in `bucket_counts` if a histogram is
+   * provided.
+   * 
+ * + * int64 count = 1; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + public static final int MEAN_FIELD_NUMBER = 2; + private double mean_ = 0D; + /** + * + * + *
+   * The arithmetic mean of the values in the population. If `count` is zero
+   * then this field must be zero.
+   * 
+ * + * double mean = 2; + * + * @return The mean. + */ + @java.lang.Override + public double getMean() { + return mean_; + } + + public static final int SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER = 3; + private double sumOfSquaredDeviation_ = 0D; + /** + * + * + *
+   * The sum of squared deviations from the mean of the values in the
+   * population. For values x_i this is:
+   *
+   *     Sum[i=1..n]((x_i - mean)^2)
+   *
+   * Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
+   * describes Welford's method for accumulating this sum in one pass.
+   *
+   * If `count` is zero then this field must be zero.
+   * 
+ * + * double sum_of_squared_deviation = 3; + * + * @return The sumOfSquaredDeviation. + */ + @java.lang.Override + public double getSumOfSquaredDeviation() { + return sumOfSquaredDeviation_; + } + + public static final int RANGE_FIELD_NUMBER = 4; + private com.google.api.Distribution.Range range_; + /** + * + * + *
+   * If specified, contains the range of the population values. The field
+   * must not be present if the `count` is zero.
+   * 
+ * + * .google.api.Distribution.Range range = 4; + * + * @return Whether the range field is set. + */ + @java.lang.Override + public boolean hasRange() { + return range_ != null; + } + /** + * + * + *
+   * If specified, contains the range of the population values. The field
+   * must not be present if the `count` is zero.
+   * 
+ * + * .google.api.Distribution.Range range = 4; + * + * @return The range. + */ + @java.lang.Override + public com.google.api.Distribution.Range getRange() { + return range_ == null ? com.google.api.Distribution.Range.getDefaultInstance() : range_; + } + /** + * + * + *
+   * If specified, contains the range of the population values. The field
+   * must not be present if the `count` is zero.
+   * 
+ * + * .google.api.Distribution.Range range = 4; + */ + @java.lang.Override + public com.google.api.Distribution.RangeOrBuilder getRangeOrBuilder() { + return range_ == null ? com.google.api.Distribution.Range.getDefaultInstance() : range_; + } + + public static final int BUCKET_OPTIONS_FIELD_NUMBER = 6; + private com.google.api.Distribution.BucketOptions bucketOptions_; + /** + * + * + *
+   * Defines the histogram bucket boundaries. If the distribution does not
+   * contain a histogram, then omit this field.
+   * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + * + * @return Whether the bucketOptions field is set. + */ + @java.lang.Override + public boolean hasBucketOptions() { + return bucketOptions_ != null; + } + /** + * + * + *
+   * Defines the histogram bucket boundaries. If the distribution does not
+   * contain a histogram, then omit this field.
+   * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + * + * @return The bucketOptions. + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptions getBucketOptions() { + return bucketOptions_ == null + ? com.google.api.Distribution.BucketOptions.getDefaultInstance() + : bucketOptions_; + } + /** + * + * + *
+   * Defines the histogram bucket boundaries. If the distribution does not
+   * contain a histogram, then omit this field.
+   * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + */ + @java.lang.Override + public com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuilder() { + return bucketOptions_ == null + ? com.google.api.Distribution.BucketOptions.getDefaultInstance() + : bucketOptions_; + } + + public static final int BUCKET_COUNTS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList bucketCounts_; + /** + * + * + *
+   * The number of values in each bucket of the histogram, as described in
+   * `bucket_options`. If the distribution does not have a histogram, then omit
+   * this field. If there is a histogram, then the sum of the values in
+   * `bucket_counts` must equal the value in the `count` field of the
+   * distribution.
+   *
+   * If present, `bucket_counts` should contain N values, where N is the number
+   * of buckets specified in `bucket_options`. If you supply fewer than N
+   * values, the remaining values are assumed to be 0.
+   *
+   * The order of the values in `bucket_counts` follows the bucket numbering
+   * schemes described for the three bucket types. The first value must be the
+   * count for the underflow bucket (number 0). The next N-2 values are the
+   * counts for the finite buckets (number 1 through N-2). The N'th value in
+   * `bucket_counts` is the count for the overflow bucket (number N-1).
+   * 
+ * + * repeated int64 bucket_counts = 7; + * + * @return A list containing the bucketCounts. + */ + @java.lang.Override + public java.util.List getBucketCountsList() { + return bucketCounts_; + } + /** + * + * + *
+   * The number of values in each bucket of the histogram, as described in
+   * `bucket_options`. If the distribution does not have a histogram, then omit
+   * this field. If there is a histogram, then the sum of the values in
+   * `bucket_counts` must equal the value in the `count` field of the
+   * distribution.
+   *
+   * If present, `bucket_counts` should contain N values, where N is the number
+   * of buckets specified in `bucket_options`. If you supply fewer than N
+   * values, the remaining values are assumed to be 0.
+   *
+   * The order of the values in `bucket_counts` follows the bucket numbering
+   * schemes described for the three bucket types. The first value must be the
+   * count for the underflow bucket (number 0). The next N-2 values are the
+   * counts for the finite buckets (number 1 through N-2). The N'th value in
+   * `bucket_counts` is the count for the overflow bucket (number N-1).
+   * 
+ * + * repeated int64 bucket_counts = 7; + * + * @return The count of bucketCounts. + */ + public int getBucketCountsCount() { + return bucketCounts_.size(); + } + /** + * + * + *
+   * The number of values in each bucket of the histogram, as described in
+   * `bucket_options`. If the distribution does not have a histogram, then omit
+   * this field. If there is a histogram, then the sum of the values in
+   * `bucket_counts` must equal the value in the `count` field of the
+   * distribution.
+   *
+   * If present, `bucket_counts` should contain N values, where N is the number
+   * of buckets specified in `bucket_options`. If you supply fewer than N
+   * values, the remaining values are assumed to be 0.
+   *
+   * The order of the values in `bucket_counts` follows the bucket numbering
+   * schemes described for the three bucket types. The first value must be the
+   * count for the underflow bucket (number 0). The next N-2 values are the
+   * counts for the finite buckets (number 1 through N-2). The N'th value in
+   * `bucket_counts` is the count for the overflow bucket (number N-1).
+   * 
+ * + * repeated int64 bucket_counts = 7; + * + * @param index The index of the element to return. + * @return The bucketCounts at the given index. + */ + public long getBucketCounts(int index) { + return bucketCounts_.getLong(index); + } + + private int bucketCountsMemoizedSerializedSize = -1; + + public static final int EXEMPLARS_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List exemplars_; + /** + * + * + *
+   * Must be in increasing order of `value` field.
+   * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + @java.lang.Override + public java.util.List getExemplarsList() { + return exemplars_; + } + /** + * + * + *
+   * Must be in increasing order of `value` field.
+   * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + @java.lang.Override + public java.util.List + getExemplarsOrBuilderList() { + return exemplars_; + } + /** + * + * + *
+   * Must be in increasing order of `value` field.
+   * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + @java.lang.Override + public int getExemplarsCount() { + return exemplars_.size(); + } + /** + * + * + *
+   * Must be in increasing order of `value` field.
+   * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + @java.lang.Override + public com.google.api.Distribution.Exemplar getExemplars(int index) { + return exemplars_.get(index); + } + /** + * + * + *
+   * Must be in increasing order of `value` field.
+   * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + @java.lang.Override + public com.google.api.Distribution.ExemplarOrBuilder getExemplarsOrBuilder(int index) { + return exemplars_.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 { + getSerializedSize(); + if (count_ != 0L) { + output.writeInt64(1, count_); + } + if (java.lang.Double.doubleToRawLongBits(mean_) != 0) { + output.writeDouble(2, mean_); + } + if (java.lang.Double.doubleToRawLongBits(sumOfSquaredDeviation_) != 0) { + output.writeDouble(3, sumOfSquaredDeviation_); + } + if (range_ != null) { + output.writeMessage(4, getRange()); + } + if (bucketOptions_ != null) { + output.writeMessage(6, getBucketOptions()); + } + if (getBucketCountsList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(bucketCountsMemoizedSerializedSize); + } + for (int i = 0; i < bucketCounts_.size(); i++) { + output.writeInt64NoTag(bucketCounts_.getLong(i)); + } + for (int i = 0; i < exemplars_.size(); i++) { + output.writeMessage(10, exemplars_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, count_); + } + if (java.lang.Double.doubleToRawLongBits(mean_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, mean_); + } + if (java.lang.Double.doubleToRawLongBits(sumOfSquaredDeviation_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, sumOfSquaredDeviation_); + } + if (range_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRange()); + } + if (bucketOptions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getBucketOptions()); + } + { + int dataSize = 0; + for (int i = 0; i < bucketCounts_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(bucketCounts_.getLong(i)); + } + size += dataSize; + if (!getBucketCountsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + bucketCountsMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < exemplars_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, exemplars_.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.api.Distribution)) { + return super.equals(obj); + } + com.google.api.Distribution other = (com.google.api.Distribution) obj; + + if (getCount() != other.getCount()) return false; + if (java.lang.Double.doubleToLongBits(getMean()) + != java.lang.Double.doubleToLongBits(other.getMean())) return false; + if (java.lang.Double.doubleToLongBits(getSumOfSquaredDeviation()) + != java.lang.Double.doubleToLongBits(other.getSumOfSquaredDeviation())) return false; + if (hasRange() != other.hasRange()) return false; + if (hasRange()) { + if (!getRange().equals(other.getRange())) return false; + } + if (hasBucketOptions() != other.hasBucketOptions()) return false; + if (hasBucketOptions()) { + if (!getBucketOptions().equals(other.getBucketOptions())) return false; + } + if (!getBucketCountsList().equals(other.getBucketCountsList())) return false; + if (!getExemplarsList().equals(other.getExemplarsList())) 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) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (37 * hash) + MEAN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMean())); + hash = (37 * hash) + SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getSumOfSquaredDeviation())); + if (hasRange()) { + hash = (37 * hash) + RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRange().hashCode(); + } + if (hasBucketOptions()) { + hash = (37 * hash) + BUCKET_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getBucketOptions().hashCode(); + } + if (getBucketCountsCount() > 0) { + hash = (37 * hash) + BUCKET_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getBucketCountsList().hashCode(); + } + if (getExemplarsCount() > 0) { + hash = (37 * hash) + EXEMPLARS_FIELD_NUMBER; + hash = (53 * hash) + getExemplarsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Distribution parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution 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.api.Distribution parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Distribution parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Distribution parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution 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.api.Distribution parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Distribution 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.api.Distribution parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Distribution 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.api.Distribution 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; + } + /** + * + * + *
+   * `Distribution` contains summary statistics for a population of values. It
+   * optionally contains a histogram representing the distribution of those values
+   * across a set of buckets.
+   *
+   * The summary statistics are the count, mean, sum of the squared deviation from
+   * the mean, the minimum, and the maximum of the set of population of values.
+   * The histogram is based on a sequence of buckets and gives a count of values
+   * that fall into each bucket. The boundaries of the buckets are given either
+   * explicitly or by formulas for buckets of fixed or exponentially increasing
+   * widths.
+   *
+   * Although it is not forbidden, it is generally a bad idea to include
+   * non-finite values (infinities or NaNs) in the population of values, as this
+   * will render the `mean` and `sum_of_squared_deviation` fields meaningless.
+   * 
+ * + * Protobuf type {@code google.api.Distribution} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Distribution) + com.google.api.DistributionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DistributionProto.internal_static_google_api_Distribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DistributionProto + .internal_static_google_api_Distribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Distribution.class, com.google.api.Distribution.Builder.class); + } + + // Construct using com.google.api.Distribution.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + count_ = 0L; + mean_ = 0D; + sumOfSquaredDeviation_ = 0D; + range_ = null; + if (rangeBuilder_ != null) { + rangeBuilder_.dispose(); + rangeBuilder_ = null; + } + bucketOptions_ = null; + if (bucketOptionsBuilder_ != null) { + bucketOptionsBuilder_.dispose(); + bucketOptionsBuilder_ = null; + } + bucketCounts_ = emptyLongList(); + if (exemplarsBuilder_ == null) { + exemplars_ = java.util.Collections.emptyList(); + } else { + exemplars_ = null; + exemplarsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.DistributionProto.internal_static_google_api_Distribution_descriptor; + } + + @java.lang.Override + public com.google.api.Distribution getDefaultInstanceForType() { + return com.google.api.Distribution.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Distribution build() { + com.google.api.Distribution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Distribution buildPartial() { + com.google.api.Distribution result = new com.google.api.Distribution(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Distribution result) { + if (((bitField0_ & 0x00000020) != 0)) { + bucketCounts_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.bucketCounts_ = bucketCounts_; + if (exemplarsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + exemplars_ = java.util.Collections.unmodifiableList(exemplars_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.exemplars_ = exemplars_; + } else { + result.exemplars_ = exemplarsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Distribution result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.count_ = count_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mean_ = mean_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sumOfSquaredDeviation_ = sumOfSquaredDeviation_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.range_ = rangeBuilder_ == null ? range_ : rangeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.bucketOptions_ = + bucketOptionsBuilder_ == null ? bucketOptions_ : bucketOptionsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Distribution) { + return mergeFrom((com.google.api.Distribution) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Distribution other) { + if (other == com.google.api.Distribution.getDefaultInstance()) return this; + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + if (other.getMean() != 0D) { + setMean(other.getMean()); + } + if (other.getSumOfSquaredDeviation() != 0D) { + setSumOfSquaredDeviation(other.getSumOfSquaredDeviation()); + } + if (other.hasRange()) { + mergeRange(other.getRange()); + } + if (other.hasBucketOptions()) { + mergeBucketOptions(other.getBucketOptions()); + } + if (!other.bucketCounts_.isEmpty()) { + if (bucketCounts_.isEmpty()) { + bucketCounts_ = other.bucketCounts_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureBucketCountsIsMutable(); + bucketCounts_.addAll(other.bucketCounts_); + } + onChanged(); + } + if (exemplarsBuilder_ == null) { + if (!other.exemplars_.isEmpty()) { + if (exemplars_.isEmpty()) { + exemplars_ = other.exemplars_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureExemplarsIsMutable(); + exemplars_.addAll(other.exemplars_); + } + onChanged(); + } + } else { + if (!other.exemplars_.isEmpty()) { + if (exemplarsBuilder_.isEmpty()) { + exemplarsBuilder_.dispose(); + exemplarsBuilder_ = null; + exemplars_ = other.exemplars_; + bitField0_ = (bitField0_ & ~0x00000040); + exemplarsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExemplarsFieldBuilder() + : null; + } else { + exemplarsBuilder_.addAllMessages(other.exemplars_); + } + } + } + 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: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: + { + mean_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + sumOfSquaredDeviation_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 34: + { + input.readMessage(getRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 50: + { + input.readMessage(getBucketOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 56: + { + long v = input.readInt64(); + ensureBucketCountsIsMutable(); + bucketCounts_.addLong(v); + break; + } // case 56 + case 58: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureBucketCountsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + bucketCounts_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 58 + case 82: + { + com.google.api.Distribution.Exemplar m = + input.readMessage( + com.google.api.Distribution.Exemplar.parser(), extensionRegistry); + if (exemplarsBuilder_ == null) { + ensureExemplarsIsMutable(); + exemplars_.add(m); + } else { + exemplarsBuilder_.addMessage(m); + } + 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 long count_; + /** + * + * + *
+     * The number of values in the population. Must be non-negative. This value
+     * must equal the sum of the values in `bucket_counts` if a histogram is
+     * provided.
+     * 
+ * + * int64 count = 1; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * + * + *
+     * The number of values in the population. Must be non-negative. This value
+     * must equal the sum of the values in `bucket_counts` if a histogram is
+     * provided.
+     * 
+ * + * int64 count = 1; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of values in the population. Must be non-negative. This value
+     * must equal the sum of the values in `bucket_counts` if a histogram is
+     * provided.
+     * 
+ * + * int64 count = 1; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000001); + count_ = 0L; + onChanged(); + return this; + } + + private double mean_; + /** + * + * + *
+     * The arithmetic mean of the values in the population. If `count` is zero
+     * then this field must be zero.
+     * 
+ * + * double mean = 2; + * + * @return The mean. + */ + @java.lang.Override + public double getMean() { + return mean_; + } + /** + * + * + *
+     * The arithmetic mean of the values in the population. If `count` is zero
+     * then this field must be zero.
+     * 
+ * + * double mean = 2; + * + * @param value The mean to set. + * @return This builder for chaining. + */ + public Builder setMean(double value) { + + mean_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The arithmetic mean of the values in the population. If `count` is zero
+     * then this field must be zero.
+     * 
+ * + * double mean = 2; + * + * @return This builder for chaining. + */ + public Builder clearMean() { + bitField0_ = (bitField0_ & ~0x00000002); + mean_ = 0D; + onChanged(); + return this; + } + + private double sumOfSquaredDeviation_; + /** + * + * + *
+     * The sum of squared deviations from the mean of the values in the
+     * population. For values x_i this is:
+     *
+     *     Sum[i=1..n]((x_i - mean)^2)
+     *
+     * Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
+     * describes Welford's method for accumulating this sum in one pass.
+     *
+     * If `count` is zero then this field must be zero.
+     * 
+ * + * double sum_of_squared_deviation = 3; + * + * @return The sumOfSquaredDeviation. + */ + @java.lang.Override + public double getSumOfSquaredDeviation() { + return sumOfSquaredDeviation_; + } + /** + * + * + *
+     * The sum of squared deviations from the mean of the values in the
+     * population. For values x_i this is:
+     *
+     *     Sum[i=1..n]((x_i - mean)^2)
+     *
+     * Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
+     * describes Welford's method for accumulating this sum in one pass.
+     *
+     * If `count` is zero then this field must be zero.
+     * 
+ * + * double sum_of_squared_deviation = 3; + * + * @param value The sumOfSquaredDeviation to set. + * @return This builder for chaining. + */ + public Builder setSumOfSquaredDeviation(double value) { + + sumOfSquaredDeviation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The sum of squared deviations from the mean of the values in the
+     * population. For values x_i this is:
+     *
+     *     Sum[i=1..n]((x_i - mean)^2)
+     *
+     * Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
+     * describes Welford's method for accumulating this sum in one pass.
+     *
+     * If `count` is zero then this field must be zero.
+     * 
+ * + * double sum_of_squared_deviation = 3; + * + * @return This builder for chaining. + */ + public Builder clearSumOfSquaredDeviation() { + bitField0_ = (bitField0_ & ~0x00000004); + sumOfSquaredDeviation_ = 0D; + onChanged(); + return this; + } + + private com.google.api.Distribution.Range range_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.Range, + com.google.api.Distribution.Range.Builder, + com.google.api.Distribution.RangeOrBuilder> + rangeBuilder_; + /** + * + * + *
+     * If specified, contains the range of the population values. The field
+     * must not be present if the `count` is zero.
+     * 
+ * + * .google.api.Distribution.Range range = 4; + * + * @return Whether the range field is set. + */ + public boolean hasRange() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * If specified, contains the range of the population values. The field
+     * must not be present if the `count` is zero.
+     * 
+ * + * .google.api.Distribution.Range range = 4; + * + * @return The range. + */ + public com.google.api.Distribution.Range getRange() { + if (rangeBuilder_ == null) { + return range_ == null ? com.google.api.Distribution.Range.getDefaultInstance() : range_; + } else { + return rangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * If specified, contains the range of the population values. The field
+     * must not be present if the `count` is zero.
+     * 
+ * + * .google.api.Distribution.Range range = 4; + */ + public Builder setRange(com.google.api.Distribution.Range value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + range_ = value; + } else { + rangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, contains the range of the population values. The field
+     * must not be present if the `count` is zero.
+     * 
+ * + * .google.api.Distribution.Range range = 4; + */ + public Builder setRange(com.google.api.Distribution.Range.Builder builderForValue) { + if (rangeBuilder_ == null) { + range_ = builderForValue.build(); + } else { + rangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, contains the range of the population values. The field
+     * must not be present if the `count` is zero.
+     * 
+ * + * .google.api.Distribution.Range range = 4; + */ + public Builder mergeRange(com.google.api.Distribution.Range value) { + if (rangeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && range_ != null + && range_ != com.google.api.Distribution.Range.getDefaultInstance()) { + getRangeBuilder().mergeFrom(value); + } else { + range_ = value; + } + } else { + rangeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, contains the range of the population values. The field
+     * must not be present if the `count` is zero.
+     * 
+ * + * .google.api.Distribution.Range range = 4; + */ + public Builder clearRange() { + bitField0_ = (bitField0_ & ~0x00000008); + range_ = null; + if (rangeBuilder_ != null) { + rangeBuilder_.dispose(); + rangeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, contains the range of the population values. The field
+     * must not be present if the `count` is zero.
+     * 
+ * + * .google.api.Distribution.Range range = 4; + */ + public com.google.api.Distribution.Range.Builder getRangeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If specified, contains the range of the population values. The field
+     * must not be present if the `count` is zero.
+     * 
+ * + * .google.api.Distribution.Range range = 4; + */ + public com.google.api.Distribution.RangeOrBuilder getRangeOrBuilder() { + if (rangeBuilder_ != null) { + return rangeBuilder_.getMessageOrBuilder(); + } else { + return range_ == null ? com.google.api.Distribution.Range.getDefaultInstance() : range_; + } + } + /** + * + * + *
+     * If specified, contains the range of the population values. The field
+     * must not be present if the `count` is zero.
+     * 
+ * + * .google.api.Distribution.Range range = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.Range, + com.google.api.Distribution.Range.Builder, + com.google.api.Distribution.RangeOrBuilder> + getRangeFieldBuilder() { + if (rangeBuilder_ == null) { + rangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.Range, + com.google.api.Distribution.Range.Builder, + com.google.api.Distribution.RangeOrBuilder>( + getRange(), getParentForChildren(), isClean()); + range_ = null; + } + return rangeBuilder_; + } + + private com.google.api.Distribution.BucketOptions bucketOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions, + com.google.api.Distribution.BucketOptions.Builder, + com.google.api.Distribution.BucketOptionsOrBuilder> + bucketOptionsBuilder_; + /** + * + * + *
+     * Defines the histogram bucket boundaries. If the distribution does not
+     * contain a histogram, then omit this field.
+     * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + * + * @return Whether the bucketOptions field is set. + */ + public boolean hasBucketOptions() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Defines the histogram bucket boundaries. If the distribution does not
+     * contain a histogram, then omit this field.
+     * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + * + * @return The bucketOptions. + */ + public com.google.api.Distribution.BucketOptions getBucketOptions() { + if (bucketOptionsBuilder_ == null) { + return bucketOptions_ == null + ? com.google.api.Distribution.BucketOptions.getDefaultInstance() + : bucketOptions_; + } else { + return bucketOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Defines the histogram bucket boundaries. If the distribution does not
+     * contain a histogram, then omit this field.
+     * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + */ + public Builder setBucketOptions(com.google.api.Distribution.BucketOptions value) { + if (bucketOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bucketOptions_ = value; + } else { + bucketOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines the histogram bucket boundaries. If the distribution does not
+     * contain a histogram, then omit this field.
+     * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + */ + public Builder setBucketOptions( + com.google.api.Distribution.BucketOptions.Builder builderForValue) { + if (bucketOptionsBuilder_ == null) { + bucketOptions_ = builderForValue.build(); + } else { + bucketOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines the histogram bucket boundaries. If the distribution does not
+     * contain a histogram, then omit this field.
+     * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + */ + public Builder mergeBucketOptions(com.google.api.Distribution.BucketOptions value) { + if (bucketOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && bucketOptions_ != null + && bucketOptions_ != com.google.api.Distribution.BucketOptions.getDefaultInstance()) { + getBucketOptionsBuilder().mergeFrom(value); + } else { + bucketOptions_ = value; + } + } else { + bucketOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines the histogram bucket boundaries. If the distribution does not
+     * contain a histogram, then omit this field.
+     * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + */ + public Builder clearBucketOptions() { + bitField0_ = (bitField0_ & ~0x00000010); + bucketOptions_ = null; + if (bucketOptionsBuilder_ != null) { + bucketOptionsBuilder_.dispose(); + bucketOptionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Defines the histogram bucket boundaries. If the distribution does not
+     * contain a histogram, then omit this field.
+     * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + */ + public com.google.api.Distribution.BucketOptions.Builder getBucketOptionsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getBucketOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Defines the histogram bucket boundaries. If the distribution does not
+     * contain a histogram, then omit this field.
+     * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + */ + public com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuilder() { + if (bucketOptionsBuilder_ != null) { + return bucketOptionsBuilder_.getMessageOrBuilder(); + } else { + return bucketOptions_ == null + ? com.google.api.Distribution.BucketOptions.getDefaultInstance() + : bucketOptions_; + } + } + /** + * + * + *
+     * Defines the histogram bucket boundaries. If the distribution does not
+     * contain a histogram, then omit this field.
+     * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions, + com.google.api.Distribution.BucketOptions.Builder, + com.google.api.Distribution.BucketOptionsOrBuilder> + getBucketOptionsFieldBuilder() { + if (bucketOptionsBuilder_ == null) { + bucketOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Distribution.BucketOptions, + com.google.api.Distribution.BucketOptions.Builder, + com.google.api.Distribution.BucketOptionsOrBuilder>( + getBucketOptions(), getParentForChildren(), isClean()); + bucketOptions_ = null; + } + return bucketOptionsBuilder_; + } + + private com.google.protobuf.Internal.LongList bucketCounts_ = emptyLongList(); + + private void ensureBucketCountsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + bucketCounts_ = mutableCopy(bucketCounts_); + bitField0_ |= 0x00000020; + } + } + /** + * + * + *
+     * The number of values in each bucket of the histogram, as described in
+     * `bucket_options`. If the distribution does not have a histogram, then omit
+     * this field. If there is a histogram, then the sum of the values in
+     * `bucket_counts` must equal the value in the `count` field of the
+     * distribution.
+     *
+     * If present, `bucket_counts` should contain N values, where N is the number
+     * of buckets specified in `bucket_options`. If you supply fewer than N
+     * values, the remaining values are assumed to be 0.
+     *
+     * The order of the values in `bucket_counts` follows the bucket numbering
+     * schemes described for the three bucket types. The first value must be the
+     * count for the underflow bucket (number 0). The next N-2 values are the
+     * counts for the finite buckets (number 1 through N-2). The N'th value in
+     * `bucket_counts` is the count for the overflow bucket (number N-1).
+     * 
+ * + * repeated int64 bucket_counts = 7; + * + * @return A list containing the bucketCounts. + */ + public java.util.List getBucketCountsList() { + return ((bitField0_ & 0x00000020) != 0) + ? java.util.Collections.unmodifiableList(bucketCounts_) + : bucketCounts_; + } + /** + * + * + *
+     * The number of values in each bucket of the histogram, as described in
+     * `bucket_options`. If the distribution does not have a histogram, then omit
+     * this field. If there is a histogram, then the sum of the values in
+     * `bucket_counts` must equal the value in the `count` field of the
+     * distribution.
+     *
+     * If present, `bucket_counts` should contain N values, where N is the number
+     * of buckets specified in `bucket_options`. If you supply fewer than N
+     * values, the remaining values are assumed to be 0.
+     *
+     * The order of the values in `bucket_counts` follows the bucket numbering
+     * schemes described for the three bucket types. The first value must be the
+     * count for the underflow bucket (number 0). The next N-2 values are the
+     * counts for the finite buckets (number 1 through N-2). The N'th value in
+     * `bucket_counts` is the count for the overflow bucket (number N-1).
+     * 
+ * + * repeated int64 bucket_counts = 7; + * + * @return The count of bucketCounts. + */ + public int getBucketCountsCount() { + return bucketCounts_.size(); + } + /** + * + * + *
+     * The number of values in each bucket of the histogram, as described in
+     * `bucket_options`. If the distribution does not have a histogram, then omit
+     * this field. If there is a histogram, then the sum of the values in
+     * `bucket_counts` must equal the value in the `count` field of the
+     * distribution.
+     *
+     * If present, `bucket_counts` should contain N values, where N is the number
+     * of buckets specified in `bucket_options`. If you supply fewer than N
+     * values, the remaining values are assumed to be 0.
+     *
+     * The order of the values in `bucket_counts` follows the bucket numbering
+     * schemes described for the three bucket types. The first value must be the
+     * count for the underflow bucket (number 0). The next N-2 values are the
+     * counts for the finite buckets (number 1 through N-2). The N'th value in
+     * `bucket_counts` is the count for the overflow bucket (number N-1).
+     * 
+ * + * repeated int64 bucket_counts = 7; + * + * @param index The index of the element to return. + * @return The bucketCounts at the given index. + */ + public long getBucketCounts(int index) { + return bucketCounts_.getLong(index); + } + /** + * + * + *
+     * The number of values in each bucket of the histogram, as described in
+     * `bucket_options`. If the distribution does not have a histogram, then omit
+     * this field. If there is a histogram, then the sum of the values in
+     * `bucket_counts` must equal the value in the `count` field of the
+     * distribution.
+     *
+     * If present, `bucket_counts` should contain N values, where N is the number
+     * of buckets specified in `bucket_options`. If you supply fewer than N
+     * values, the remaining values are assumed to be 0.
+     *
+     * The order of the values in `bucket_counts` follows the bucket numbering
+     * schemes described for the three bucket types. The first value must be the
+     * count for the underflow bucket (number 0). The next N-2 values are the
+     * counts for the finite buckets (number 1 through N-2). The N'th value in
+     * `bucket_counts` is the count for the overflow bucket (number N-1).
+     * 
+ * + * repeated int64 bucket_counts = 7; + * + * @param index The index to set the value at. + * @param value The bucketCounts to set. + * @return This builder for chaining. + */ + public Builder setBucketCounts(int index, long value) { + + ensureBucketCountsIsMutable(); + bucketCounts_.setLong(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The number of values in each bucket of the histogram, as described in
+     * `bucket_options`. If the distribution does not have a histogram, then omit
+     * this field. If there is a histogram, then the sum of the values in
+     * `bucket_counts` must equal the value in the `count` field of the
+     * distribution.
+     *
+     * If present, `bucket_counts` should contain N values, where N is the number
+     * of buckets specified in `bucket_options`. If you supply fewer than N
+     * values, the remaining values are assumed to be 0.
+     *
+     * The order of the values in `bucket_counts` follows the bucket numbering
+     * schemes described for the three bucket types. The first value must be the
+     * count for the underflow bucket (number 0). The next N-2 values are the
+     * counts for the finite buckets (number 1 through N-2). The N'th value in
+     * `bucket_counts` is the count for the overflow bucket (number N-1).
+     * 
+ * + * repeated int64 bucket_counts = 7; + * + * @param value The bucketCounts to add. + * @return This builder for chaining. + */ + public Builder addBucketCounts(long value) { + + ensureBucketCountsIsMutable(); + bucketCounts_.addLong(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The number of values in each bucket of the histogram, as described in
+     * `bucket_options`. If the distribution does not have a histogram, then omit
+     * this field. If there is a histogram, then the sum of the values in
+     * `bucket_counts` must equal the value in the `count` field of the
+     * distribution.
+     *
+     * If present, `bucket_counts` should contain N values, where N is the number
+     * of buckets specified in `bucket_options`. If you supply fewer than N
+     * values, the remaining values are assumed to be 0.
+     *
+     * The order of the values in `bucket_counts` follows the bucket numbering
+     * schemes described for the three bucket types. The first value must be the
+     * count for the underflow bucket (number 0). The next N-2 values are the
+     * counts for the finite buckets (number 1 through N-2). The N'th value in
+     * `bucket_counts` is the count for the overflow bucket (number N-1).
+     * 
+ * + * repeated int64 bucket_counts = 7; + * + * @param values The bucketCounts to add. + * @return This builder for chaining. + */ + public Builder addAllBucketCounts(java.lang.Iterable values) { + ensureBucketCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bucketCounts_); + onChanged(); + return this; + } + /** + * + * + *
+     * The number of values in each bucket of the histogram, as described in
+     * `bucket_options`. If the distribution does not have a histogram, then omit
+     * this field. If there is a histogram, then the sum of the values in
+     * `bucket_counts` must equal the value in the `count` field of the
+     * distribution.
+     *
+     * If present, `bucket_counts` should contain N values, where N is the number
+     * of buckets specified in `bucket_options`. If you supply fewer than N
+     * values, the remaining values are assumed to be 0.
+     *
+     * The order of the values in `bucket_counts` follows the bucket numbering
+     * schemes described for the three bucket types. The first value must be the
+     * count for the underflow bucket (number 0). The next N-2 values are the
+     * counts for the finite buckets (number 1 through N-2). The N'th value in
+     * `bucket_counts` is the count for the overflow bucket (number N-1).
+     * 
+ * + * repeated int64 bucket_counts = 7; + * + * @return This builder for chaining. + */ + public Builder clearBucketCounts() { + bucketCounts_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + private java.util.List exemplars_ = + java.util.Collections.emptyList(); + + private void ensureExemplarsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + exemplars_ = new java.util.ArrayList(exemplars_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Distribution.Exemplar, + com.google.api.Distribution.Exemplar.Builder, + com.google.api.Distribution.ExemplarOrBuilder> + exemplarsBuilder_; + + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public java.util.List getExemplarsList() { + if (exemplarsBuilder_ == null) { + return java.util.Collections.unmodifiableList(exemplars_); + } else { + return exemplarsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public int getExemplarsCount() { + if (exemplarsBuilder_ == null) { + return exemplars_.size(); + } else { + return exemplarsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public com.google.api.Distribution.Exemplar getExemplars(int index) { + if (exemplarsBuilder_ == null) { + return exemplars_.get(index); + } else { + return exemplarsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public Builder setExemplars(int index, com.google.api.Distribution.Exemplar value) { + if (exemplarsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExemplarsIsMutable(); + exemplars_.set(index, value); + onChanged(); + } else { + exemplarsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public Builder setExemplars( + int index, com.google.api.Distribution.Exemplar.Builder builderForValue) { + if (exemplarsBuilder_ == null) { + ensureExemplarsIsMutable(); + exemplars_.set(index, builderForValue.build()); + onChanged(); + } else { + exemplarsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public Builder addExemplars(com.google.api.Distribution.Exemplar value) { + if (exemplarsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExemplarsIsMutable(); + exemplars_.add(value); + onChanged(); + } else { + exemplarsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public Builder addExemplars(int index, com.google.api.Distribution.Exemplar value) { + if (exemplarsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExemplarsIsMutable(); + exemplars_.add(index, value); + onChanged(); + } else { + exemplarsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public Builder addExemplars(com.google.api.Distribution.Exemplar.Builder builderForValue) { + if (exemplarsBuilder_ == null) { + ensureExemplarsIsMutable(); + exemplars_.add(builderForValue.build()); + onChanged(); + } else { + exemplarsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public Builder addExemplars( + int index, com.google.api.Distribution.Exemplar.Builder builderForValue) { + if (exemplarsBuilder_ == null) { + ensureExemplarsIsMutable(); + exemplars_.add(index, builderForValue.build()); + onChanged(); + } else { + exemplarsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public Builder addAllExemplars( + java.lang.Iterable values) { + if (exemplarsBuilder_ == null) { + ensureExemplarsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exemplars_); + onChanged(); + } else { + exemplarsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public Builder clearExemplars() { + if (exemplarsBuilder_ == null) { + exemplars_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + exemplarsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public Builder removeExemplars(int index) { + if (exemplarsBuilder_ == null) { + ensureExemplarsIsMutable(); + exemplars_.remove(index); + onChanged(); + } else { + exemplarsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public com.google.api.Distribution.Exemplar.Builder getExemplarsBuilder(int index) { + return getExemplarsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public com.google.api.Distribution.ExemplarOrBuilder getExemplarsOrBuilder(int index) { + if (exemplarsBuilder_ == null) { + return exemplars_.get(index); + } else { + return exemplarsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public java.util.List + getExemplarsOrBuilderList() { + if (exemplarsBuilder_ != null) { + return exemplarsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(exemplars_); + } + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public com.google.api.Distribution.Exemplar.Builder addExemplarsBuilder() { + return getExemplarsFieldBuilder() + .addBuilder(com.google.api.Distribution.Exemplar.getDefaultInstance()); + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public com.google.api.Distribution.Exemplar.Builder addExemplarsBuilder(int index) { + return getExemplarsFieldBuilder() + .addBuilder(index, com.google.api.Distribution.Exemplar.getDefaultInstance()); + } + /** + * + * + *
+     * Must be in increasing order of `value` field.
+     * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + public java.util.List getExemplarsBuilderList() { + return getExemplarsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Distribution.Exemplar, + com.google.api.Distribution.Exemplar.Builder, + com.google.api.Distribution.ExemplarOrBuilder> + getExemplarsFieldBuilder() { + if (exemplarsBuilder_ == null) { + exemplarsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Distribution.Exemplar, + com.google.api.Distribution.Exemplar.Builder, + com.google.api.Distribution.ExemplarOrBuilder>( + exemplars_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + exemplars_ = null; + } + return exemplarsBuilder_; + } + + @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.api.Distribution) + } + + // @@protoc_insertion_point(class_scope:google.api.Distribution) + private static final com.google.api.Distribution DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Distribution(); + } + + public static com.google.api.Distribution getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Distribution 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.api.Distribution getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DistributionOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DistributionOrBuilder.java new file mode 100644 index 000000000000..c5be66c044db --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DistributionOrBuilder.java @@ -0,0 +1,283 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/distribution.proto + +package com.google.api; + +public interface DistributionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Distribution) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The number of values in the population. Must be non-negative. This value
+   * must equal the sum of the values in `bucket_counts` if a histogram is
+   * provided.
+   * 
+ * + * int64 count = 1; + * + * @return The count. + */ + long getCount(); + + /** + * + * + *
+   * The arithmetic mean of the values in the population. If `count` is zero
+   * then this field must be zero.
+   * 
+ * + * double mean = 2; + * + * @return The mean. + */ + double getMean(); + + /** + * + * + *
+   * The sum of squared deviations from the mean of the values in the
+   * population. For values x_i this is:
+   *
+   *     Sum[i=1..n]((x_i - mean)^2)
+   *
+   * Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition
+   * describes Welford's method for accumulating this sum in one pass.
+   *
+   * If `count` is zero then this field must be zero.
+   * 
+ * + * double sum_of_squared_deviation = 3; + * + * @return The sumOfSquaredDeviation. + */ + double getSumOfSquaredDeviation(); + + /** + * + * + *
+   * If specified, contains the range of the population values. The field
+   * must not be present if the `count` is zero.
+   * 
+ * + * .google.api.Distribution.Range range = 4; + * + * @return Whether the range field is set. + */ + boolean hasRange(); + /** + * + * + *
+   * If specified, contains the range of the population values. The field
+   * must not be present if the `count` is zero.
+   * 
+ * + * .google.api.Distribution.Range range = 4; + * + * @return The range. + */ + com.google.api.Distribution.Range getRange(); + /** + * + * + *
+   * If specified, contains the range of the population values. The field
+   * must not be present if the `count` is zero.
+   * 
+ * + * .google.api.Distribution.Range range = 4; + */ + com.google.api.Distribution.RangeOrBuilder getRangeOrBuilder(); + + /** + * + * + *
+   * Defines the histogram bucket boundaries. If the distribution does not
+   * contain a histogram, then omit this field.
+   * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + * + * @return Whether the bucketOptions field is set. + */ + boolean hasBucketOptions(); + /** + * + * + *
+   * Defines the histogram bucket boundaries. If the distribution does not
+   * contain a histogram, then omit this field.
+   * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + * + * @return The bucketOptions. + */ + com.google.api.Distribution.BucketOptions getBucketOptions(); + /** + * + * + *
+   * Defines the histogram bucket boundaries. If the distribution does not
+   * contain a histogram, then omit this field.
+   * 
+ * + * .google.api.Distribution.BucketOptions bucket_options = 6; + */ + com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuilder(); + + /** + * + * + *
+   * The number of values in each bucket of the histogram, as described in
+   * `bucket_options`. If the distribution does not have a histogram, then omit
+   * this field. If there is a histogram, then the sum of the values in
+   * `bucket_counts` must equal the value in the `count` field of the
+   * distribution.
+   *
+   * If present, `bucket_counts` should contain N values, where N is the number
+   * of buckets specified in `bucket_options`. If you supply fewer than N
+   * values, the remaining values are assumed to be 0.
+   *
+   * The order of the values in `bucket_counts` follows the bucket numbering
+   * schemes described for the three bucket types. The first value must be the
+   * count for the underflow bucket (number 0). The next N-2 values are the
+   * counts for the finite buckets (number 1 through N-2). The N'th value in
+   * `bucket_counts` is the count for the overflow bucket (number N-1).
+   * 
+ * + * repeated int64 bucket_counts = 7; + * + * @return A list containing the bucketCounts. + */ + java.util.List getBucketCountsList(); + /** + * + * + *
+   * The number of values in each bucket of the histogram, as described in
+   * `bucket_options`. If the distribution does not have a histogram, then omit
+   * this field. If there is a histogram, then the sum of the values in
+   * `bucket_counts` must equal the value in the `count` field of the
+   * distribution.
+   *
+   * If present, `bucket_counts` should contain N values, where N is the number
+   * of buckets specified in `bucket_options`. If you supply fewer than N
+   * values, the remaining values are assumed to be 0.
+   *
+   * The order of the values in `bucket_counts` follows the bucket numbering
+   * schemes described for the three bucket types. The first value must be the
+   * count for the underflow bucket (number 0). The next N-2 values are the
+   * counts for the finite buckets (number 1 through N-2). The N'th value in
+   * `bucket_counts` is the count for the overflow bucket (number N-1).
+   * 
+ * + * repeated int64 bucket_counts = 7; + * + * @return The count of bucketCounts. + */ + int getBucketCountsCount(); + /** + * + * + *
+   * The number of values in each bucket of the histogram, as described in
+   * `bucket_options`. If the distribution does not have a histogram, then omit
+   * this field. If there is a histogram, then the sum of the values in
+   * `bucket_counts` must equal the value in the `count` field of the
+   * distribution.
+   *
+   * If present, `bucket_counts` should contain N values, where N is the number
+   * of buckets specified in `bucket_options`. If you supply fewer than N
+   * values, the remaining values are assumed to be 0.
+   *
+   * The order of the values in `bucket_counts` follows the bucket numbering
+   * schemes described for the three bucket types. The first value must be the
+   * count for the underflow bucket (number 0). The next N-2 values are the
+   * counts for the finite buckets (number 1 through N-2). The N'th value in
+   * `bucket_counts` is the count for the overflow bucket (number N-1).
+   * 
+ * + * repeated int64 bucket_counts = 7; + * + * @param index The index of the element to return. + * @return The bucketCounts at the given index. + */ + long getBucketCounts(int index); + + /** + * + * + *
+   * Must be in increasing order of `value` field.
+   * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + java.util.List getExemplarsList(); + /** + * + * + *
+   * Must be in increasing order of `value` field.
+   * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + com.google.api.Distribution.Exemplar getExemplars(int index); + /** + * + * + *
+   * Must be in increasing order of `value` field.
+   * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + int getExemplarsCount(); + /** + * + * + *
+   * Must be in increasing order of `value` field.
+   * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + java.util.List + getExemplarsOrBuilderList(); + /** + * + * + *
+   * Must be in increasing order of `value` field.
+   * 
+ * + * repeated .google.api.Distribution.Exemplar exemplars = 10; + */ + com.google.api.Distribution.ExemplarOrBuilder getExemplarsOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DistributionProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DistributionProto.java new file mode 100644 index 000000000000..550f18ee763d --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DistributionProto.java @@ -0,0 +1,169 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/distribution.proto + +package com.google.api; + +public final class DistributionProto { + private DistributionProto() {} + + 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_api_Distribution_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Distribution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Distribution_Range_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Distribution_Range_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Distribution_BucketOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Distribution_BucketOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Distribution_BucketOptions_Linear_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Distribution_BucketOptions_Linear_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Distribution_BucketOptions_Exponential_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Distribution_BucketOptions_Exponential_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Distribution_BucketOptions_Explicit_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Distribution_BucketOptions_Explicit_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Distribution_Exemplar_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Distribution_Exemplar_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\035google/api/distribution.proto\022\ngoogle." + + "api\032\031google/protobuf/any.proto\032\037google/p" + + "rotobuf/timestamp.proto\"\331\006\n\014Distribution" + + "\022\r\n\005count\030\001 \001(\003\022\014\n\004mean\030\002 \001(\001\022 \n\030sum_of_" + + "squared_deviation\030\003 \001(\001\022-\n\005range\030\004 \001(\0132\036" + + ".google.api.Distribution.Range\022>\n\016bucket" + + "_options\030\006 \001(\0132&.google.api.Distribution" + + ".BucketOptions\022\025\n\rbucket_counts\030\007 \003(\003\0224\n" + + "\texemplars\030\n \003(\0132!.google.api.Distributi" + + "on.Exemplar\032!\n\005Range\022\013\n\003min\030\001 \001(\001\022\013\n\003max" + + "\030\002 \001(\001\032\265\003\n\rBucketOptions\022G\n\016linear_bucke" + + "ts\030\001 \001(\0132-.google.api.Distribution.Bucke" + + "tOptions.LinearH\000\022Q\n\023exponential_buckets" + + "\030\002 \001(\01322.google.api.Distribution.BucketO" + + "ptions.ExponentialH\000\022K\n\020explicit_buckets" + + "\030\003 \001(\0132/.google.api.Distribution.BucketO" + + "ptions.ExplicitH\000\032C\n\006Linear\022\032\n\022num_finit" + + "e_buckets\030\001 \001(\005\022\r\n\005width\030\002 \001(\001\022\016\n\006offset" + + "\030\003 \001(\001\032O\n\013Exponential\022\032\n\022num_finite_buck" + + "ets\030\001 \001(\005\022\025\n\rgrowth_factor\030\002 \001(\001\022\r\n\005scal" + + "e\030\003 \001(\001\032\032\n\010Explicit\022\016\n\006bounds\030\001 \003(\001B\t\n\007o" + + "ptions\032s\n\010Exemplar\022\r\n\005value\030\001 \001(\001\022-\n\ttim" + + "estamp\030\002 \001(\0132\032.google.protobuf.Timestamp" + + "\022)\n\013attachments\030\003 \003(\0132\024.google.protobuf." + + "AnyBq\n\016com.google.apiB\021DistributionProto" + + "P\001ZCgoogle.golang.org/genproto/googleapi" + + "s/api/distribution;distribution\242\002\004GAPIb\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_api_Distribution_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Distribution_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Distribution_descriptor, + new java.lang.String[] { + "Count", + "Mean", + "SumOfSquaredDeviation", + "Range", + "BucketOptions", + "BucketCounts", + "Exemplars", + }); + internal_static_google_api_Distribution_Range_descriptor = + internal_static_google_api_Distribution_descriptor.getNestedTypes().get(0); + internal_static_google_api_Distribution_Range_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Distribution_Range_descriptor, + new java.lang.String[] { + "Min", "Max", + }); + internal_static_google_api_Distribution_BucketOptions_descriptor = + internal_static_google_api_Distribution_descriptor.getNestedTypes().get(1); + internal_static_google_api_Distribution_BucketOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Distribution_BucketOptions_descriptor, + new java.lang.String[] { + "LinearBuckets", "ExponentialBuckets", "ExplicitBuckets", "Options", + }); + internal_static_google_api_Distribution_BucketOptions_Linear_descriptor = + internal_static_google_api_Distribution_BucketOptions_descriptor.getNestedTypes().get(0); + internal_static_google_api_Distribution_BucketOptions_Linear_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Distribution_BucketOptions_Linear_descriptor, + new java.lang.String[] { + "NumFiniteBuckets", "Width", "Offset", + }); + internal_static_google_api_Distribution_BucketOptions_Exponential_descriptor = + internal_static_google_api_Distribution_BucketOptions_descriptor.getNestedTypes().get(1); + internal_static_google_api_Distribution_BucketOptions_Exponential_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Distribution_BucketOptions_Exponential_descriptor, + new java.lang.String[] { + "NumFiniteBuckets", "GrowthFactor", "Scale", + }); + internal_static_google_api_Distribution_BucketOptions_Explicit_descriptor = + internal_static_google_api_Distribution_BucketOptions_descriptor.getNestedTypes().get(2); + internal_static_google_api_Distribution_BucketOptions_Explicit_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Distribution_BucketOptions_Explicit_descriptor, + new java.lang.String[] { + "Bounds", + }); + internal_static_google_api_Distribution_Exemplar_descriptor = + internal_static_google_api_Distribution_descriptor.getNestedTypes().get(2); + internal_static_google_api_Distribution_Exemplar_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Distribution_Exemplar_descriptor, + new java.lang.String[] { + "Value", "Timestamp", "Attachments", + }); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Documentation.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Documentation.java new file mode 100644 index 000000000000..aa609130d8de --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Documentation.java @@ -0,0 +1,2401 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +/** + * + * + *
+ * `Documentation` provides the information for describing a service.
+ *
+ * Example:
+ * <pre><code>documentation:
+ *   summary: >
+ *     The Google Calendar API gives access
+ *     to most calendar features.
+ *   pages:
+ *   - name: Overview
+ *     content: &#40;== include google/foo/overview.md ==&#41;
+ *   - name: Tutorial
+ *     content: &#40;== include google/foo/tutorial.md ==&#41;
+ *     subpages;
+ *     - name: Java
+ *       content: &#40;== include google/foo/tutorial_java.md ==&#41;
+ *   rules:
+ *   - selector: google.calendar.Calendar.Get
+ *     description: >
+ *       ...
+ *   - selector: google.calendar.Calendar.Put
+ *     description: >
+ *       ...
+ * </code></pre>
+ * Documentation is provided in markdown syntax. In addition to
+ * standard markdown features, definition lists, tables and fenced
+ * code blocks are supported. Section headers can be provided and are
+ * interpreted relative to the section nesting of the context where
+ * a documentation fragment is embedded.
+ *
+ * Documentation from the IDL is merged with documentation defined
+ * via the config at normalization time, where documentation provided
+ * by config rules overrides IDL provided.
+ *
+ * A number of constructs specific to the API platform are supported
+ * in documentation text.
+ *
+ * In order to reference a proto element, the following
+ * notation can be used:
+ * <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
+ * To override the display text used for the link, this can be used:
+ * <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>
+ * Text can be excluded from doc using the following notation:
+ * <pre><code>&#40;-- internal comment --&#41;</code></pre>
+ *
+ * A few directives are available in documentation. Note that
+ * directives must appear on a single line to be properly
+ * identified. The `include` directive includes a markdown file from
+ * an external source:
+ * <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
+ * The `resource_for` directive marks a message to be the resource of
+ * a collection in REST view. If it is not specified, tools attempt
+ * to infer the resource from the operations in a collection:
+ * <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre>
+ * The directive `suppress_warning` does not directly affect documentation
+ * and is documented together with service config validation.
+ * 
+ * + * Protobuf type {@code google.api.Documentation} + */ +public final class Documentation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Documentation) + DocumentationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Documentation.newBuilder() to construct. + private Documentation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Documentation() { + summary_ = ""; + pages_ = java.util.Collections.emptyList(); + rules_ = java.util.Collections.emptyList(); + documentationRootUrl_ = ""; + serviceRootUrl_ = ""; + overview_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Documentation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto + .internal_static_google_api_Documentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Documentation.class, com.google.api.Documentation.Builder.class); + } + + public static final int SUMMARY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object summary_ = ""; + /** + * + * + *
+   * A short description of what the service does. The summary must be plain
+   * text. It becomes the overview of the service displayed in Google Cloud
+   * Console.
+   * NOTE: This field is equivalent to the standard field `description`.
+   * 
+ * + * string summary = 1; + * + * @return The summary. + */ + @java.lang.Override + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } + } + /** + * + * + *
+   * A short description of what the service does. The summary must be plain
+   * text. It becomes the overview of the service displayed in Google Cloud
+   * Console.
+   * NOTE: This field is equivalent to the standard field `description`.
+   * 
+ * + * string summary = 1; + * + * @return The bytes for summary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List pages_; + /** + * + * + *
+   * The top level pages for the documentation set.
+   * 
+ * + * repeated .google.api.Page pages = 5; + */ + @java.lang.Override + public java.util.List getPagesList() { + return pages_; + } + /** + * + * + *
+   * The top level pages for the documentation set.
+   * 
+ * + * repeated .google.api.Page pages = 5; + */ + @java.lang.Override + public java.util.List getPagesOrBuilderList() { + return pages_; + } + /** + * + * + *
+   * The top level pages for the documentation set.
+   * 
+ * + * repeated .google.api.Page pages = 5; + */ + @java.lang.Override + public int getPagesCount() { + return pages_.size(); + } + /** + * + * + *
+   * The top level pages for the documentation set.
+   * 
+ * + * repeated .google.api.Page pages = 5; + */ + @java.lang.Override + public com.google.api.Page getPages(int index) { + return pages_.get(index); + } + /** + * + * + *
+   * The top level pages for the documentation set.
+   * 
+ * + * repeated .google.api.Page pages = 5; + */ + @java.lang.Override + public com.google.api.PageOrBuilder getPagesOrBuilder(int index) { + return pages_.get(index); + } + + public static final int RULES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List rules_; + /** + * + * + *
+   * A list of documentation rules that apply to individual API elements.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + /** + * + * + *
+   * A list of documentation rules that apply to individual API elements.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + @java.lang.Override + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * + * + *
+   * A list of documentation rules that apply to individual API elements.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + /** + * + * + *
+   * A list of documentation rules that apply to individual API elements.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + @java.lang.Override + public com.google.api.DocumentationRule getRules(int index) { + return rules_.get(index); + } + /** + * + * + *
+   * A list of documentation rules that apply to individual API elements.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + @java.lang.Override + public com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder(int index) { + return rules_.get(index); + } + + public static final int DOCUMENTATION_ROOT_URL_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object documentationRootUrl_ = ""; + /** + * + * + *
+   * The URL to the root of documentation.
+   * 
+ * + * string documentation_root_url = 4; + * + * @return The documentationRootUrl. + */ + @java.lang.Override + public java.lang.String getDocumentationRootUrl() { + java.lang.Object ref = documentationRootUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + documentationRootUrl_ = s; + return s; + } + } + /** + * + * + *
+   * The URL to the root of documentation.
+   * 
+ * + * string documentation_root_url = 4; + * + * @return The bytes for documentationRootUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentationRootUrlBytes() { + java.lang.Object ref = documentationRootUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + documentationRootUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ROOT_URL_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceRootUrl_ = ""; + /** + * + * + *
+   * Specifies the service root url if the default one (the service name
+   * from the yaml file) is not suitable. This can be seen in any fully
+   * specified service urls as well as sections that show a base that other
+   * urls are relative to.
+   * 
+ * + * string service_root_url = 6; + * + * @return The serviceRootUrl. + */ + @java.lang.Override + public java.lang.String getServiceRootUrl() { + java.lang.Object ref = serviceRootUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceRootUrl_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies the service root url if the default one (the service name
+   * from the yaml file) is not suitable. This can be seen in any fully
+   * specified service urls as well as sections that show a base that other
+   * urls are relative to.
+   * 
+ * + * string service_root_url = 6; + * + * @return The bytes for serviceRootUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceRootUrlBytes() { + java.lang.Object ref = serviceRootUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceRootUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OVERVIEW_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object overview_ = ""; + /** + * + * + *
+   * Declares a single overview page. For example:
+   * <pre><code>documentation:
+   *   summary: ...
+   *   overview: &#40;== include overview.md ==&#41;
+   * </code></pre>
+   * This is a shortcut for the following declaration (using pages style):
+   * <pre><code>documentation:
+   *   summary: ...
+   *   pages:
+   *   - name: Overview
+   *     content: &#40;== include overview.md ==&#41;
+   * </code></pre>
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ * + * string overview = 2; + * + * @return The overview. + */ + @java.lang.Override + public java.lang.String getOverview() { + java.lang.Object ref = overview_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + overview_ = s; + return s; + } + } + /** + * + * + *
+   * Declares a single overview page. For example:
+   * <pre><code>documentation:
+   *   summary: ...
+   *   overview: &#40;== include overview.md ==&#41;
+   * </code></pre>
+   * This is a shortcut for the following declaration (using pages style):
+   * <pre><code>documentation:
+   *   summary: ...
+   *   pages:
+   *   - name: Overview
+   *     content: &#40;== include overview.md ==&#41;
+   * </code></pre>
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ * + * string overview = 2; + * + * @return The bytes for overview. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOverviewBytes() { + java.lang.Object ref = overview_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + overview_ = 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(summary_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, summary_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(overview_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, overview_); + } + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(3, rules_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentationRootUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, documentationRootUrl_); + } + for (int i = 0; i < pages_.size(); i++) { + output.writeMessage(5, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceRootUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, serviceRootUrl_); + } + 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(summary_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, summary_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(overview_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, overview_); + } + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, rules_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentationRootUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, documentationRootUrl_); + } + for (int i = 0; i < pages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, pages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceRootUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, serviceRootUrl_); + } + 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.api.Documentation)) { + return super.equals(obj); + } + com.google.api.Documentation other = (com.google.api.Documentation) obj; + + if (!getSummary().equals(other.getSummary())) return false; + if (!getPagesList().equals(other.getPagesList())) return false; + if (!getRulesList().equals(other.getRulesList())) return false; + if (!getDocumentationRootUrl().equals(other.getDocumentationRootUrl())) return false; + if (!getServiceRootUrl().equals(other.getServiceRootUrl())) return false; + if (!getOverview().equals(other.getOverview())) 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) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + if (getPagesCount() > 0) { + hash = (37 * hash) + PAGES_FIELD_NUMBER; + hash = (53 * hash) + getPagesList().hashCode(); + } + if (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (37 * hash) + DOCUMENTATION_ROOT_URL_FIELD_NUMBER; + hash = (53 * hash) + getDocumentationRootUrl().hashCode(); + hash = (37 * hash) + SERVICE_ROOT_URL_FIELD_NUMBER; + hash = (53 * hash) + getServiceRootUrl().hashCode(); + hash = (37 * hash) + OVERVIEW_FIELD_NUMBER; + hash = (53 * hash) + getOverview().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Documentation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Documentation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Documentation parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Documentation 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.api.Documentation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Documentation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Documentation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Documentation 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.api.Documentation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Documentation 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.api.Documentation parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Documentation 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.api.Documentation 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; + } + /** + * + * + *
+   * `Documentation` provides the information for describing a service.
+   *
+   * Example:
+   * <pre><code>documentation:
+   *   summary: >
+   *     The Google Calendar API gives access
+   *     to most calendar features.
+   *   pages:
+   *   - name: Overview
+   *     content: &#40;== include google/foo/overview.md ==&#41;
+   *   - name: Tutorial
+   *     content: &#40;== include google/foo/tutorial.md ==&#41;
+   *     subpages;
+   *     - name: Java
+   *       content: &#40;== include google/foo/tutorial_java.md ==&#41;
+   *   rules:
+   *   - selector: google.calendar.Calendar.Get
+   *     description: >
+   *       ...
+   *   - selector: google.calendar.Calendar.Put
+   *     description: >
+   *       ...
+   * </code></pre>
+   * Documentation is provided in markdown syntax. In addition to
+   * standard markdown features, definition lists, tables and fenced
+   * code blocks are supported. Section headers can be provided and are
+   * interpreted relative to the section nesting of the context where
+   * a documentation fragment is embedded.
+   *
+   * Documentation from the IDL is merged with documentation defined
+   * via the config at normalization time, where documentation provided
+   * by config rules overrides IDL provided.
+   *
+   * A number of constructs specific to the API platform are supported
+   * in documentation text.
+   *
+   * In order to reference a proto element, the following
+   * notation can be used:
+   * <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
+   * To override the display text used for the link, this can be used:
+   * <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>
+   * Text can be excluded from doc using the following notation:
+   * <pre><code>&#40;-- internal comment --&#41;</code></pre>
+   *
+   * A few directives are available in documentation. Note that
+   * directives must appear on a single line to be properly
+   * identified. The `include` directive includes a markdown file from
+   * an external source:
+   * <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
+   * The `resource_for` directive marks a message to be the resource of
+   * a collection in REST view. If it is not specified, tools attempt
+   * to infer the resource from the operations in a collection:
+   * <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre>
+   * The directive `suppress_warning` does not directly affect documentation
+   * and is documented together with service config validation.
+   * 
+ * + * Protobuf type {@code google.api.Documentation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Documentation) + com.google.api.DocumentationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto + .internal_static_google_api_Documentation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Documentation.class, com.google.api.Documentation.Builder.class); + } + + // Construct using com.google.api.Documentation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + summary_ = ""; + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + } else { + pages_ = null; + pagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + documentationRootUrl_ = ""; + serviceRootUrl_ = ""; + overview_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; + } + + @java.lang.Override + public com.google.api.Documentation getDefaultInstanceForType() { + return com.google.api.Documentation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Documentation build() { + com.google.api.Documentation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Documentation buildPartial() { + com.google.api.Documentation result = new com.google.api.Documentation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Documentation result) { + if (pagesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + pages_ = java.util.Collections.unmodifiableList(pages_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.pages_ = pages_; + } else { + result.pages_ = pagesBuilder_.build(); + } + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Documentation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.summary_ = summary_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.documentationRootUrl_ = documentationRootUrl_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.serviceRootUrl_ = serviceRootUrl_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.overview_ = overview_; + } + } + + @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.api.Documentation) { + return mergeFrom((com.google.api.Documentation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Documentation other) { + if (other == com.google.api.Documentation.getDefaultInstance()) return this; + if (!other.getSummary().isEmpty()) { + summary_ = other.summary_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (pagesBuilder_ == null) { + if (!other.pages_.isEmpty()) { + if (pages_.isEmpty()) { + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePagesIsMutable(); + pages_.addAll(other.pages_); + } + onChanged(); + } + } else { + if (!other.pages_.isEmpty()) { + if (pagesBuilder_.isEmpty()) { + pagesBuilder_.dispose(); + pagesBuilder_ = null; + pages_ = other.pages_; + bitField0_ = (bitField0_ & ~0x00000002); + pagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPagesFieldBuilder() + : null; + } else { + pagesBuilder_.addAllMessages(other.pages_); + } + } + } + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000004); + rulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (!other.getDocumentationRootUrl().isEmpty()) { + documentationRootUrl_ = other.documentationRootUrl_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getServiceRootUrl().isEmpty()) { + serviceRootUrl_ = other.serviceRootUrl_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getOverview().isEmpty()) { + overview_ = other.overview_; + bitField0_ |= 0x00000020; + 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: + { + summary_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + overview_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 18 + case 26: + { + com.google.api.DocumentationRule m = + input.readMessage(com.google.api.DocumentationRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + documentationRootUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.api.Page m = + input.readMessage(com.google.api.Page.parser(), extensionRegistry); + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(m); + } else { + pagesBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + serviceRootUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + 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 summary_ = ""; + /** + * + * + *
+     * A short description of what the service does. The summary must be plain
+     * text. It becomes the overview of the service displayed in Google Cloud
+     * Console.
+     * NOTE: This field is equivalent to the standard field `description`.
+     * 
+ * + * string summary = 1; + * + * @return The summary. + */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A short description of what the service does. The summary must be plain
+     * text. It becomes the overview of the service displayed in Google Cloud
+     * Console.
+     * NOTE: This field is equivalent to the standard field `description`.
+     * 
+ * + * string summary = 1; + * + * @return The bytes for summary. + */ + public com.google.protobuf.ByteString getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A short description of what the service does. The summary must be plain
+     * text. It becomes the overview of the service displayed in Google Cloud
+     * Console.
+     * NOTE: This field is equivalent to the standard field `description`.
+     * 
+ * + * string summary = 1; + * + * @param value The summary to set. + * @return This builder for chaining. + */ + public Builder setSummary(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + summary_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A short description of what the service does. The summary must be plain
+     * text. It becomes the overview of the service displayed in Google Cloud
+     * Console.
+     * NOTE: This field is equivalent to the standard field `description`.
+     * 
+ * + * string summary = 1; + * + * @return This builder for chaining. + */ + public Builder clearSummary() { + summary_ = getDefaultInstance().getSummary(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A short description of what the service does. The summary must be plain
+     * text. It becomes the overview of the service displayed in Google Cloud
+     * Console.
+     * NOTE: This field is equivalent to the standard field `description`.
+     * 
+ * + * string summary = 1; + * + * @param value The bytes for summary to set. + * @return This builder for chaining. + */ + public Builder setSummaryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + summary_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List pages_ = java.util.Collections.emptyList(); + + private void ensurePagesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + pages_ = new java.util.ArrayList(pages_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> + pagesBuilder_; + + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public java.util.List getPagesList() { + if (pagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pages_); + } else { + return pagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public int getPagesCount() { + if (pagesBuilder_ == null) { + return pages_.size(); + } else { + return pagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public com.google.api.Page getPages(int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); + } else { + return pagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public Builder setPages(int index, com.google.api.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.set(index, value); + onChanged(); + } else { + pagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public Builder setPages(int index, com.google.api.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.set(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public Builder addPages(com.google.api.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(value); + onChanged(); + } else { + pagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public Builder addPages(int index, com.google.api.Page value) { + if (pagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePagesIsMutable(); + pages_.add(index, value); + onChanged(); + } else { + pagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public Builder addPages(com.google.api.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public Builder addPages(int index, com.google.api.Page.Builder builderForValue) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.add(index, builderForValue.build()); + onChanged(); + } else { + pagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public Builder addAllPages(java.lang.Iterable values) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pages_); + onChanged(); + } else { + pagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public Builder clearPages() { + if (pagesBuilder_ == null) { + pages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + pagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public Builder removePages(int index) { + if (pagesBuilder_ == null) { + ensurePagesIsMutable(); + pages_.remove(index); + onChanged(); + } else { + pagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public com.google.api.Page.Builder getPagesBuilder(int index) { + return getPagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public com.google.api.PageOrBuilder getPagesOrBuilder(int index) { + if (pagesBuilder_ == null) { + return pages_.get(index); + } else { + return pagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public java.util.List getPagesOrBuilderList() { + if (pagesBuilder_ != null) { + return pagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pages_); + } + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public com.google.api.Page.Builder addPagesBuilder() { + return getPagesFieldBuilder().addBuilder(com.google.api.Page.getDefaultInstance()); + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public com.google.api.Page.Builder addPagesBuilder(int index) { + return getPagesFieldBuilder().addBuilder(index, com.google.api.Page.getDefaultInstance()); + } + /** + * + * + *
+     * The top level pages for the documentation set.
+     * 
+ * + * repeated .google.api.Page pages = 5; + */ + public java.util.List getPagesBuilderList() { + return getPagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> + getPagesFieldBuilder() { + if (pagesBuilder_ == null) { + pagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder>( + pages_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + pages_ = null; + } + return pagesBuilder_; + } + + private java.util.List rules_ = + java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.DocumentationRule, + com.google.api.DocumentationRule.Builder, + com.google.api.DocumentationRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public com.google.api.DocumentationRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public Builder setRules(int index, com.google.api.DocumentationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public Builder setRules(int index, com.google.api.DocumentationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public Builder addRules(com.google.api.DocumentationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public Builder addRules(int index, com.google.api.DocumentationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public Builder addRules(com.google.api.DocumentationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public Builder addRules(int index, com.google.api.DocumentationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public com.google.api.DocumentationRule.Builder getRulesBuilder(int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public com.google.api.DocumentationRule.Builder addRulesBuilder() { + return getRulesFieldBuilder() + .addBuilder(com.google.api.DocumentationRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public com.google.api.DocumentationRule.Builder addRulesBuilder(int index) { + return getRulesFieldBuilder() + .addBuilder(index, com.google.api.DocumentationRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of documentation rules that apply to individual API elements.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + public java.util.List getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.DocumentationRule, + com.google.api.DocumentationRule.Builder, + com.google.api.DocumentationRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.DocumentationRule, + com.google.api.DocumentationRule.Builder, + com.google.api.DocumentationRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private java.lang.Object documentationRootUrl_ = ""; + /** + * + * + *
+     * The URL to the root of documentation.
+     * 
+ * + * string documentation_root_url = 4; + * + * @return The documentationRootUrl. + */ + public java.lang.String getDocumentationRootUrl() { + java.lang.Object ref = documentationRootUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + documentationRootUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URL to the root of documentation.
+     * 
+ * + * string documentation_root_url = 4; + * + * @return The bytes for documentationRootUrl. + */ + public com.google.protobuf.ByteString getDocumentationRootUrlBytes() { + java.lang.Object ref = documentationRootUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + documentationRootUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URL to the root of documentation.
+     * 
+ * + * string documentation_root_url = 4; + * + * @param value The documentationRootUrl to set. + * @return This builder for chaining. + */ + public Builder setDocumentationRootUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + documentationRootUrl_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The URL to the root of documentation.
+     * 
+ * + * string documentation_root_url = 4; + * + * @return This builder for chaining. + */ + public Builder clearDocumentationRootUrl() { + documentationRootUrl_ = getDefaultInstance().getDocumentationRootUrl(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The URL to the root of documentation.
+     * 
+ * + * string documentation_root_url = 4; + * + * @param value The bytes for documentationRootUrl to set. + * @return This builder for chaining. + */ + public Builder setDocumentationRootUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + documentationRootUrl_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object serviceRootUrl_ = ""; + /** + * + * + *
+     * Specifies the service root url if the default one (the service name
+     * from the yaml file) is not suitable. This can be seen in any fully
+     * specified service urls as well as sections that show a base that other
+     * urls are relative to.
+     * 
+ * + * string service_root_url = 6; + * + * @return The serviceRootUrl. + */ + public java.lang.String getServiceRootUrl() { + java.lang.Object ref = serviceRootUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceRootUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies the service root url if the default one (the service name
+     * from the yaml file) is not suitable. This can be seen in any fully
+     * specified service urls as well as sections that show a base that other
+     * urls are relative to.
+     * 
+ * + * string service_root_url = 6; + * + * @return The bytes for serviceRootUrl. + */ + public com.google.protobuf.ByteString getServiceRootUrlBytes() { + java.lang.Object ref = serviceRootUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceRootUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies the service root url if the default one (the service name
+     * from the yaml file) is not suitable. This can be seen in any fully
+     * specified service urls as well as sections that show a base that other
+     * urls are relative to.
+     * 
+ * + * string service_root_url = 6; + * + * @param value The serviceRootUrl to set. + * @return This builder for chaining. + */ + public Builder setServiceRootUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceRootUrl_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the service root url if the default one (the service name
+     * from the yaml file) is not suitable. This can be seen in any fully
+     * specified service urls as well as sections that show a base that other
+     * urls are relative to.
+     * 
+ * + * string service_root_url = 6; + * + * @return This builder for chaining. + */ + public Builder clearServiceRootUrl() { + serviceRootUrl_ = getDefaultInstance().getServiceRootUrl(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the service root url if the default one (the service name
+     * from the yaml file) is not suitable. This can be seen in any fully
+     * specified service urls as well as sections that show a base that other
+     * urls are relative to.
+     * 
+ * + * string service_root_url = 6; + * + * @param value The bytes for serviceRootUrl to set. + * @return This builder for chaining. + */ + public Builder setServiceRootUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceRootUrl_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object overview_ = ""; + /** + * + * + *
+     * Declares a single overview page. For example:
+     * <pre><code>documentation:
+     *   summary: ...
+     *   overview: &#40;== include overview.md ==&#41;
+     * </code></pre>
+     * This is a shortcut for the following declaration (using pages style):
+     * <pre><code>documentation:
+     *   summary: ...
+     *   pages:
+     *   - name: Overview
+     *     content: &#40;== include overview.md ==&#41;
+     * </code></pre>
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ * + * string overview = 2; + * + * @return The overview. + */ + public java.lang.String getOverview() { + java.lang.Object ref = overview_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + overview_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Declares a single overview page. For example:
+     * <pre><code>documentation:
+     *   summary: ...
+     *   overview: &#40;== include overview.md ==&#41;
+     * </code></pre>
+     * This is a shortcut for the following declaration (using pages style):
+     * <pre><code>documentation:
+     *   summary: ...
+     *   pages:
+     *   - name: Overview
+     *     content: &#40;== include overview.md ==&#41;
+     * </code></pre>
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ * + * string overview = 2; + * + * @return The bytes for overview. + */ + public com.google.protobuf.ByteString getOverviewBytes() { + java.lang.Object ref = overview_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + overview_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Declares a single overview page. For example:
+     * <pre><code>documentation:
+     *   summary: ...
+     *   overview: &#40;== include overview.md ==&#41;
+     * </code></pre>
+     * This is a shortcut for the following declaration (using pages style):
+     * <pre><code>documentation:
+     *   summary: ...
+     *   pages:
+     *   - name: Overview
+     *     content: &#40;== include overview.md ==&#41;
+     * </code></pre>
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ * + * string overview = 2; + * + * @param value The overview to set. + * @return This builder for chaining. + */ + public Builder setOverview(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + overview_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Declares a single overview page. For example:
+     * <pre><code>documentation:
+     *   summary: ...
+     *   overview: &#40;== include overview.md ==&#41;
+     * </code></pre>
+     * This is a shortcut for the following declaration (using pages style):
+     * <pre><code>documentation:
+     *   summary: ...
+     *   pages:
+     *   - name: Overview
+     *     content: &#40;== include overview.md ==&#41;
+     * </code></pre>
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ * + * string overview = 2; + * + * @return This builder for chaining. + */ + public Builder clearOverview() { + overview_ = getDefaultInstance().getOverview(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Declares a single overview page. For example:
+     * <pre><code>documentation:
+     *   summary: ...
+     *   overview: &#40;== include overview.md ==&#41;
+     * </code></pre>
+     * This is a shortcut for the following declaration (using pages style):
+     * <pre><code>documentation:
+     *   summary: ...
+     *   pages:
+     *   - name: Overview
+     *     content: &#40;== include overview.md ==&#41;
+     * </code></pre>
+     * Note: you cannot specify both `overview` field and `pages` field.
+     * 
+ * + * string overview = 2; + * + * @param value The bytes for overview to set. + * @return This builder for chaining. + */ + public Builder setOverviewBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + overview_ = value; + bitField0_ |= 0x00000020; + 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.api.Documentation) + } + + // @@protoc_insertion_point(class_scope:google.api.Documentation) + private static final com.google.api.Documentation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Documentation(); + } + + public static com.google.api.Documentation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Documentation 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.api.Documentation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationOrBuilder.java new file mode 100644 index 000000000000..f9a223a21da4 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationOrBuilder.java @@ -0,0 +1,273 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public interface DocumentationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Documentation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A short description of what the service does. The summary must be plain
+   * text. It becomes the overview of the service displayed in Google Cloud
+   * Console.
+   * NOTE: This field is equivalent to the standard field `description`.
+   * 
+ * + * string summary = 1; + * + * @return The summary. + */ + java.lang.String getSummary(); + /** + * + * + *
+   * A short description of what the service does. The summary must be plain
+   * text. It becomes the overview of the service displayed in Google Cloud
+   * Console.
+   * NOTE: This field is equivalent to the standard field `description`.
+   * 
+ * + * string summary = 1; + * + * @return The bytes for summary. + */ + com.google.protobuf.ByteString getSummaryBytes(); + + /** + * + * + *
+   * The top level pages for the documentation set.
+   * 
+ * + * repeated .google.api.Page pages = 5; + */ + java.util.List getPagesList(); + /** + * + * + *
+   * The top level pages for the documentation set.
+   * 
+ * + * repeated .google.api.Page pages = 5; + */ + com.google.api.Page getPages(int index); + /** + * + * + *
+   * The top level pages for the documentation set.
+   * 
+ * + * repeated .google.api.Page pages = 5; + */ + int getPagesCount(); + /** + * + * + *
+   * The top level pages for the documentation set.
+   * 
+ * + * repeated .google.api.Page pages = 5; + */ + java.util.List getPagesOrBuilderList(); + /** + * + * + *
+   * The top level pages for the documentation set.
+   * 
+ * + * repeated .google.api.Page pages = 5; + */ + com.google.api.PageOrBuilder getPagesOrBuilder(int index); + + /** + * + * + *
+   * A list of documentation rules that apply to individual API elements.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + java.util.List getRulesList(); + /** + * + * + *
+   * A list of documentation rules that apply to individual API elements.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + com.google.api.DocumentationRule getRules(int index); + /** + * + * + *
+   * A list of documentation rules that apply to individual API elements.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + int getRulesCount(); + /** + * + * + *
+   * A list of documentation rules that apply to individual API elements.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + java.util.List getRulesOrBuilderList(); + /** + * + * + *
+   * A list of documentation rules that apply to individual API elements.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.DocumentationRule rules = 3; + */ + com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder(int index); + + /** + * + * + *
+   * The URL to the root of documentation.
+   * 
+ * + * string documentation_root_url = 4; + * + * @return The documentationRootUrl. + */ + java.lang.String getDocumentationRootUrl(); + /** + * + * + *
+   * The URL to the root of documentation.
+   * 
+ * + * string documentation_root_url = 4; + * + * @return The bytes for documentationRootUrl. + */ + com.google.protobuf.ByteString getDocumentationRootUrlBytes(); + + /** + * + * + *
+   * Specifies the service root url if the default one (the service name
+   * from the yaml file) is not suitable. This can be seen in any fully
+   * specified service urls as well as sections that show a base that other
+   * urls are relative to.
+   * 
+ * + * string service_root_url = 6; + * + * @return The serviceRootUrl. + */ + java.lang.String getServiceRootUrl(); + /** + * + * + *
+   * Specifies the service root url if the default one (the service name
+   * from the yaml file) is not suitable. This can be seen in any fully
+   * specified service urls as well as sections that show a base that other
+   * urls are relative to.
+   * 
+ * + * string service_root_url = 6; + * + * @return The bytes for serviceRootUrl. + */ + com.google.protobuf.ByteString getServiceRootUrlBytes(); + + /** + * + * + *
+   * Declares a single overview page. For example:
+   * <pre><code>documentation:
+   *   summary: ...
+   *   overview: &#40;== include overview.md ==&#41;
+   * </code></pre>
+   * This is a shortcut for the following declaration (using pages style):
+   * <pre><code>documentation:
+   *   summary: ...
+   *   pages:
+   *   - name: Overview
+   *     content: &#40;== include overview.md ==&#41;
+   * </code></pre>
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ * + * string overview = 2; + * + * @return The overview. + */ + java.lang.String getOverview(); + /** + * + * + *
+   * Declares a single overview page. For example:
+   * <pre><code>documentation:
+   *   summary: ...
+   *   overview: &#40;== include overview.md ==&#41;
+   * </code></pre>
+   * This is a shortcut for the following declaration (using pages style):
+   * <pre><code>documentation:
+   *   summary: ...
+   *   pages:
+   *   - name: Overview
+   *     content: &#40;== include overview.md ==&#41;
+   * </code></pre>
+   * Note: you cannot specify both `overview` field and `pages` field.
+   * 
+ * + * string overview = 2; + * + * @return The bytes for overview. + */ + com.google.protobuf.ByteString getOverviewBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationProto.java new file mode 100644 index 000000000000..109de82ac7c2 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationProto.java @@ -0,0 +1,94 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public final class DocumentationProto { + private DocumentationProto() {} + + 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_api_Documentation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Documentation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_DocumentationRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_DocumentationRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Page_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Page_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\036google/api/documentation.proto\022\ngoogle" + + ".api\"\273\001\n\rDocumentation\022\017\n\007summary\030\001 \001(\t\022" + + "\037\n\005pages\030\005 \003(\0132\020.google.api.Page\022,\n\005rule" + + "s\030\003 \003(\0132\035.google.api.DocumentationRule\022\036" + + "\n\026documentation_root_url\030\004 \001(\t\022\030\n\020servic" + + "e_root_url\030\006 \001(\t\022\020\n\010overview\030\002 \001(\t\"[\n\021Do" + + "cumentationRule\022\020\n\010selector\030\001 \001(\t\022\023\n\013des" + + "cription\030\002 \001(\t\022\037\n\027deprecation_descriptio" + + "n\030\003 \001(\t\"I\n\004Page\022\014\n\004name\030\001 \001(\t\022\017\n\007content" + + "\030\002 \001(\t\022\"\n\010subpages\030\003 \003(\0132\020.google.api.Pa" + + "geBt\n\016com.google.apiB\022DocumentationProto" + + "P\001ZEgoogle.golang.org/genproto/googleapi" + + "s/api/serviceconfig;serviceconfig\242\002\004GAPI" + + "b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_Documentation_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Documentation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Documentation_descriptor, + new java.lang.String[] { + "Summary", "Pages", "Rules", "DocumentationRootUrl", "ServiceRootUrl", "Overview", + }); + internal_static_google_api_DocumentationRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_DocumentationRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_DocumentationRule_descriptor, + new java.lang.String[] { + "Selector", "Description", "DeprecationDescription", + }); + internal_static_google_api_Page_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_google_api_Page_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Page_descriptor, + new java.lang.String[] { + "Name", "Content", "Subpages", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationRule.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationRule.java new file mode 100644 index 000000000000..d36f2329dcbd --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationRule.java @@ -0,0 +1,1046 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +/** + * + * + *
+ * A documentation rule provides information about individual API elements.
+ * 
+ * + * Protobuf type {@code google.api.DocumentationRule} + */ +public final class DocumentationRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.DocumentationRule) + DocumentationRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentationRule.newBuilder() to construct. + private DocumentationRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DocumentationRule() { + selector_ = ""; + description_ = ""; + deprecationDescription_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DocumentationRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DocumentationProto + .internal_static_google_api_DocumentationRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto + .internal_static_google_api_DocumentationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.DocumentationRule.class, com.google.api.DocumentationRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object selector_ = ""; + /** + * + * + *
+   * The selector is a comma-separated list of patterns for any element such as
+   * a method, a field, an enum value. Each pattern is a qualified name of the
+   * element which may end in "*", indicating a wildcard. Wildcards are only
+   * allowed at the end and for a whole component of the qualified name,
+   * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+   * one or more components. To specify a default for all applicable elements,
+   * the whole pattern "*" is used.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + @java.lang.Override + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * + * + *
+   * The selector is a comma-separated list of patterns for any element such as
+   * a method, a field, an enum value. Each pattern is a qualified name of the
+   * element which may end in "*", indicating a wildcard. Wildcards are only
+   * allowed at the end and for a whole component of the qualified name,
+   * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+   * one or more components. To specify a default for all applicable elements,
+   * the whole pattern "*" is used.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Description of the selected proto element (e.g. a message, a method, a
+   * 'service' definition, or a field). Defaults to leading & trailing comments
+   * taken from the proto source definition of the proto element.
+   * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+   * Description of the selected proto element (e.g. a message, a method, a
+   * 'service' definition, or a field). Defaults to leading & trailing comments
+   * taken from the proto source definition of the proto element.
+   * 
+ * + * string description = 2; + * + * @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 DEPRECATION_DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object deprecationDescription_ = ""; + /** + * + * + *
+   * Deprecation description of the selected element(s). It can be provided if
+   * an element is marked as `deprecated`.
+   * 
+ * + * string deprecation_description = 3; + * + * @return The deprecationDescription. + */ + @java.lang.Override + public java.lang.String getDeprecationDescription() { + java.lang.Object ref = deprecationDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deprecationDescription_ = s; + return s; + } + } + /** + * + * + *
+   * Deprecation description of the selected element(s). It can be provided if
+   * an element is marked as `deprecated`.
+   * 
+ * + * string deprecation_description = 3; + * + * @return The bytes for deprecationDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeprecationDescriptionBytes() { + java.lang.Object ref = deprecationDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deprecationDescription_ = 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(selector_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deprecationDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deprecationDescription_); + } + 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(selector_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deprecationDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deprecationDescription_); + } + 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.api.DocumentationRule)) { + return super.equals(obj); + } + com.google.api.DocumentationRule other = (com.google.api.DocumentationRule) obj; + + if (!getSelector().equals(other.getSelector())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getDeprecationDescription().equals(other.getDeprecationDescription())) 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) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DEPRECATION_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDeprecationDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.DocumentationRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.DocumentationRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.DocumentationRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.DocumentationRule 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.api.DocumentationRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.DocumentationRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.DocumentationRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.DocumentationRule 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.api.DocumentationRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.DocumentationRule 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.api.DocumentationRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.DocumentationRule 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.api.DocumentationRule 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 documentation rule provides information about individual API elements.
+   * 
+ * + * Protobuf type {@code google.api.DocumentationRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.DocumentationRule) + com.google.api.DocumentationRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DocumentationProto + .internal_static_google_api_DocumentationRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto + .internal_static_google_api_DocumentationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.DocumentationRule.class, + com.google.api.DocumentationRule.Builder.class); + } + + // Construct using com.google.api.DocumentationRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selector_ = ""; + description_ = ""; + deprecationDescription_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.DocumentationProto + .internal_static_google_api_DocumentationRule_descriptor; + } + + @java.lang.Override + public com.google.api.DocumentationRule getDefaultInstanceForType() { + return com.google.api.DocumentationRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.DocumentationRule build() { + com.google.api.DocumentationRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.DocumentationRule buildPartial() { + com.google.api.DocumentationRule result = new com.google.api.DocumentationRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.DocumentationRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selector_ = selector_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deprecationDescription_ = deprecationDescription_; + } + } + + @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.api.DocumentationRule) { + return mergeFrom((com.google.api.DocumentationRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.DocumentationRule other) { + if (other == com.google.api.DocumentationRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDeprecationDescription().isEmpty()) { + deprecationDescription_ = other.deprecationDescription_; + 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: + { + selector_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + deprecationDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * + * + *
+     * The selector is a comma-separated list of patterns for any element such as
+     * a method, a field, an enum value. Each pattern is a qualified name of the
+     * element which may end in "*", indicating a wildcard. Wildcards are only
+     * allowed at the end and for a whole component of the qualified name,
+     * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+     * one or more components. To specify a default for all applicable elements,
+     * the whole pattern "*" is used.
+     * 
+ * + * string selector = 1; + * + * @return The selector. + */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The selector is a comma-separated list of patterns for any element such as
+     * a method, a field, an enum value. Each pattern is a qualified name of the
+     * element which may end in "*", indicating a wildcard. Wildcards are only
+     * allowed at the end and for a whole component of the qualified name,
+     * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+     * one or more components. To specify a default for all applicable elements,
+     * the whole pattern "*" is used.
+     * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The selector is a comma-separated list of patterns for any element such as
+     * a method, a field, an enum value. Each pattern is a qualified name of the
+     * element which may end in "*", indicating a wildcard. Wildcards are only
+     * allowed at the end and for a whole component of the qualified name,
+     * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+     * one or more components. To specify a default for all applicable elements,
+     * the whole pattern "*" is used.
+     * 
+ * + * string selector = 1; + * + * @param value The selector to set. + * @return This builder for chaining. + */ + public Builder setSelector(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The selector is a comma-separated list of patterns for any element such as
+     * a method, a field, an enum value. Each pattern is a qualified name of the
+     * element which may end in "*", indicating a wildcard. Wildcards are only
+     * allowed at the end and for a whole component of the qualified name,
+     * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+     * one or more components. To specify a default for all applicable elements,
+     * the whole pattern "*" is used.
+     * 
+ * + * string selector = 1; + * + * @return This builder for chaining. + */ + public Builder clearSelector() { + selector_ = getDefaultInstance().getSelector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The selector is a comma-separated list of patterns for any element such as
+     * a method, a field, an enum value. Each pattern is a qualified name of the
+     * element which may end in "*", indicating a wildcard. Wildcards are only
+     * allowed at the end and for a whole component of the qualified name,
+     * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+     * one or more components. To specify a default for all applicable elements,
+     * the whole pattern "*" is used.
+     * 
+ * + * string selector = 1; + * + * @param value The bytes for selector to set. + * @return This builder for chaining. + */ + public Builder setSelectorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Description of the selected proto element (e.g. a message, a method, a
+     * 'service' definition, or a field). Defaults to leading & trailing comments
+     * taken from the proto source definition of the proto element.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+     * Description of the selected proto element (e.g. a message, a method, a
+     * 'service' definition, or a field). Defaults to leading & trailing comments
+     * taken from the proto source definition of the proto element.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + /** + * + * + *
+     * Description of the selected proto element (e.g. a message, a method, a
+     * 'service' definition, or a field). Defaults to leading & trailing comments
+     * taken from the proto source definition of the proto element.
+     * 
+ * + * string description = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the selected proto element (e.g. a message, a method, a
+     * 'service' definition, or a field). Defaults to leading & trailing comments
+     * taken from the proto source definition of the proto element.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the selected proto element (e.g. a message, a method, a
+     * 'service' definition, or a field). Defaults to leading & trailing comments
+     * taken from the proto source definition of the proto element.
+     * 
+ * + * string description = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object deprecationDescription_ = ""; + /** + * + * + *
+     * Deprecation description of the selected element(s). It can be provided if
+     * an element is marked as `deprecated`.
+     * 
+ * + * string deprecation_description = 3; + * + * @return The deprecationDescription. + */ + public java.lang.String getDeprecationDescription() { + java.lang.Object ref = deprecationDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deprecationDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Deprecation description of the selected element(s). It can be provided if
+     * an element is marked as `deprecated`.
+     * 
+ * + * string deprecation_description = 3; + * + * @return The bytes for deprecationDescription. + */ + public com.google.protobuf.ByteString getDeprecationDescriptionBytes() { + java.lang.Object ref = deprecationDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deprecationDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Deprecation description of the selected element(s). It can be provided if
+     * an element is marked as `deprecated`.
+     * 
+ * + * string deprecation_description = 3; + * + * @param value The deprecationDescription to set. + * @return This builder for chaining. + */ + public Builder setDeprecationDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deprecationDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecation description of the selected element(s). It can be provided if
+     * an element is marked as `deprecated`.
+     * 
+ * + * string deprecation_description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDeprecationDescription() { + deprecationDescription_ = getDefaultInstance().getDeprecationDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecation description of the selected element(s). It can be provided if
+     * an element is marked as `deprecated`.
+     * 
+ * + * string deprecation_description = 3; + * + * @param value The bytes for deprecationDescription to set. + * @return This builder for chaining. + */ + public Builder setDeprecationDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deprecationDescription_ = 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.api.DocumentationRule) + } + + // @@protoc_insertion_point(class_scope:google.api.DocumentationRule) + private static final com.google.api.DocumentationRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.DocumentationRule(); + } + + public static com.google.api.DocumentationRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentationRule 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.api.DocumentationRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationRuleOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationRuleOrBuilder.java new file mode 100644 index 000000000000..542f1014f74c --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DocumentationRuleOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public interface DocumentationRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.DocumentationRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The selector is a comma-separated list of patterns for any element such as
+   * a method, a field, an enum value. Each pattern is a qualified name of the
+   * element which may end in "*", indicating a wildcard. Wildcards are only
+   * allowed at the end and for a whole component of the qualified name,
+   * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+   * one or more components. To specify a default for all applicable elements,
+   * the whole pattern "*" is used.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + java.lang.String getSelector(); + /** + * + * + *
+   * The selector is a comma-separated list of patterns for any element such as
+   * a method, a field, an enum value. Each pattern is a qualified name of the
+   * element which may end in "*", indicating a wildcard. Wildcards are only
+   * allowed at the end and for a whole component of the qualified name,
+   * i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match
+   * one or more components. To specify a default for all applicable elements,
+   * the whole pattern "*" is used.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + com.google.protobuf.ByteString getSelectorBytes(); + + /** + * + * + *
+   * Description of the selected proto element (e.g. a message, a method, a
+   * 'service' definition, or a field). Defaults to leading & trailing comments
+   * taken from the proto source definition of the proto element.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Description of the selected proto element (e.g. a message, a method, a
+   * 'service' definition, or a field). Defaults to leading & trailing comments
+   * taken from the proto source definition of the proto element.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Deprecation description of the selected element(s). It can be provided if
+   * an element is marked as `deprecated`.
+   * 
+ * + * string deprecation_description = 3; + * + * @return The deprecationDescription. + */ + java.lang.String getDeprecationDescription(); + /** + * + * + *
+   * Deprecation description of the selected element(s). It can be provided if
+   * an element is marked as `deprecated`.
+   * 
+ * + * string deprecation_description = 3; + * + * @return The bytes for deprecationDescription. + */ + com.google.protobuf.ByteString getDeprecationDescriptionBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DotnetSettings.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DotnetSettings.java new file mode 100644 index 000000000000..300ac7b8b274 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DotnetSettings.java @@ -0,0 +1,2361 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * Settings for Dotnet client libraries.
+ * 
+ * + * Protobuf type {@code google.api.DotnetSettings} + */ +public final class DotnetSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.DotnetSettings) + DotnetSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DotnetSettings.newBuilder() to construct. + private DotnetSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DotnetSettings() { + ignoredResources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + forcedNamespaceAliases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + handwrittenSignatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DotnetSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_DotnetSettings_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetRenamedServices(); + case 3: + return internalGetRenamedResources(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_DotnetSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.DotnetSettings.class, com.google.api.DotnetSettings.Builder.class); + } + + public static final int COMMON_FIELD_NUMBER = 1; + private com.google.api.CommonLanguageSettings common_; + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + @java.lang.Override + public com.google.api.CommonLanguageSettings getCommon() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + @java.lang.Override + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + + public static final int RENAMED_SERVICES_FIELD_NUMBER = 2; + + private static final class RenamedServicesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.ClientProto + .internal_static_google_api_DotnetSettings_RenamedServicesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField renamedServices_; + + private com.google.protobuf.MapField + internalGetRenamedServices() { + if (renamedServices_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RenamedServicesDefaultEntryHolder.defaultEntry); + } + return renamedServices_; + } + + public int getRenamedServicesCount() { + return internalGetRenamedServices().getMap().size(); + } + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public boolean containsRenamedServices(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRenamedServices().getMap().containsKey(key); + } + /** Use {@link #getRenamedServicesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRenamedServices() { + return getRenamedServicesMap(); + } + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public java.util.Map getRenamedServicesMap() { + return internalGetRenamedServices().getMap(); + } + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getRenamedServicesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedServices().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public java.lang.String getRenamedServicesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedServices().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int RENAMED_RESOURCES_FIELD_NUMBER = 3; + + private static final class RenamedResourcesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.ClientProto + .internal_static_google_api_DotnetSettings_RenamedResourcesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField renamedResources_; + + private com.google.protobuf.MapField + internalGetRenamedResources() { + if (renamedResources_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RenamedResourcesDefaultEntryHolder.defaultEntry); + } + return renamedResources_; + } + + public int getRenamedResourcesCount() { + return internalGetRenamedResources().getMap().size(); + } + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public boolean containsRenamedResources(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRenamedResources().getMap().containsKey(key); + } + /** Use {@link #getRenamedResourcesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRenamedResources() { + return getRenamedResourcesMap(); + } + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public java.util.Map getRenamedResourcesMap() { + return internalGetRenamedResources().getMap(); + } + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getRenamedResourcesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedResources().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public java.lang.String getRenamedResourcesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedResources().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IGNORED_RESOURCES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList ignoredResources_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @return A list containing the ignoredResources. + */ + public com.google.protobuf.ProtocolStringList getIgnoredResourcesList() { + return ignoredResources_; + } + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @return The count of ignoredResources. + */ + public int getIgnoredResourcesCount() { + return ignoredResources_.size(); + } + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the element to return. + * @return The ignoredResources at the given index. + */ + public java.lang.String getIgnoredResources(int index) { + return ignoredResources_.get(index); + } + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the value to return. + * @return The bytes of the ignoredResources at the given index. + */ + public com.google.protobuf.ByteString getIgnoredResourcesBytes(int index) { + return ignoredResources_.getByteString(index); + } + + public static final int FORCED_NAMESPACE_ALIASES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList forcedNamespaceAliases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return A list containing the forcedNamespaceAliases. + */ + public com.google.protobuf.ProtocolStringList getForcedNamespaceAliasesList() { + return forcedNamespaceAliases_; + } + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return The count of forcedNamespaceAliases. + */ + public int getForcedNamespaceAliasesCount() { + return forcedNamespaceAliases_.size(); + } + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the element to return. + * @return The forcedNamespaceAliases at the given index. + */ + public java.lang.String getForcedNamespaceAliases(int index) { + return forcedNamespaceAliases_.get(index); + } + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the value to return. + * @return The bytes of the forcedNamespaceAliases at the given index. + */ + public com.google.protobuf.ByteString getForcedNamespaceAliasesBytes(int index) { + return forcedNamespaceAliases_.getByteString(index); + } + + public static final int HANDWRITTEN_SIGNATURES_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList handwrittenSignatures_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return A list containing the handwrittenSignatures. + */ + public com.google.protobuf.ProtocolStringList getHandwrittenSignaturesList() { + return handwrittenSignatures_; + } + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return The count of handwrittenSignatures. + */ + public int getHandwrittenSignaturesCount() { + return handwrittenSignatures_.size(); + } + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the element to return. + * @return The handwrittenSignatures at the given index. + */ + public java.lang.String getHandwrittenSignatures(int index) { + return handwrittenSignatures_.get(index); + } + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the value to return. + * @return The bytes of the handwrittenSignatures at the given index. + */ + public com.google.protobuf.ByteString getHandwrittenSignaturesBytes(int index) { + return handwrittenSignatures_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (common_ != null) { + output.writeMessage(1, getCommon()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetRenamedServices(), RenamedServicesDefaultEntryHolder.defaultEntry, 2); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetRenamedResources(), RenamedResourcesDefaultEntryHolder.defaultEntry, 3); + for (int i = 0; i < ignoredResources_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ignoredResources_.getRaw(i)); + } + for (int i = 0; i < forcedNamespaceAliases_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, forcedNamespaceAliases_.getRaw(i)); + } + for (int i = 0; i < handwrittenSignatures_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 6, handwrittenSignatures_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommon()); + } + for (java.util.Map.Entry entry : + internalGetRenamedServices().getMap().entrySet()) { + com.google.protobuf.MapEntry renamedServices__ = + RenamedServicesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, renamedServices__); + } + for (java.util.Map.Entry entry : + internalGetRenamedResources().getMap().entrySet()) { + com.google.protobuf.MapEntry renamedResources__ = + RenamedResourcesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, renamedResources__); + } + { + int dataSize = 0; + for (int i = 0; i < ignoredResources_.size(); i++) { + dataSize += computeStringSizeNoTag(ignoredResources_.getRaw(i)); + } + size += dataSize; + size += 1 * getIgnoredResourcesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < forcedNamespaceAliases_.size(); i++) { + dataSize += computeStringSizeNoTag(forcedNamespaceAliases_.getRaw(i)); + } + size += dataSize; + size += 1 * getForcedNamespaceAliasesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < handwrittenSignatures_.size(); i++) { + dataSize += computeStringSizeNoTag(handwrittenSignatures_.getRaw(i)); + } + size += dataSize; + size += 1 * getHandwrittenSignaturesList().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.api.DotnetSettings)) { + return super.equals(obj); + } + com.google.api.DotnetSettings other = (com.google.api.DotnetSettings) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon().equals(other.getCommon())) return false; + } + if (!internalGetRenamedServices().equals(other.internalGetRenamedServices())) return false; + if (!internalGetRenamedResources().equals(other.internalGetRenamedResources())) return false; + if (!getIgnoredResourcesList().equals(other.getIgnoredResourcesList())) return false; + if (!getForcedNamespaceAliasesList().equals(other.getForcedNamespaceAliasesList())) + return false; + if (!getHandwrittenSignaturesList().equals(other.getHandwrittenSignaturesList())) 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 (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + if (!internalGetRenamedServices().getMap().isEmpty()) { + hash = (37 * hash) + RENAMED_SERVICES_FIELD_NUMBER; + hash = (53 * hash) + internalGetRenamedServices().hashCode(); + } + if (!internalGetRenamedResources().getMap().isEmpty()) { + hash = (37 * hash) + RENAMED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + internalGetRenamedResources().hashCode(); + } + if (getIgnoredResourcesCount() > 0) { + hash = (37 * hash) + IGNORED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getIgnoredResourcesList().hashCode(); + } + if (getForcedNamespaceAliasesCount() > 0) { + hash = (37 * hash) + FORCED_NAMESPACE_ALIASES_FIELD_NUMBER; + hash = (53 * hash) + getForcedNamespaceAliasesList().hashCode(); + } + if (getHandwrittenSignaturesCount() > 0) { + hash = (37 * hash) + HANDWRITTEN_SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getHandwrittenSignaturesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.DotnetSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.DotnetSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.DotnetSettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.DotnetSettings 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.api.DotnetSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.DotnetSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.DotnetSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.DotnetSettings 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.api.DotnetSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.DotnetSettings 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.api.DotnetSettings parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.DotnetSettings 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.api.DotnetSettings 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; + } + /** + * + * + *
+   * Settings for Dotnet client libraries.
+   * 
+ * + * Protobuf type {@code google.api.DotnetSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.DotnetSettings) + com.google.api.DotnetSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_DotnetSettings_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetRenamedServices(); + case 3: + return internalGetRenamedResources(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableRenamedServices(); + case 3: + return internalGetMutableRenamedResources(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_DotnetSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.DotnetSettings.class, com.google.api.DotnetSettings.Builder.class); + } + + // Construct using com.google.api.DotnetSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + internalGetMutableRenamedServices().clear(); + internalGetMutableRenamedResources().clear(); + ignoredResources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + forcedNamespaceAliases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + handwrittenSignatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto.internal_static_google_api_DotnetSettings_descriptor; + } + + @java.lang.Override + public com.google.api.DotnetSettings getDefaultInstanceForType() { + return com.google.api.DotnetSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.DotnetSettings build() { + com.google.api.DotnetSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.DotnetSettings buildPartial() { + com.google.api.DotnetSettings result = new com.google.api.DotnetSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.DotnetSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null ? common_ : commonBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.renamedServices_ = internalGetRenamedServices(); + result.renamedServices_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.renamedResources_ = internalGetRenamedResources(); + result.renamedResources_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + ignoredResources_.makeImmutable(); + result.ignoredResources_ = ignoredResources_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + forcedNamespaceAliases_.makeImmutable(); + result.forcedNamespaceAliases_ = forcedNamespaceAliases_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + handwrittenSignatures_.makeImmutable(); + result.handwrittenSignatures_ = handwrittenSignatures_; + } + } + + @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.api.DotnetSettings) { + return mergeFrom((com.google.api.DotnetSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.DotnetSettings other) { + if (other == com.google.api.DotnetSettings.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + internalGetMutableRenamedServices().mergeFrom(other.internalGetRenamedServices()); + bitField0_ |= 0x00000002; + internalGetMutableRenamedResources().mergeFrom(other.internalGetRenamedResources()); + bitField0_ |= 0x00000004; + if (!other.ignoredResources_.isEmpty()) { + if (ignoredResources_.isEmpty()) { + ignoredResources_ = other.ignoredResources_; + bitField0_ |= 0x00000008; + } else { + ensureIgnoredResourcesIsMutable(); + ignoredResources_.addAll(other.ignoredResources_); + } + onChanged(); + } + if (!other.forcedNamespaceAliases_.isEmpty()) { + if (forcedNamespaceAliases_.isEmpty()) { + forcedNamespaceAliases_ = other.forcedNamespaceAliases_; + bitField0_ |= 0x00000010; + } else { + ensureForcedNamespaceAliasesIsMutable(); + forcedNamespaceAliases_.addAll(other.forcedNamespaceAliases_); + } + onChanged(); + } + if (!other.handwrittenSignatures_.isEmpty()) { + if (handwrittenSignatures_.isEmpty()) { + handwrittenSignatures_ = other.handwrittenSignatures_; + bitField0_ |= 0x00000020; + } else { + ensureHandwrittenSignaturesIsMutable(); + handwrittenSignatures_.addAll(other.handwrittenSignatures_); + } + 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(getCommonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry renamedServices__ = + input.readMessage( + RenamedServicesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableRenamedServices() + .getMutableMap() + .put(renamedServices__.getKey(), renamedServices__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry + renamedResources__ = + input.readMessage( + RenamedResourcesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableRenamedResources() + .getMutableMap() + .put(renamedResources__.getKey(), renamedResources__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIgnoredResourcesIsMutable(); + ignoredResources_.add(s); + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureForcedNamespaceAliasesIsMutable(); + forcedNamespaceAliases_.add(s); + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHandwrittenSignaturesIsMutable(); + handwrittenSignatures_.add(s); + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.api.CommonLanguageSettings common_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + commonBuilder_; + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + public com.google.api.CommonLanguageSettings getCommon() { + if (commonBuilder_ == null) { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder mergeCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && common_ != null + && common_ != com.google.api.CommonLanguageSettings.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettings.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder>( + getCommon(), getParentForChildren(), isClean()); + common_ = null; + } + return commonBuilder_; + } + + private com.google.protobuf.MapField renamedServices_; + + private com.google.protobuf.MapField + internalGetRenamedServices() { + if (renamedServices_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RenamedServicesDefaultEntryHolder.defaultEntry); + } + return renamedServices_; + } + + private com.google.protobuf.MapField + internalGetMutableRenamedServices() { + if (renamedServices_ == null) { + renamedServices_ = + com.google.protobuf.MapField.newMapField( + RenamedServicesDefaultEntryHolder.defaultEntry); + } + if (!renamedServices_.isMutable()) { + renamedServices_ = renamedServices_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return renamedServices_; + } + + public int getRenamedServicesCount() { + return internalGetRenamedServices().getMap().size(); + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public boolean containsRenamedServices(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRenamedServices().getMap().containsKey(key); + } + /** Use {@link #getRenamedServicesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRenamedServices() { + return getRenamedServicesMap(); + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public java.util.Map getRenamedServicesMap() { + return internalGetRenamedServices().getMap(); + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getRenamedServicesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedServices().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public java.lang.String getRenamedServicesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedServices().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRenamedServices() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableRenamedServices().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + public Builder removeRenamedServices(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableRenamedServices().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableRenamedServices() { + bitField0_ |= 0x00000002; + return internalGetMutableRenamedServices().getMutableMap(); + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + public Builder putRenamedServices(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableRenamedServices().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + public Builder putAllRenamedServices(java.util.Map values) { + internalGetMutableRenamedServices().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.protobuf.MapField renamedResources_; + + private com.google.protobuf.MapField + internalGetRenamedResources() { + if (renamedResources_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RenamedResourcesDefaultEntryHolder.defaultEntry); + } + return renamedResources_; + } + + private com.google.protobuf.MapField + internalGetMutableRenamedResources() { + if (renamedResources_ == null) { + renamedResources_ = + com.google.protobuf.MapField.newMapField( + RenamedResourcesDefaultEntryHolder.defaultEntry); + } + if (!renamedResources_.isMutable()) { + renamedResources_ = renamedResources_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return renamedResources_; + } + + public int getRenamedResourcesCount() { + return internalGetRenamedResources().getMap().size(); + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public boolean containsRenamedResources(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRenamedResources().getMap().containsKey(key); + } + /** Use {@link #getRenamedResourcesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRenamedResources() { + return getRenamedResourcesMap(); + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public java.util.Map getRenamedResourcesMap() { + return internalGetRenamedResources().getMap(); + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getRenamedResourcesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetRenamedResources().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public java.lang.String getRenamedResourcesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetRenamedResources().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRenamedResources() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableRenamedResources().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + public Builder removeRenamedResources(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableRenamedResources().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableRenamedResources() { + bitField0_ |= 0x00000004; + return internalGetMutableRenamedResources().getMutableMap(); + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + public Builder putRenamedResources(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableRenamedResources().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + public Builder putAllRenamedResources( + java.util.Map values) { + internalGetMutableRenamedResources().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private com.google.protobuf.LazyStringArrayList ignoredResources_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIgnoredResourcesIsMutable() { + if (!ignoredResources_.isModifiable()) { + ignoredResources_ = new com.google.protobuf.LazyStringArrayList(ignoredResources_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @return A list containing the ignoredResources. + */ + public com.google.protobuf.ProtocolStringList getIgnoredResourcesList() { + ignoredResources_.makeImmutable(); + return ignoredResources_; + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @return The count of ignoredResources. + */ + public int getIgnoredResourcesCount() { + return ignoredResources_.size(); + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the element to return. + * @return The ignoredResources at the given index. + */ + public java.lang.String getIgnoredResources(int index) { + return ignoredResources_.get(index); + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the value to return. + * @return The bytes of the ignoredResources at the given index. + */ + public com.google.protobuf.ByteString getIgnoredResourcesBytes(int index) { + return ignoredResources_.getByteString(index); + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index to set the value at. + * @param value The ignoredResources to set. + * @return This builder for chaining. + */ + public Builder setIgnoredResources(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredResourcesIsMutable(); + ignoredResources_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param value The ignoredResources to add. + * @return This builder for chaining. + */ + public Builder addIgnoredResources(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredResourcesIsMutable(); + ignoredResources_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param values The ignoredResources to add. + * @return This builder for chaining. + */ + public Builder addAllIgnoredResources(java.lang.Iterable values) { + ensureIgnoredResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ignoredResources_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @return This builder for chaining. + */ + public Builder clearIgnoredResources() { + ignoredResources_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param value The bytes of the ignoredResources to add. + * @return This builder for chaining. + */ + public Builder addIgnoredResourcesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIgnoredResourcesIsMutable(); + ignoredResources_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList forcedNamespaceAliases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureForcedNamespaceAliasesIsMutable() { + if (!forcedNamespaceAliases_.isModifiable()) { + forcedNamespaceAliases_ = + new com.google.protobuf.LazyStringArrayList(forcedNamespaceAliases_); + } + bitField0_ |= 0x00000010; + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return A list containing the forcedNamespaceAliases. + */ + public com.google.protobuf.ProtocolStringList getForcedNamespaceAliasesList() { + forcedNamespaceAliases_.makeImmutable(); + return forcedNamespaceAliases_; + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return The count of forcedNamespaceAliases. + */ + public int getForcedNamespaceAliasesCount() { + return forcedNamespaceAliases_.size(); + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the element to return. + * @return The forcedNamespaceAliases at the given index. + */ + public java.lang.String getForcedNamespaceAliases(int index) { + return forcedNamespaceAliases_.get(index); + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the value to return. + * @return The bytes of the forcedNamespaceAliases at the given index. + */ + public com.google.protobuf.ByteString getForcedNamespaceAliasesBytes(int index) { + return forcedNamespaceAliases_.getByteString(index); + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index to set the value at. + * @param value The forcedNamespaceAliases to set. + * @return This builder for chaining. + */ + public Builder setForcedNamespaceAliases(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForcedNamespaceAliasesIsMutable(); + forcedNamespaceAliases_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param value The forcedNamespaceAliases to add. + * @return This builder for chaining. + */ + public Builder addForcedNamespaceAliases(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForcedNamespaceAliasesIsMutable(); + forcedNamespaceAliases_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param values The forcedNamespaceAliases to add. + * @return This builder for chaining. + */ + public Builder addAllForcedNamespaceAliases(java.lang.Iterable values) { + ensureForcedNamespaceAliasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, forcedNamespaceAliases_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return This builder for chaining. + */ + public Builder clearForcedNamespaceAliases() { + forcedNamespaceAliases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param value The bytes of the forcedNamespaceAliases to add. + * @return This builder for chaining. + */ + public Builder addForcedNamespaceAliasesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureForcedNamespaceAliasesIsMutable(); + forcedNamespaceAliases_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList handwrittenSignatures_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureHandwrittenSignaturesIsMutable() { + if (!handwrittenSignatures_.isModifiable()) { + handwrittenSignatures_ = + new com.google.protobuf.LazyStringArrayList(handwrittenSignatures_); + } + bitField0_ |= 0x00000020; + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return A list containing the handwrittenSignatures. + */ + public com.google.protobuf.ProtocolStringList getHandwrittenSignaturesList() { + handwrittenSignatures_.makeImmutable(); + return handwrittenSignatures_; + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return The count of handwrittenSignatures. + */ + public int getHandwrittenSignaturesCount() { + return handwrittenSignatures_.size(); + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the element to return. + * @return The handwrittenSignatures at the given index. + */ + public java.lang.String getHandwrittenSignatures(int index) { + return handwrittenSignatures_.get(index); + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the value to return. + * @return The bytes of the handwrittenSignatures at the given index. + */ + public com.google.protobuf.ByteString getHandwrittenSignaturesBytes(int index) { + return handwrittenSignatures_.getByteString(index); + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index to set the value at. + * @param value The handwrittenSignatures to set. + * @return This builder for chaining. + */ + public Builder setHandwrittenSignatures(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHandwrittenSignaturesIsMutable(); + handwrittenSignatures_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param value The handwrittenSignatures to add. + * @return This builder for chaining. + */ + public Builder addHandwrittenSignatures(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHandwrittenSignaturesIsMutable(); + handwrittenSignatures_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param values The handwrittenSignatures to add. + * @return This builder for chaining. + */ + public Builder addAllHandwrittenSignatures(java.lang.Iterable values) { + ensureHandwrittenSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, handwrittenSignatures_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return This builder for chaining. + */ + public Builder clearHandwrittenSignatures() { + handwrittenSignatures_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param value The bytes of the handwrittenSignatures to add. + * @return This builder for chaining. + */ + public Builder addHandwrittenSignaturesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHandwrittenSignaturesIsMutable(); + handwrittenSignatures_.add(value); + bitField0_ |= 0x00000020; + 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.api.DotnetSettings) + } + + // @@protoc_insertion_point(class_scope:google.api.DotnetSettings) + private static final com.google.api.DotnetSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.DotnetSettings(); + } + + public static com.google.api.DotnetSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DotnetSettings 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.api.DotnetSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DotnetSettingsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DotnetSettingsOrBuilder.java new file mode 100644 index 000000000000..e2880a14ced2 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/DotnetSettingsOrBuilder.java @@ -0,0 +1,397 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface DotnetSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.DotnetSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + com.google.api.CommonLanguageSettings getCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder(); + + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + int getRenamedServicesCount(); + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + boolean containsRenamedServices(java.lang.String key); + /** Use {@link #getRenamedServicesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getRenamedServices(); + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + java.util.Map getRenamedServicesMap(); + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + /* nullable */ + java.lang.String getRenamedServicesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + java.lang.String getRenamedServicesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + int getRenamedResourcesCount(); + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + boolean containsRenamedResources(java.lang.String key); + /** Use {@link #getRenamedResourcesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getRenamedResources(); + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + java.util.Map getRenamedResourcesMap(); + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + /* nullable */ + java.lang.String getRenamedResourcesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + java.lang.String getRenamedResourcesOrThrow(java.lang.String key); + + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @return A list containing the ignoredResources. + */ + java.util.List getIgnoredResourcesList(); + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @return The count of ignoredResources. + */ + int getIgnoredResourcesCount(); + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the element to return. + * @return The ignoredResources at the given index. + */ + java.lang.String getIgnoredResources(int index); + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the value to return. + * @return The bytes of the ignoredResources at the given index. + */ + com.google.protobuf.ByteString getIgnoredResourcesBytes(int index); + + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return A list containing the forcedNamespaceAliases. + */ + java.util.List getForcedNamespaceAliasesList(); + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return The count of forcedNamespaceAliases. + */ + int getForcedNamespaceAliasesCount(); + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the element to return. + * @return The forcedNamespaceAliases at the given index. + */ + java.lang.String getForcedNamespaceAliases(int index); + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the value to return. + * @return The bytes of the forcedNamespaceAliases at the given index. + */ + com.google.protobuf.ByteString getForcedNamespaceAliasesBytes(int index); + + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return A list containing the handwrittenSignatures. + */ + java.util.List getHandwrittenSignaturesList(); + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return The count of handwrittenSignatures. + */ + int getHandwrittenSignaturesCount(); + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the element to return. + * @return The handwrittenSignatures at the given index. + */ + java.lang.String getHandwrittenSignatures(int index); + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the value to return. + * @return The bytes of the handwrittenSignatures at the given index. + */ + com.google.protobuf.ByteString getHandwrittenSignaturesBytes(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Endpoint.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Endpoint.java new file mode 100644 index 000000000000..8ea75150110b --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Endpoint.java @@ -0,0 +1,1357 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/endpoint.proto + +package com.google.api; + +/** + * + * + *
+ * `Endpoint` describes a network address of a service that serves a set of
+ * APIs. It is commonly known as a service endpoint. A service may expose
+ * any number of service endpoints, and all service endpoints share the same
+ * service definition, such as quota limits and monitoring metrics.
+ *
+ * Example:
+ *
+ *     type: google.api.Service
+ *     name: library-example.googleapis.com
+ *     endpoints:
+ *       # Declares network address `https://library-example.googleapis.com`
+ *       # for service `library-example.googleapis.com`. The `https` scheme
+ *       # is implicit for all service endpoints. Other schemes may be
+ *       # supported in the future.
+ *     - name: library-example.googleapis.com
+ *       allow_cors: false
+ *     - name: content-staging-library-example.googleapis.com
+ *       # Allows HTTP OPTIONS calls to be passed to the API frontend, for it
+ *       # to decide whether the subsequent cross-origin request is allowed
+ *       # to proceed.
+ *       allow_cors: true
+ * 
+ * + * Protobuf type {@code google.api.Endpoint} + */ +public final class Endpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Endpoint) + EndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use Endpoint.newBuilder() to construct. + private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Endpoint() { + name_ = ""; + aliases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + target_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Endpoint(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.EndpointProto.internal_static_google_api_Endpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.EndpointProto.internal_static_google_api_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Endpoint.class, com.google.api.Endpoint.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The canonical name of this endpoint.
+   * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+   * The canonical name of this endpoint.
+   * 
+ * + * string name = 1; + * + * @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 ALIASES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList aliases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Unimplemented. Dot not use.
+   *
+   * DEPRECATED: This field is no longer supported. Instead of using aliases,
+   * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+   * of the intended aliases.
+   *
+   * Additional names that this endpoint will be hosted on.
+   * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @return A list containing the aliases. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getAliasesList() { + return aliases_; + } + /** + * + * + *
+   * Unimplemented. Dot not use.
+   *
+   * DEPRECATED: This field is no longer supported. Instead of using aliases,
+   * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+   * of the intended aliases.
+   *
+   * Additional names that this endpoint will be hosted on.
+   * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @return The count of aliases. + */ + @java.lang.Deprecated + public int getAliasesCount() { + return aliases_.size(); + } + /** + * + * + *
+   * Unimplemented. Dot not use.
+   *
+   * DEPRECATED: This field is no longer supported. Instead of using aliases,
+   * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+   * of the intended aliases.
+   *
+   * Additional names that this endpoint will be hosted on.
+   * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @param index The index of the element to return. + * @return The aliases at the given index. + */ + @java.lang.Deprecated + public java.lang.String getAliases(int index) { + return aliases_.get(index); + } + /** + * + * + *
+   * Unimplemented. Dot not use.
+   *
+   * DEPRECATED: This field is no longer supported. Instead of using aliases,
+   * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+   * of the intended aliases.
+   *
+   * Additional names that this endpoint will be hosted on.
+   * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @param index The index of the value to return. + * @return The bytes of the aliases at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getAliasesBytes(int index) { + return aliases_.getByteString(index); + } + + public static final int TARGET_FIELD_NUMBER = 101; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + * + * + *
+   * The specification of an Internet routable address of API frontend that will
+   * handle requests to this [API
+   * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+   * either a valid IPv4 address or a fully-qualified domain name. For example,
+   * "8.8.8.8" or "myservice.appspot.com".
+   * 
+ * + * string target = 101; + * + * @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; + } + } + /** + * + * + *
+   * The specification of an Internet routable address of API frontend that will
+   * handle requests to this [API
+   * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+   * either a valid IPv4 address or a fully-qualified domain name. For example,
+   * "8.8.8.8" or "myservice.appspot.com".
+   * 
+ * + * string target = 101; + * + * @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 ALLOW_CORS_FIELD_NUMBER = 5; + private boolean allowCors_ = false; + /** + * + * + *
+   * Allowing
+   * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
+   * cross-domain traffic, would allow the backends served from this endpoint to
+   * receive and respond to HTTP OPTIONS requests. The response will be used by
+   * the browser to determine whether the subsequent cross-origin request is
+   * allowed to proceed.
+   * 
+ * + * bool allow_cors = 5; + * + * @return The allowCors. + */ + @java.lang.Override + public boolean getAllowCors() { + return allowCors_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < aliases_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, aliases_.getRaw(i)); + } + if (allowCors_ != false) { + output.writeBool(5, allowCors_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 101, target_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < aliases_.size(); i++) { + dataSize += computeStringSizeNoTag(aliases_.getRaw(i)); + } + size += dataSize; + size += 1 * getAliasesList().size(); + } + if (allowCors_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowCors_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(101, target_); + } + 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.api.Endpoint)) { + return super.equals(obj); + } + com.google.api.Endpoint other = (com.google.api.Endpoint) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAliasesList().equals(other.getAliasesList())) return false; + if (!getTarget().equals(other.getTarget())) return false; + if (getAllowCors() != other.getAllowCors()) 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 (getAliasesCount() > 0) { + hash = (37 * hash) + ALIASES_FIELD_NUMBER; + hash = (53 * hash) + getAliasesList().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + ALLOW_CORS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowCors()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Endpoint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Endpoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Endpoint parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Endpoint 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.api.Endpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Endpoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Endpoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Endpoint 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.api.Endpoint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Endpoint 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.api.Endpoint parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Endpoint 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.api.Endpoint 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; + } + /** + * + * + *
+   * `Endpoint` describes a network address of a service that serves a set of
+   * APIs. It is commonly known as a service endpoint. A service may expose
+   * any number of service endpoints, and all service endpoints share the same
+   * service definition, such as quota limits and monitoring metrics.
+   *
+   * Example:
+   *
+   *     type: google.api.Service
+   *     name: library-example.googleapis.com
+   *     endpoints:
+   *       # Declares network address `https://library-example.googleapis.com`
+   *       # for service `library-example.googleapis.com`. The `https` scheme
+   *       # is implicit for all service endpoints. Other schemes may be
+   *       # supported in the future.
+   *     - name: library-example.googleapis.com
+   *       allow_cors: false
+   *     - name: content-staging-library-example.googleapis.com
+   *       # Allows HTTP OPTIONS calls to be passed to the API frontend, for it
+   *       # to decide whether the subsequent cross-origin request is allowed
+   *       # to proceed.
+   *       allow_cors: true
+   * 
+ * + * Protobuf type {@code google.api.Endpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Endpoint) + com.google.api.EndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.EndpointProto.internal_static_google_api_Endpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.EndpointProto.internal_static_google_api_Endpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Endpoint.class, com.google.api.Endpoint.Builder.class); + } + + // Construct using com.google.api.Endpoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + aliases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + target_ = ""; + allowCors_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.EndpointProto.internal_static_google_api_Endpoint_descriptor; + } + + @java.lang.Override + public com.google.api.Endpoint getDefaultInstanceForType() { + return com.google.api.Endpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Endpoint build() { + com.google.api.Endpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Endpoint buildPartial() { + com.google.api.Endpoint result = new com.google.api.Endpoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Endpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + aliases_.makeImmutable(); + result.aliases_ = aliases_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.allowCors_ = allowCors_; + } + } + + @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.api.Endpoint) { + return mergeFrom((com.google.api.Endpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Endpoint other) { + if (other == com.google.api.Endpoint.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.aliases_.isEmpty()) { + if (aliases_.isEmpty()) { + aliases_ = other.aliases_; + bitField0_ |= 0x00000002; + } else { + ensureAliasesIsMutable(); + aliases_.addAll(other.aliases_); + } + onChanged(); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getAllowCors() != false) { + setAllowCors(other.getAllowCors()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAliasesIsMutable(); + aliases_.add(s); + break; + } // case 18 + case 40: + { + allowCors_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 40 + case 810: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 810 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // 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_ = ""; + /** + * + * + *
+     * The canonical name of this endpoint.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The canonical name of this endpoint.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The canonical name of this endpoint.
+     * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+     * The canonical name of this endpoint.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The canonical name of this endpoint.
+     * 
+ * + * string name = 1; + * + * @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.LazyStringArrayList aliases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAliasesIsMutable() { + if (!aliases_.isModifiable()) { + aliases_ = new com.google.protobuf.LazyStringArrayList(aliases_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Unimplemented. Dot not use.
+     *
+     * DEPRECATED: This field is no longer supported. Instead of using aliases,
+     * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+     * of the intended aliases.
+     *
+     * Additional names that this endpoint will be hosted on.
+     * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @return A list containing the aliases. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getAliasesList() { + aliases_.makeImmutable(); + return aliases_; + } + /** + * + * + *
+     * Unimplemented. Dot not use.
+     *
+     * DEPRECATED: This field is no longer supported. Instead of using aliases,
+     * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+     * of the intended aliases.
+     *
+     * Additional names that this endpoint will be hosted on.
+     * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @return The count of aliases. + */ + @java.lang.Deprecated + public int getAliasesCount() { + return aliases_.size(); + } + /** + * + * + *
+     * Unimplemented. Dot not use.
+     *
+     * DEPRECATED: This field is no longer supported. Instead of using aliases,
+     * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+     * of the intended aliases.
+     *
+     * Additional names that this endpoint will be hosted on.
+     * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @param index The index of the element to return. + * @return The aliases at the given index. + */ + @java.lang.Deprecated + public java.lang.String getAliases(int index) { + return aliases_.get(index); + } + /** + * + * + *
+     * Unimplemented. Dot not use.
+     *
+     * DEPRECATED: This field is no longer supported. Instead of using aliases,
+     * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+     * of the intended aliases.
+     *
+     * Additional names that this endpoint will be hosted on.
+     * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @param index The index of the value to return. + * @return The bytes of the aliases at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getAliasesBytes(int index) { + return aliases_.getByteString(index); + } + /** + * + * + *
+     * Unimplemented. Dot not use.
+     *
+     * DEPRECATED: This field is no longer supported. Instead of using aliases,
+     * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+     * of the intended aliases.
+     *
+     * Additional names that this endpoint will be hosted on.
+     * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @param index The index to set the value at. + * @param value The aliases to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setAliases(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAliasesIsMutable(); + aliases_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Unimplemented. Dot not use.
+     *
+     * DEPRECATED: This field is no longer supported. Instead of using aliases,
+     * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+     * of the intended aliases.
+     *
+     * Additional names that this endpoint will be hosted on.
+     * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @param value The aliases to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAliases(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAliasesIsMutable(); + aliases_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Unimplemented. Dot not use.
+     *
+     * DEPRECATED: This field is no longer supported. Instead of using aliases,
+     * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+     * of the intended aliases.
+     *
+     * Additional names that this endpoint will be hosted on.
+     * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @param values The aliases to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAllAliases(java.lang.Iterable values) { + ensureAliasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, aliases_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Unimplemented. Dot not use.
+     *
+     * DEPRECATED: This field is no longer supported. Instead of using aliases,
+     * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+     * of the intended aliases.
+     *
+     * Additional names that this endpoint will be hosted on.
+     * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearAliases() { + aliases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Unimplemented. Dot not use.
+     *
+     * DEPRECATED: This field is no longer supported. Instead of using aliases,
+     * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+     * of the intended aliases.
+     *
+     * Additional names that this endpoint will be hosted on.
+     * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @param value The bytes of the aliases to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAliasesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAliasesIsMutable(); + aliases_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * The specification of an Internet routable address of API frontend that will
+     * handle requests to this [API
+     * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+     * either a valid IPv4 address or a fully-qualified domain name. For example,
+     * "8.8.8.8" or "myservice.appspot.com".
+     * 
+ * + * string target = 101; + * + * @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; + } + } + /** + * + * + *
+     * The specification of an Internet routable address of API frontend that will
+     * handle requests to this [API
+     * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+     * either a valid IPv4 address or a fully-qualified domain name. For example,
+     * "8.8.8.8" or "myservice.appspot.com".
+     * 
+ * + * string target = 101; + * + * @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; + } + } + /** + * + * + *
+     * The specification of an Internet routable address of API frontend that will
+     * handle requests to this [API
+     * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+     * either a valid IPv4 address or a fully-qualified domain name. For example,
+     * "8.8.8.8" or "myservice.appspot.com".
+     * 
+ * + * string target = 101; + * + * @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; + } + /** + * + * + *
+     * The specification of an Internet routable address of API frontend that will
+     * handle requests to this [API
+     * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+     * either a valid IPv4 address or a fully-qualified domain name. For example,
+     * "8.8.8.8" or "myservice.appspot.com".
+     * 
+ * + * string target = 101; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The specification of an Internet routable address of API frontend that will
+     * handle requests to this [API
+     * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+     * either a valid IPv4 address or a fully-qualified domain name. For example,
+     * "8.8.8.8" or "myservice.appspot.com".
+     * 
+ * + * string target = 101; + * + * @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 boolean allowCors_; + /** + * + * + *
+     * Allowing
+     * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
+     * cross-domain traffic, would allow the backends served from this endpoint to
+     * receive and respond to HTTP OPTIONS requests. The response will be used by
+     * the browser to determine whether the subsequent cross-origin request is
+     * allowed to proceed.
+     * 
+ * + * bool allow_cors = 5; + * + * @return The allowCors. + */ + @java.lang.Override + public boolean getAllowCors() { + return allowCors_; + } + /** + * + * + *
+     * Allowing
+     * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
+     * cross-domain traffic, would allow the backends served from this endpoint to
+     * receive and respond to HTTP OPTIONS requests. The response will be used by
+     * the browser to determine whether the subsequent cross-origin request is
+     * allowed to proceed.
+     * 
+ * + * bool allow_cors = 5; + * + * @param value The allowCors to set. + * @return This builder for chaining. + */ + public Builder setAllowCors(boolean value) { + + allowCors_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Allowing
+     * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
+     * cross-domain traffic, would allow the backends served from this endpoint to
+     * receive and respond to HTTP OPTIONS requests. The response will be used by
+     * the browser to determine whether the subsequent cross-origin request is
+     * allowed to proceed.
+     * 
+ * + * bool allow_cors = 5; + * + * @return This builder for chaining. + */ + public Builder clearAllowCors() { + bitField0_ = (bitField0_ & ~0x00000008); + allowCors_ = 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.api.Endpoint) + } + + // @@protoc_insertion_point(class_scope:google.api.Endpoint) + private static final com.google.api.Endpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Endpoint(); + } + + public static com.google.api.Endpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Endpoint 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.api.Endpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/EndpointOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/EndpointOrBuilder.java new file mode 100644 index 000000000000..9196c4e31969 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/EndpointOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/endpoint.proto + +package com.google.api; + +public interface EndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Endpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The canonical name of this endpoint.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The canonical name of this endpoint.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Unimplemented. Dot not use.
+   *
+   * DEPRECATED: This field is no longer supported. Instead of using aliases,
+   * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+   * of the intended aliases.
+   *
+   * Additional names that this endpoint will be hosted on.
+   * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @return A list containing the aliases. + */ + @java.lang.Deprecated + java.util.List getAliasesList(); + /** + * + * + *
+   * Unimplemented. Dot not use.
+   *
+   * DEPRECATED: This field is no longer supported. Instead of using aliases,
+   * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+   * of the intended aliases.
+   *
+   * Additional names that this endpoint will be hosted on.
+   * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @return The count of aliases. + */ + @java.lang.Deprecated + int getAliasesCount(); + /** + * + * + *
+   * Unimplemented. Dot not use.
+   *
+   * DEPRECATED: This field is no longer supported. Instead of using aliases,
+   * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+   * of the intended aliases.
+   *
+   * Additional names that this endpoint will be hosted on.
+   * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @param index The index of the element to return. + * @return The aliases at the given index. + */ + @java.lang.Deprecated + java.lang.String getAliases(int index); + /** + * + * + *
+   * Unimplemented. Dot not use.
+   *
+   * DEPRECATED: This field is no longer supported. Instead of using aliases,
+   * please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
+   * of the intended aliases.
+   *
+   * Additional names that this endpoint will be hosted on.
+   * 
+ * + * repeated string aliases = 2 [deprecated = true]; + * + * @deprecated google.api.Endpoint.aliases is deprecated. See google/api/endpoint.proto;l=56 + * @param index The index of the value to return. + * @return The bytes of the aliases at the given index. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getAliasesBytes(int index); + + /** + * + * + *
+   * The specification of an Internet routable address of API frontend that will
+   * handle requests to this [API
+   * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+   * either a valid IPv4 address or a fully-qualified domain name. For example,
+   * "8.8.8.8" or "myservice.appspot.com".
+   * 
+ * + * string target = 101; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * The specification of an Internet routable address of API frontend that will
+   * handle requests to this [API
+   * Endpoint](https://cloud.google.com/apis/design/glossary). It should be
+   * either a valid IPv4 address or a fully-qualified domain name. For example,
+   * "8.8.8.8" or "myservice.appspot.com".
+   * 
+ * + * string target = 101; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Allowing
+   * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
+   * cross-domain traffic, would allow the backends served from this endpoint to
+   * receive and respond to HTTP OPTIONS requests. The response will be used by
+   * the browser to determine whether the subsequent cross-origin request is
+   * allowed to proceed.
+   * 
+ * + * bool allow_cors = 5; + * + * @return The allowCors. + */ + boolean getAllowCors(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/EndpointProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/EndpointProto.java new file mode 100644 index 000000000000..7c2b946d12d9 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/EndpointProto.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/endpoint.proto + +package com.google.api; + +public final class EndpointProto { + private EndpointProto() {} + + 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_api_Endpoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Endpoint_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\031google/api/endpoint.proto\022\ngoogle.api\"" + + "Q\n\010Endpoint\022\014\n\004name\030\001 \001(\t\022\023\n\007aliases\030\002 \003" + + "(\tB\002\030\001\022\016\n\006target\030e \001(\t\022\022\n\nallow_cors\030\005 \001" + + "(\010Bo\n\016com.google.apiB\rEndpointProtoP\001ZEg" + + "oogle.golang.org/genproto/googleapis/api" + + "/serviceconfig;serviceconfig\242\002\004GAPIb\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_Endpoint_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Endpoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Endpoint_descriptor, + new java.lang.String[] { + "Name", "Aliases", "Target", "AllowCors", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ErrorReason.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ErrorReason.java new file mode 100644 index 000000000000..c5bfb44c0684 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ErrorReason.java @@ -0,0 +1,1669 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error_reason.proto + +package com.google.api; + +/** + * + * + *
+ * Defines the supported values for `google.rpc.ErrorInfo.reason` for the
+ * `googleapis.com` error domain. This error domain is reserved for [Service
+ * Infrastructure](https://cloud.google.com/service-infrastructure/docs/overview).
+ * For each error info of this domain, the metadata key "service" refers to the
+ * logical identifier of an API service, such as "pubsub.googleapis.com". The
+ * "consumer" refers to the entity that consumes an API Service. It typically is
+ * a Google project that owns the client application or the server resource,
+ * such as "projects/123". Other metadata keys are specific to each error
+ * reason. For more information, see the definition of the specific error
+ * reason.
+ * 
+ * + * Protobuf enum {@code google.api.ErrorReason} + */ +public enum ErrorReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Do not use this default value.
+   * 
+ * + * ERROR_REASON_UNSPECIFIED = 0; + */ + ERROR_REASON_UNSPECIFIED(0), + /** + * + * + *
+   * The request is calling a disabled service for a consumer.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" contacting
+   * "pubsub.googleapis.com" service which is disabled:
+   *
+   *     { "reason": "SERVICE_DISABLED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "pubsub.googleapis.com"
+   *       }
+   *     }
+   *
+   * This response indicates the "pubsub.googleapis.com" has been disabled in
+   * "projects/123".
+   * 
+ * + * SERVICE_DISABLED = 1; + */ + SERVICE_DISABLED(1), + /** + * + * + *
+   * The request whose associated billing account is disabled.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+   * "pubsub.googleapis.com" service because the associated billing account is
+   * disabled:
+   *
+   *     { "reason": "BILLING_DISABLED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "pubsub.googleapis.com"
+   *       }
+   *     }
+   *
+   * This response indicates the billing account associated has been disabled.
+   * 
+ * + * BILLING_DISABLED = 2; + */ + BILLING_DISABLED(2), + /** + * + * + *
+   * The request is denied because the provided [API
+   * key](https://cloud.google.com/docs/authentication/api-keys) is invalid. It
+   * may be in a bad format, cannot be found, or has been expired).
+   *
+   * Example of an ErrorInfo when the request is contacting
+   * "storage.googleapis.com" service with an invalid API key:
+   *
+   *     { "reason": "API_KEY_INVALID",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *       }
+   *     }
+   * 
+ * + * API_KEY_INVALID = 3; + */ + API_KEY_INVALID(3), + /** + * + * + *
+   * The request is denied because it violates [API key API
+   * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_api_restrictions).
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call the
+   * "storage.googleapis.com" service because this service is restricted in the
+   * API key:
+   *
+   *     { "reason": "API_KEY_SERVICE_BLOCKED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * API_KEY_SERVICE_BLOCKED = 4; + */ + API_KEY_SERVICE_BLOCKED(4), + /** + * + * + *
+   * The request is denied because it violates [API key HTTP
+   * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_http_restrictions).
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call
+   * "storage.googleapis.com" service because the http referrer of the request
+   * violates API key HTTP restrictions:
+   *
+   *     { "reason": "API_KEY_HTTP_REFERRER_BLOCKED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com",
+   *       }
+   *     }
+   * 
+ * + * API_KEY_HTTP_REFERRER_BLOCKED = 7; + */ + API_KEY_HTTP_REFERRER_BLOCKED(7), + /** + * + * + *
+   * The request is denied because it violates [API key IP address
+   * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions).
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call
+   * "storage.googleapis.com" service because the caller IP of the request
+   * violates API key IP address restrictions:
+   *
+   *     { "reason": "API_KEY_IP_ADDRESS_BLOCKED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com",
+   *       }
+   *     }
+   * 
+ * + * API_KEY_IP_ADDRESS_BLOCKED = 8; + */ + API_KEY_IP_ADDRESS_BLOCKED(8), + /** + * + * + *
+   * The request is denied because it violates [API key Android application
+   * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions).
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call
+   * "storage.googleapis.com" service because the request from the Android apps
+   * violates the API key Android application restrictions:
+   *
+   *     { "reason": "API_KEY_ANDROID_APP_BLOCKED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * API_KEY_ANDROID_APP_BLOCKED = 9; + */ + API_KEY_ANDROID_APP_BLOCKED(9), + /** + * + * + *
+   * The request is denied because it violates [API key iOS application
+   * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions).
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call
+   * "storage.googleapis.com" service because the request from the iOS apps
+   * violates the API key iOS application restrictions:
+   *
+   *     { "reason": "API_KEY_IOS_APP_BLOCKED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * API_KEY_IOS_APP_BLOCKED = 13; + */ + API_KEY_IOS_APP_BLOCKED(13), + /** + * + * + *
+   * The request is denied because there is not enough rate quota for the
+   * consumer.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+   * "pubsub.googleapis.com" service because consumer's rate quota usage has
+   * reached the maximum value set for the quota limit
+   * "ReadsPerMinutePerProject" on the quota metric
+   * "pubsub.googleapis.com/read_requests":
+   *
+   *     { "reason": "RATE_LIMIT_EXCEEDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "pubsub.googleapis.com",
+   *         "quota_metric": "pubsub.googleapis.com/read_requests",
+   *         "quota_limit": "ReadsPerMinutePerProject"
+   *       }
+   *     }
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" checks quota on
+   * the service "dataflow.googleapis.com" and hits the organization quota
+   * limit "DefaultRequestsPerMinutePerOrganization" on the metric
+   * "dataflow.googleapis.com/default_requests".
+   *
+   *     { "reason": "RATE_LIMIT_EXCEEDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "dataflow.googleapis.com",
+   *         "quota_metric": "dataflow.googleapis.com/default_requests",
+   *         "quota_limit": "DefaultRequestsPerMinutePerOrganization"
+   *       }
+   *     }
+   * 
+ * + * RATE_LIMIT_EXCEEDED = 5; + */ + RATE_LIMIT_EXCEEDED(5), + /** + * + * + *
+   * The request is denied because there is not enough resource quota for the
+   * consumer.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+   * "compute.googleapis.com" service because consumer's resource quota usage
+   * has reached the maximum value set for the quota limit "VMsPerProject"
+   * on the quota metric "compute.googleapis.com/vms":
+   *
+   *     { "reason": "RESOURCE_QUOTA_EXCEEDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "compute.googleapis.com",
+   *         "quota_metric": "compute.googleapis.com/vms",
+   *         "quota_limit": "VMsPerProject"
+   *       }
+   *     }
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" checks resource
+   * quota on the service "dataflow.googleapis.com" and hits the organization
+   * quota limit "jobs-per-organization" on the metric
+   * "dataflow.googleapis.com/job_count".
+   *
+   *     { "reason": "RESOURCE_QUOTA_EXCEEDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "dataflow.googleapis.com",
+   *         "quota_metric": "dataflow.googleapis.com/job_count",
+   *         "quota_limit": "jobs-per-organization"
+   *       }
+   *     }
+   * 
+ * + * RESOURCE_QUOTA_EXCEEDED = 6; + */ + RESOURCE_QUOTA_EXCEEDED(6), + /** + * + * + *
+   * The request whose associated billing account address is in a tax restricted
+   * location, violates the local tax restrictions when creating resources in
+   * the restricted region.
+   *
+   * Example of an ErrorInfo when creating the Cloud Storage Bucket in the
+   * container "projects/123" under a tax restricted region
+   * "locations/asia-northeast3":
+   *
+   *     { "reason": "LOCATION_TAX_POLICY_VIOLATED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com",
+   *         "location": "locations/asia-northeast3"
+   *       }
+   *     }
+   *
+   * This response indicates creating the Cloud Storage Bucket in
+   * "locations/asia-northeast3" violates the location tax restriction.
+   * 
+ * + * LOCATION_TAX_POLICY_VIOLATED = 10; + */ + LOCATION_TAX_POLICY_VIOLATED(10), + /** + * + * + *
+   * The request is denied because the caller does not have required permission
+   * on the user project "projects/123" or the user project is invalid. For more
+   * information, check the [userProject System
+   * Parameters](https://cloud.google.com/apis/docs/system-parameters).
+   *
+   * Example of an ErrorInfo when the caller is calling Cloud Storage service
+   * with insufficient permissions on the user project:
+   *
+   *     { "reason": "USER_PROJECT_DENIED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * USER_PROJECT_DENIED = 11; + */ + USER_PROJECT_DENIED(11), + /** + * + * + *
+   * The request is denied because the consumer "projects/123" is suspended due
+   * to Terms of Service(Tos) violations. Check [Project suspension
+   * guidelines](https://cloud.google.com/resource-manager/docs/project-suspension-guidelines)
+   * for more information.
+   *
+   * Example of an ErrorInfo when calling Cloud Storage service with the
+   * suspended consumer "projects/123":
+   *
+   *     { "reason": "CONSUMER_SUSPENDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * CONSUMER_SUSPENDED = 12; + */ + CONSUMER_SUSPENDED(12), + /** + * + * + *
+   * The request is denied because the associated consumer is invalid. It may be
+   * in a bad format, cannot be found, or have been deleted.
+   *
+   * Example of an ErrorInfo when calling Cloud Storage service with the
+   * invalid consumer "projects/123":
+   *
+   *     { "reason": "CONSUMER_INVALID",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * CONSUMER_INVALID = 14; + */ + CONSUMER_INVALID(14), + /** + * + * + *
+   * The request is denied because it violates [VPC Service
+   * Controls](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * The 'uid' field is a random generated identifier that customer can use it
+   * to search the audit log for a request rejected by VPC Service Controls. For
+   * more information, please refer [VPC Service Controls
+   * Troubleshooting](https://cloud.google.com/vpc-service-controls/docs/troubleshooting#unique-id)
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call
+   * Cloud Storage service because the request is prohibited by the VPC Service
+   * Controls.
+   *
+   *     { "reason": "SECURITY_POLICY_VIOLATED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "uid": "123456789abcde",
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * SECURITY_POLICY_VIOLATED = 15; + */ + SECURITY_POLICY_VIOLATED(15), + /** + * + * + *
+   * The request is denied because the provided access token has expired.
+   *
+   * Example of an ErrorInfo when the request is calling Cloud Storage service
+   * with an expired access token:
+   *
+   *     { "reason": "ACCESS_TOKEN_EXPIRED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject"
+   *       }
+   *     }
+   * 
+ * + * ACCESS_TOKEN_EXPIRED = 16; + */ + ACCESS_TOKEN_EXPIRED(16), + /** + * + * + *
+   * The request is denied because the provided access token doesn't have at
+   * least one of the acceptable scopes required for the API. Please check
+   * [OAuth 2.0 Scopes for Google
+   * APIs](https://developers.google.com/identity/protocols/oauth2/scopes) for
+   * the list of the OAuth 2.0 scopes that you might need to request to access
+   * the API.
+   *
+   * Example of an ErrorInfo when the request is calling Cloud Storage service
+   * with an access token that is missing required scopes:
+   *
+   *     { "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject"
+   *       }
+   *     }
+   * 
+ * + * ACCESS_TOKEN_SCOPE_INSUFFICIENT = 17; + */ + ACCESS_TOKEN_SCOPE_INSUFFICIENT(17), + /** + * + * + *
+   * The request is denied because the account associated with the provided
+   * access token is in an invalid state, such as disabled or deleted.
+   * For more information, see https://cloud.google.com/docs/authentication.
+   *
+   * Warning: For privacy reasons, the server may not be able to disclose the
+   * email address for some accounts. The client MUST NOT depend on the
+   * availability of the `email` attribute.
+   *
+   * Example of an ErrorInfo when the request is to the Cloud Storage API with
+   * an access token that is associated with a disabled or deleted [service
+   * account](http://cloud/iam/docs/service-accounts):
+   *
+   *     { "reason": "ACCOUNT_STATE_INVALID",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject",
+   *         "email": "user@123.iam.gserviceaccount.com"
+   *       }
+   *     }
+   * 
+ * + * ACCOUNT_STATE_INVALID = 18; + */ + ACCOUNT_STATE_INVALID(18), + /** + * + * + *
+   * The request is denied because the type of the provided access token is not
+   * supported by the API being called.
+   *
+   * Example of an ErrorInfo when the request is to the Cloud Storage API with
+   * an unsupported token type.
+   *
+   *     { "reason": "ACCESS_TOKEN_TYPE_UNSUPPORTED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject"
+   *       }
+   *     }
+   * 
+ * + * ACCESS_TOKEN_TYPE_UNSUPPORTED = 19; + */ + ACCESS_TOKEN_TYPE_UNSUPPORTED(19), + /** + * + * + *
+   * The request is denied because the request doesn't have any authentication
+   * credentials. For more information regarding the supported authentication
+   * strategies for Google Cloud APIs, see
+   * https://cloud.google.com/docs/authentication.
+   *
+   * Example of an ErrorInfo when the request is to the Cloud Storage API
+   * without any authentication credentials.
+   *
+   *     { "reason": "CREDENTIALS_MISSING",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject"
+   *       }
+   *     }
+   * 
+ * + * CREDENTIALS_MISSING = 20; + */ + CREDENTIALS_MISSING(20), + /** + * + * + *
+   * The request is denied because the provided project owning the resource
+   * which acts as the [API
+   * consumer](https://cloud.google.com/apis/design/glossary#api_consumer) is
+   * invalid. It may be in a bad format or empty.
+   *
+   * Example of an ErrorInfo when the request is to the Cloud Functions API,
+   * but the offered resource project in the request in a bad format which can't
+   * perform the ListFunctions method.
+   *
+   *     { "reason": "RESOURCE_PROJECT_INVALID",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "cloudfunctions.googleapis.com",
+   *         "method":
+   *         "google.cloud.functions.v1.CloudFunctionsService.ListFunctions"
+   *       }
+   *     }
+   * 
+ * + * RESOURCE_PROJECT_INVALID = 21; + */ + RESOURCE_PROJECT_INVALID(21), + /** + * + * + *
+   * The request is denied because the provided session cookie is missing,
+   * invalid or failed to decode.
+   *
+   * Example of an ErrorInfo when the request is calling Cloud Storage service
+   * with a SID cookie which can't be decoded.
+   *
+   *     { "reason": "SESSION_COOKIE_INVALID",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject",
+   *         "cookie": "SID"
+   *       }
+   *     }
+   * 
+ * + * SESSION_COOKIE_INVALID = 23; + */ + SESSION_COOKIE_INVALID(23), + /** + * + * + *
+   * The request is denied because the user is from a Google Workspace customer
+   * that blocks their users from accessing a particular service.
+   *
+   * Example scenario: https://support.google.com/a/answer/9197205?hl=en
+   *
+   * Example of an ErrorInfo when access to Google Cloud Storage service is
+   * blocked by the Google Workspace administrator:
+   *
+   *     { "reason": "USER_BLOCKED_BY_ADMIN",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject",
+   *       }
+   *     }
+   * 
+ * + * USER_BLOCKED_BY_ADMIN = 24; + */ + USER_BLOCKED_BY_ADMIN(24), + /** + * + * + *
+   * The request is denied because the resource service usage is restricted
+   * by administrators according to the organization policy constraint.
+   * For more information see
+   * https://cloud.google.com/resource-manager/docs/organization-policy/restricting-services.
+   *
+   * Example of an ErrorInfo when access to Google Cloud Storage service is
+   * restricted by Resource Usage Restriction policy:
+   *
+   *     { "reason": "RESOURCE_USAGE_RESTRICTION_VIOLATED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/project-123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * RESOURCE_USAGE_RESTRICTION_VIOLATED = 25; + */ + RESOURCE_USAGE_RESTRICTION_VIOLATED(25), + /** + * + * + *
+   * Unimplemented. Do not use.
+   *
+   * The request is denied because it contains unsupported system parameters in
+   * URL query parameters or HTTP headers. For more information,
+   * see https://cloud.google.com/apis/docs/system-parameters
+   *
+   * Example of an ErrorInfo when access "pubsub.googleapis.com" service with
+   * a request header of "x-goog-user-ip":
+   *
+   *     { "reason": "SYSTEM_PARAMETER_UNSUPPORTED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "pubsub.googleapis.com"
+   *         "parameter": "x-goog-user-ip"
+   *       }
+   *     }
+   * 
+ * + * SYSTEM_PARAMETER_UNSUPPORTED = 26; + */ + SYSTEM_PARAMETER_UNSUPPORTED(26), + /** + * + * + *
+   * The request is denied because it violates Org Restriction: the requested
+   * resource does not belong to allowed organizations specified in
+   * "X-Goog-Allowed-Resources" header.
+   *
+   * Example of an ErrorInfo when accessing a GCP resource that is restricted by
+   * Org Restriction for "pubsub.googleapis.com" service.
+   *
+   * {
+   *   reason: "ORG_RESTRICTION_VIOLATION"
+   *   domain: "googleapis.com"
+   *   metadata {
+   *     "consumer":"projects/123456"
+   *     "service": "pubsub.googleapis.com"
+   *   }
+   * }
+   * 
+ * + * ORG_RESTRICTION_VIOLATION = 27; + */ + ORG_RESTRICTION_VIOLATION(27), + /** + * + * + *
+   * The request is denied because "X-Goog-Allowed-Resources" header is in a bad
+   * format.
+   *
+   * Example of an ErrorInfo when
+   * accessing "pubsub.googleapis.com" service with an invalid
+   * "X-Goog-Allowed-Resources" request header.
+   *
+   * {
+   *   reason: "ORG_RESTRICTION_HEADER_INVALID"
+   *   domain: "googleapis.com"
+   *   metadata {
+   *     "consumer":"projects/123456"
+   *     "service": "pubsub.googleapis.com"
+   *   }
+   * }
+   * 
+ * + * ORG_RESTRICTION_HEADER_INVALID = 28; + */ + ORG_RESTRICTION_HEADER_INVALID(28), + /** + * + * + *
+   * Unimplemented. Do not use.
+   *
+   * The request is calling a service that is not visible to the consumer.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" contacting
+   *  "pubsub.googleapis.com" service which is not visible to the consumer.
+   *
+   *     { "reason": "SERVICE_NOT_VISIBLE",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "pubsub.googleapis.com"
+   *       }
+   *     }
+   *
+   * This response indicates the "pubsub.googleapis.com" is not visible to
+   * "projects/123" (or it may not exist).
+   * 
+ * + * SERVICE_NOT_VISIBLE = 29; + */ + SERVICE_NOT_VISIBLE(29), + /** + * + * + *
+   * The request is related to a project for which GCP access is suspended.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+   * "pubsub.googleapis.com" service because GCP access is suspended:
+   *
+   *     { "reason": "GCP_SUSPENDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "pubsub.googleapis.com"
+   *       }
+   *     }
+   *
+   * This response indicates the associated GCP account has been suspended.
+   * 
+ * + * GCP_SUSPENDED = 30; + */ + GCP_SUSPENDED(30), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Do not use this default value.
+   * 
+ * + * ERROR_REASON_UNSPECIFIED = 0; + */ + public static final int ERROR_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The request is calling a disabled service for a consumer.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" contacting
+   * "pubsub.googleapis.com" service which is disabled:
+   *
+   *     { "reason": "SERVICE_DISABLED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "pubsub.googleapis.com"
+   *       }
+   *     }
+   *
+   * This response indicates the "pubsub.googleapis.com" has been disabled in
+   * "projects/123".
+   * 
+ * + * SERVICE_DISABLED = 1; + */ + public static final int SERVICE_DISABLED_VALUE = 1; + /** + * + * + *
+   * The request whose associated billing account is disabled.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+   * "pubsub.googleapis.com" service because the associated billing account is
+   * disabled:
+   *
+   *     { "reason": "BILLING_DISABLED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "pubsub.googleapis.com"
+   *       }
+   *     }
+   *
+   * This response indicates the billing account associated has been disabled.
+   * 
+ * + * BILLING_DISABLED = 2; + */ + public static final int BILLING_DISABLED_VALUE = 2; + /** + * + * + *
+   * The request is denied because the provided [API
+   * key](https://cloud.google.com/docs/authentication/api-keys) is invalid. It
+   * may be in a bad format, cannot be found, or has been expired).
+   *
+   * Example of an ErrorInfo when the request is contacting
+   * "storage.googleapis.com" service with an invalid API key:
+   *
+   *     { "reason": "API_KEY_INVALID",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *       }
+   *     }
+   * 
+ * + * API_KEY_INVALID = 3; + */ + public static final int API_KEY_INVALID_VALUE = 3; + /** + * + * + *
+   * The request is denied because it violates [API key API
+   * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_api_restrictions).
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call the
+   * "storage.googleapis.com" service because this service is restricted in the
+   * API key:
+   *
+   *     { "reason": "API_KEY_SERVICE_BLOCKED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * API_KEY_SERVICE_BLOCKED = 4; + */ + public static final int API_KEY_SERVICE_BLOCKED_VALUE = 4; + /** + * + * + *
+   * The request is denied because it violates [API key HTTP
+   * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_http_restrictions).
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call
+   * "storage.googleapis.com" service because the http referrer of the request
+   * violates API key HTTP restrictions:
+   *
+   *     { "reason": "API_KEY_HTTP_REFERRER_BLOCKED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com",
+   *       }
+   *     }
+   * 
+ * + * API_KEY_HTTP_REFERRER_BLOCKED = 7; + */ + public static final int API_KEY_HTTP_REFERRER_BLOCKED_VALUE = 7; + /** + * + * + *
+   * The request is denied because it violates [API key IP address
+   * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions).
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call
+   * "storage.googleapis.com" service because the caller IP of the request
+   * violates API key IP address restrictions:
+   *
+   *     { "reason": "API_KEY_IP_ADDRESS_BLOCKED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com",
+   *       }
+   *     }
+   * 
+ * + * API_KEY_IP_ADDRESS_BLOCKED = 8; + */ + public static final int API_KEY_IP_ADDRESS_BLOCKED_VALUE = 8; + /** + * + * + *
+   * The request is denied because it violates [API key Android application
+   * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions).
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call
+   * "storage.googleapis.com" service because the request from the Android apps
+   * violates the API key Android application restrictions:
+   *
+   *     { "reason": "API_KEY_ANDROID_APP_BLOCKED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * API_KEY_ANDROID_APP_BLOCKED = 9; + */ + public static final int API_KEY_ANDROID_APP_BLOCKED_VALUE = 9; + /** + * + * + *
+   * The request is denied because it violates [API key iOS application
+   * restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions).
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call
+   * "storage.googleapis.com" service because the request from the iOS apps
+   * violates the API key iOS application restrictions:
+   *
+   *     { "reason": "API_KEY_IOS_APP_BLOCKED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * API_KEY_IOS_APP_BLOCKED = 13; + */ + public static final int API_KEY_IOS_APP_BLOCKED_VALUE = 13; + /** + * + * + *
+   * The request is denied because there is not enough rate quota for the
+   * consumer.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+   * "pubsub.googleapis.com" service because consumer's rate quota usage has
+   * reached the maximum value set for the quota limit
+   * "ReadsPerMinutePerProject" on the quota metric
+   * "pubsub.googleapis.com/read_requests":
+   *
+   *     { "reason": "RATE_LIMIT_EXCEEDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "pubsub.googleapis.com",
+   *         "quota_metric": "pubsub.googleapis.com/read_requests",
+   *         "quota_limit": "ReadsPerMinutePerProject"
+   *       }
+   *     }
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" checks quota on
+   * the service "dataflow.googleapis.com" and hits the organization quota
+   * limit "DefaultRequestsPerMinutePerOrganization" on the metric
+   * "dataflow.googleapis.com/default_requests".
+   *
+   *     { "reason": "RATE_LIMIT_EXCEEDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "dataflow.googleapis.com",
+   *         "quota_metric": "dataflow.googleapis.com/default_requests",
+   *         "quota_limit": "DefaultRequestsPerMinutePerOrganization"
+   *       }
+   *     }
+   * 
+ * + * RATE_LIMIT_EXCEEDED = 5; + */ + public static final int RATE_LIMIT_EXCEEDED_VALUE = 5; + /** + * + * + *
+   * The request is denied because there is not enough resource quota for the
+   * consumer.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+   * "compute.googleapis.com" service because consumer's resource quota usage
+   * has reached the maximum value set for the quota limit "VMsPerProject"
+   * on the quota metric "compute.googleapis.com/vms":
+   *
+   *     { "reason": "RESOURCE_QUOTA_EXCEEDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "compute.googleapis.com",
+   *         "quota_metric": "compute.googleapis.com/vms",
+   *         "quota_limit": "VMsPerProject"
+   *       }
+   *     }
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" checks resource
+   * quota on the service "dataflow.googleapis.com" and hits the organization
+   * quota limit "jobs-per-organization" on the metric
+   * "dataflow.googleapis.com/job_count".
+   *
+   *     { "reason": "RESOURCE_QUOTA_EXCEEDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "dataflow.googleapis.com",
+   *         "quota_metric": "dataflow.googleapis.com/job_count",
+   *         "quota_limit": "jobs-per-organization"
+   *       }
+   *     }
+   * 
+ * + * RESOURCE_QUOTA_EXCEEDED = 6; + */ + public static final int RESOURCE_QUOTA_EXCEEDED_VALUE = 6; + /** + * + * + *
+   * The request whose associated billing account address is in a tax restricted
+   * location, violates the local tax restrictions when creating resources in
+   * the restricted region.
+   *
+   * Example of an ErrorInfo when creating the Cloud Storage Bucket in the
+   * container "projects/123" under a tax restricted region
+   * "locations/asia-northeast3":
+   *
+   *     { "reason": "LOCATION_TAX_POLICY_VIOLATED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com",
+   *         "location": "locations/asia-northeast3"
+   *       }
+   *     }
+   *
+   * This response indicates creating the Cloud Storage Bucket in
+   * "locations/asia-northeast3" violates the location tax restriction.
+   * 
+ * + * LOCATION_TAX_POLICY_VIOLATED = 10; + */ + public static final int LOCATION_TAX_POLICY_VIOLATED_VALUE = 10; + /** + * + * + *
+   * The request is denied because the caller does not have required permission
+   * on the user project "projects/123" or the user project is invalid. For more
+   * information, check the [userProject System
+   * Parameters](https://cloud.google.com/apis/docs/system-parameters).
+   *
+   * Example of an ErrorInfo when the caller is calling Cloud Storage service
+   * with insufficient permissions on the user project:
+   *
+   *     { "reason": "USER_PROJECT_DENIED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * USER_PROJECT_DENIED = 11; + */ + public static final int USER_PROJECT_DENIED_VALUE = 11; + /** + * + * + *
+   * The request is denied because the consumer "projects/123" is suspended due
+   * to Terms of Service(Tos) violations. Check [Project suspension
+   * guidelines](https://cloud.google.com/resource-manager/docs/project-suspension-guidelines)
+   * for more information.
+   *
+   * Example of an ErrorInfo when calling Cloud Storage service with the
+   * suspended consumer "projects/123":
+   *
+   *     { "reason": "CONSUMER_SUSPENDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * CONSUMER_SUSPENDED = 12; + */ + public static final int CONSUMER_SUSPENDED_VALUE = 12; + /** + * + * + *
+   * The request is denied because the associated consumer is invalid. It may be
+   * in a bad format, cannot be found, or have been deleted.
+   *
+   * Example of an ErrorInfo when calling Cloud Storage service with the
+   * invalid consumer "projects/123":
+   *
+   *     { "reason": "CONSUMER_INVALID",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * CONSUMER_INVALID = 14; + */ + public static final int CONSUMER_INVALID_VALUE = 14; + /** + * + * + *
+   * The request is denied because it violates [VPC Service
+   * Controls](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * The 'uid' field is a random generated identifier that customer can use it
+   * to search the audit log for a request rejected by VPC Service Controls. For
+   * more information, please refer [VPC Service Controls
+   * Troubleshooting](https://cloud.google.com/vpc-service-controls/docs/troubleshooting#unique-id)
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to call
+   * Cloud Storage service because the request is prohibited by the VPC Service
+   * Controls.
+   *
+   *     { "reason": "SECURITY_POLICY_VIOLATED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "uid": "123456789abcde",
+   *         "consumer": "projects/123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * SECURITY_POLICY_VIOLATED = 15; + */ + public static final int SECURITY_POLICY_VIOLATED_VALUE = 15; + /** + * + * + *
+   * The request is denied because the provided access token has expired.
+   *
+   * Example of an ErrorInfo when the request is calling Cloud Storage service
+   * with an expired access token:
+   *
+   *     { "reason": "ACCESS_TOKEN_EXPIRED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject"
+   *       }
+   *     }
+   * 
+ * + * ACCESS_TOKEN_EXPIRED = 16; + */ + public static final int ACCESS_TOKEN_EXPIRED_VALUE = 16; + /** + * + * + *
+   * The request is denied because the provided access token doesn't have at
+   * least one of the acceptable scopes required for the API. Please check
+   * [OAuth 2.0 Scopes for Google
+   * APIs](https://developers.google.com/identity/protocols/oauth2/scopes) for
+   * the list of the OAuth 2.0 scopes that you might need to request to access
+   * the API.
+   *
+   * Example of an ErrorInfo when the request is calling Cloud Storage service
+   * with an access token that is missing required scopes:
+   *
+   *     { "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject"
+   *       }
+   *     }
+   * 
+ * + * ACCESS_TOKEN_SCOPE_INSUFFICIENT = 17; + */ + public static final int ACCESS_TOKEN_SCOPE_INSUFFICIENT_VALUE = 17; + /** + * + * + *
+   * The request is denied because the account associated with the provided
+   * access token is in an invalid state, such as disabled or deleted.
+   * For more information, see https://cloud.google.com/docs/authentication.
+   *
+   * Warning: For privacy reasons, the server may not be able to disclose the
+   * email address for some accounts. The client MUST NOT depend on the
+   * availability of the `email` attribute.
+   *
+   * Example of an ErrorInfo when the request is to the Cloud Storage API with
+   * an access token that is associated with a disabled or deleted [service
+   * account](http://cloud/iam/docs/service-accounts):
+   *
+   *     { "reason": "ACCOUNT_STATE_INVALID",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject",
+   *         "email": "user@123.iam.gserviceaccount.com"
+   *       }
+   *     }
+   * 
+ * + * ACCOUNT_STATE_INVALID = 18; + */ + public static final int ACCOUNT_STATE_INVALID_VALUE = 18; + /** + * + * + *
+   * The request is denied because the type of the provided access token is not
+   * supported by the API being called.
+   *
+   * Example of an ErrorInfo when the request is to the Cloud Storage API with
+   * an unsupported token type.
+   *
+   *     { "reason": "ACCESS_TOKEN_TYPE_UNSUPPORTED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject"
+   *       }
+   *     }
+   * 
+ * + * ACCESS_TOKEN_TYPE_UNSUPPORTED = 19; + */ + public static final int ACCESS_TOKEN_TYPE_UNSUPPORTED_VALUE = 19; + /** + * + * + *
+   * The request is denied because the request doesn't have any authentication
+   * credentials. For more information regarding the supported authentication
+   * strategies for Google Cloud APIs, see
+   * https://cloud.google.com/docs/authentication.
+   *
+   * Example of an ErrorInfo when the request is to the Cloud Storage API
+   * without any authentication credentials.
+   *
+   *     { "reason": "CREDENTIALS_MISSING",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject"
+   *       }
+   *     }
+   * 
+ * + * CREDENTIALS_MISSING = 20; + */ + public static final int CREDENTIALS_MISSING_VALUE = 20; + /** + * + * + *
+   * The request is denied because the provided project owning the resource
+   * which acts as the [API
+   * consumer](https://cloud.google.com/apis/design/glossary#api_consumer) is
+   * invalid. It may be in a bad format or empty.
+   *
+   * Example of an ErrorInfo when the request is to the Cloud Functions API,
+   * but the offered resource project in the request in a bad format which can't
+   * perform the ListFunctions method.
+   *
+   *     { "reason": "RESOURCE_PROJECT_INVALID",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "cloudfunctions.googleapis.com",
+   *         "method":
+   *         "google.cloud.functions.v1.CloudFunctionsService.ListFunctions"
+   *       }
+   *     }
+   * 
+ * + * RESOURCE_PROJECT_INVALID = 21; + */ + public static final int RESOURCE_PROJECT_INVALID_VALUE = 21; + /** + * + * + *
+   * The request is denied because the provided session cookie is missing,
+   * invalid or failed to decode.
+   *
+   * Example of an ErrorInfo when the request is calling Cloud Storage service
+   * with a SID cookie which can't be decoded.
+   *
+   *     { "reason": "SESSION_COOKIE_INVALID",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject",
+   *         "cookie": "SID"
+   *       }
+   *     }
+   * 
+ * + * SESSION_COOKIE_INVALID = 23; + */ + public static final int SESSION_COOKIE_INVALID_VALUE = 23; + /** + * + * + *
+   * The request is denied because the user is from a Google Workspace customer
+   * that blocks their users from accessing a particular service.
+   *
+   * Example scenario: https://support.google.com/a/answer/9197205?hl=en
+   *
+   * Example of an ErrorInfo when access to Google Cloud Storage service is
+   * blocked by the Google Workspace administrator:
+   *
+   *     { "reason": "USER_BLOCKED_BY_ADMIN",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "storage.googleapis.com",
+   *         "method": "google.storage.v1.Storage.GetObject",
+   *       }
+   *     }
+   * 
+ * + * USER_BLOCKED_BY_ADMIN = 24; + */ + public static final int USER_BLOCKED_BY_ADMIN_VALUE = 24; + /** + * + * + *
+   * The request is denied because the resource service usage is restricted
+   * by administrators according to the organization policy constraint.
+   * For more information see
+   * https://cloud.google.com/resource-manager/docs/organization-policy/restricting-services.
+   *
+   * Example of an ErrorInfo when access to Google Cloud Storage service is
+   * restricted by Resource Usage Restriction policy:
+   *
+   *     { "reason": "RESOURCE_USAGE_RESTRICTION_VIOLATED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/project-123",
+   *         "service": "storage.googleapis.com"
+   *       }
+   *     }
+   * 
+ * + * RESOURCE_USAGE_RESTRICTION_VIOLATED = 25; + */ + public static final int RESOURCE_USAGE_RESTRICTION_VIOLATED_VALUE = 25; + /** + * + * + *
+   * Unimplemented. Do not use.
+   *
+   * The request is denied because it contains unsupported system parameters in
+   * URL query parameters or HTTP headers. For more information,
+   * see https://cloud.google.com/apis/docs/system-parameters
+   *
+   * Example of an ErrorInfo when access "pubsub.googleapis.com" service with
+   * a request header of "x-goog-user-ip":
+   *
+   *     { "reason": "SYSTEM_PARAMETER_UNSUPPORTED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "service": "pubsub.googleapis.com"
+   *         "parameter": "x-goog-user-ip"
+   *       }
+   *     }
+   * 
+ * + * SYSTEM_PARAMETER_UNSUPPORTED = 26; + */ + public static final int SYSTEM_PARAMETER_UNSUPPORTED_VALUE = 26; + /** + * + * + *
+   * The request is denied because it violates Org Restriction: the requested
+   * resource does not belong to allowed organizations specified in
+   * "X-Goog-Allowed-Resources" header.
+   *
+   * Example of an ErrorInfo when accessing a GCP resource that is restricted by
+   * Org Restriction for "pubsub.googleapis.com" service.
+   *
+   * {
+   *   reason: "ORG_RESTRICTION_VIOLATION"
+   *   domain: "googleapis.com"
+   *   metadata {
+   *     "consumer":"projects/123456"
+   *     "service": "pubsub.googleapis.com"
+   *   }
+   * }
+   * 
+ * + * ORG_RESTRICTION_VIOLATION = 27; + */ + public static final int ORG_RESTRICTION_VIOLATION_VALUE = 27; + /** + * + * + *
+   * The request is denied because "X-Goog-Allowed-Resources" header is in a bad
+   * format.
+   *
+   * Example of an ErrorInfo when
+   * accessing "pubsub.googleapis.com" service with an invalid
+   * "X-Goog-Allowed-Resources" request header.
+   *
+   * {
+   *   reason: "ORG_RESTRICTION_HEADER_INVALID"
+   *   domain: "googleapis.com"
+   *   metadata {
+   *     "consumer":"projects/123456"
+   *     "service": "pubsub.googleapis.com"
+   *   }
+   * }
+   * 
+ * + * ORG_RESTRICTION_HEADER_INVALID = 28; + */ + public static final int ORG_RESTRICTION_HEADER_INVALID_VALUE = 28; + /** + * + * + *
+   * Unimplemented. Do not use.
+   *
+   * The request is calling a service that is not visible to the consumer.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" contacting
+   *  "pubsub.googleapis.com" service which is not visible to the consumer.
+   *
+   *     { "reason": "SERVICE_NOT_VISIBLE",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "pubsub.googleapis.com"
+   *       }
+   *     }
+   *
+   * This response indicates the "pubsub.googleapis.com" is not visible to
+   * "projects/123" (or it may not exist).
+   * 
+ * + * SERVICE_NOT_VISIBLE = 29; + */ + public static final int SERVICE_NOT_VISIBLE_VALUE = 29; + /** + * + * + *
+   * The request is related to a project for which GCP access is suspended.
+   *
+   * Example of an ErrorInfo when the consumer "projects/123" fails to contact
+   * "pubsub.googleapis.com" service because GCP access is suspended:
+   *
+   *     { "reason": "GCP_SUSPENDED",
+   *       "domain": "googleapis.com",
+   *       "metadata": {
+   *         "consumer": "projects/123",
+   *         "service": "pubsub.googleapis.com"
+   *       }
+   *     }
+   *
+   * This response indicates the associated GCP account has been suspended.
+   * 
+ * + * GCP_SUSPENDED = 30; + */ + public static final int GCP_SUSPENDED_VALUE = 30; + + 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 ErrorReason 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 ErrorReason forNumber(int value) { + switch (value) { + case 0: + return ERROR_REASON_UNSPECIFIED; + case 1: + return SERVICE_DISABLED; + case 2: + return BILLING_DISABLED; + case 3: + return API_KEY_INVALID; + case 4: + return API_KEY_SERVICE_BLOCKED; + case 7: + return API_KEY_HTTP_REFERRER_BLOCKED; + case 8: + return API_KEY_IP_ADDRESS_BLOCKED; + case 9: + return API_KEY_ANDROID_APP_BLOCKED; + case 13: + return API_KEY_IOS_APP_BLOCKED; + case 5: + return RATE_LIMIT_EXCEEDED; + case 6: + return RESOURCE_QUOTA_EXCEEDED; + case 10: + return LOCATION_TAX_POLICY_VIOLATED; + case 11: + return USER_PROJECT_DENIED; + case 12: + return CONSUMER_SUSPENDED; + case 14: + return CONSUMER_INVALID; + case 15: + return SECURITY_POLICY_VIOLATED; + case 16: + return ACCESS_TOKEN_EXPIRED; + case 17: + return ACCESS_TOKEN_SCOPE_INSUFFICIENT; + case 18: + return ACCOUNT_STATE_INVALID; + case 19: + return ACCESS_TOKEN_TYPE_UNSUPPORTED; + case 20: + return CREDENTIALS_MISSING; + case 21: + return RESOURCE_PROJECT_INVALID; + case 23: + return SESSION_COOKIE_INVALID; + case 24: + return USER_BLOCKED_BY_ADMIN; + case 25: + return RESOURCE_USAGE_RESTRICTION_VIOLATED; + case 26: + return SYSTEM_PARAMETER_UNSUPPORTED; + case 27: + return ORG_RESTRICTION_VIOLATION; + case 28: + return ORG_RESTRICTION_HEADER_INVALID; + case 29: + return SERVICE_NOT_VISIBLE; + case 30: + return GCP_SUSPENDED; + 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 ErrorReason findValueByNumber(int number) { + return ErrorReason.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.api.ErrorReasonProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ErrorReason[] VALUES = values(); + + public static ErrorReason 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 ErrorReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.ErrorReason) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ErrorReasonProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ErrorReasonProto.java new file mode 100644 index 000000000000..abb184376e42 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ErrorReasonProto.java @@ -0,0 +1,72 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/error_reason.proto + +package com.google.api; + +public final class ErrorReasonProto { + private ErrorReasonProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\035google/api/error_reason.proto\022\ngoogle." + + "api*\354\006\n\013ErrorReason\022\034\n\030ERROR_REASON_UNSP" + + "ECIFIED\020\000\022\024\n\020SERVICE_DISABLED\020\001\022\024\n\020BILLI" + + "NG_DISABLED\020\002\022\023\n\017API_KEY_INVALID\020\003\022\033\n\027AP" + + "I_KEY_SERVICE_BLOCKED\020\004\022!\n\035API_KEY_HTTP_" + + "REFERRER_BLOCKED\020\007\022\036\n\032API_KEY_IP_ADDRESS" + + "_BLOCKED\020\010\022\037\n\033API_KEY_ANDROID_APP_BLOCKE" + + "D\020\t\022\033\n\027API_KEY_IOS_APP_BLOCKED\020\r\022\027\n\023RATE" + + "_LIMIT_EXCEEDED\020\005\022\033\n\027RESOURCE_QUOTA_EXCE" + + "EDED\020\006\022 \n\034LOCATION_TAX_POLICY_VIOLATED\020\n" + + "\022\027\n\023USER_PROJECT_DENIED\020\013\022\026\n\022CONSUMER_SU" + + "SPENDED\020\014\022\024\n\020CONSUMER_INVALID\020\016\022\034\n\030SECUR" + + "ITY_POLICY_VIOLATED\020\017\022\030\n\024ACCESS_TOKEN_EX" + + "PIRED\020\020\022#\n\037ACCESS_TOKEN_SCOPE_INSUFFICIE" + + "NT\020\021\022\031\n\025ACCOUNT_STATE_INVALID\020\022\022!\n\035ACCES" + + "S_TOKEN_TYPE_UNSUPPORTED\020\023\022\027\n\023CREDENTIAL" + + "S_MISSING\020\024\022\034\n\030RESOURCE_PROJECT_INVALID\020" + + "\025\022\032\n\026SESSION_COOKIE_INVALID\020\027\022\031\n\025USER_BL" + + "OCKED_BY_ADMIN\020\030\022\'\n#RESOURCE_USAGE_RESTR" + + "ICTION_VIOLATED\020\031\022 \n\034SYSTEM_PARAMETER_UN" + + "SUPPORTED\020\032\022\035\n\031ORG_RESTRICTION_VIOLATION" + + "\020\033\022\"\n\036ORG_RESTRICTION_HEADER_INVALID\020\034\022\027" + + "\n\023SERVICE_NOT_VISIBLE\020\035\022\021\n\rGCP_SUSPENDED" + + "\020\036Bp\n\016com.google.apiB\020ErrorReasonProtoP\001" + + "ZCgoogle.golang.org/genproto/googleapis/" + + "api/error_reason;error_reason\242\002\004GAPIb\006pr" + + "oto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldBehavior.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldBehavior.java new file mode 100644 index 000000000000..86fcd11ef07f --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldBehavior.java @@ -0,0 +1,369 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/field_behavior.proto + +package com.google.api; + +/** + * + * + *
+ * An indicator of the behavior of a given field (for example, that a field
+ * is required in requests, or given as output but ignored as input).
+ * This **does not** change the behavior in protocol buffers itself; it only
+ * denotes the behavior and may affect how API tooling handles the field.
+ *
+ * Note: This enum **may** receive new values in the future.
+ * 
+ * + * Protobuf enum {@code google.api.FieldBehavior} + */ +public enum FieldBehavior implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Conventional default for enums. Do not use this.
+   * 
+ * + * FIELD_BEHAVIOR_UNSPECIFIED = 0; + */ + FIELD_BEHAVIOR_UNSPECIFIED(0), + /** + * + * + *
+   * Specifically denotes a field as optional.
+   * While all fields in protocol buffers are optional, this may be specified
+   * for emphasis if appropriate.
+   * 
+ * + * OPTIONAL = 1; + */ + OPTIONAL(1), + /** + * + * + *
+   * Denotes a field as required.
+   * This indicates that the field **must** be provided as part of the request,
+   * and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
+   * 
+ * + * REQUIRED = 2; + */ + REQUIRED(2), + /** + * + * + *
+   * Denotes a field as output only.
+   * This indicates that the field is provided in responses, but including the
+   * field in a request does nothing (the server *must* ignore it and
+   * *must not* throw an error as a result of the field's presence).
+   * 
+ * + * OUTPUT_ONLY = 3; + */ + OUTPUT_ONLY(3), + /** + * + * + *
+   * Denotes a field as input only.
+   * This indicates that the field is provided in requests, and the
+   * corresponding field is not included in output.
+   * 
+ * + * INPUT_ONLY = 4; + */ + INPUT_ONLY(4), + /** + * + * + *
+   * Denotes a field as immutable.
+   * This indicates that the field may be set once in a request to create a
+   * resource, but may not be changed thereafter.
+   * 
+ * + * IMMUTABLE = 5; + */ + IMMUTABLE(5), + /** + * + * + *
+   * Denotes that a (repeated) field is an unordered list.
+   * This indicates that the service may provide the elements of the list
+   * in any arbitrary  order, rather than the order the user originally
+   * provided. Additionally, the list's order may or may not be stable.
+   * 
+ * + * UNORDERED_LIST = 6; + */ + UNORDERED_LIST(6), + /** + * + * + *
+   * Denotes that this field returns a non-empty default value if not set.
+   * This indicates that if the user provides the empty value in a request,
+   * a non-empty value will be returned. The user will not be aware of what
+   * non-empty value to expect.
+   * 
+ * + * NON_EMPTY_DEFAULT = 7; + */ + NON_EMPTY_DEFAULT(7), + /** + * + * + *
+   * Denotes that the field in a resource (a message annotated with
+   * google.api.resource) is used in the resource name to uniquely identify the
+   * resource. For AIP-compliant APIs, this should only be applied to the
+   * `name` field on the resource.
+   *
+   * This behavior should not be applied to references to other resources within
+   * the message.
+   *
+   * The identifier field of resources often have different field behavior
+   * depending on the request it is embedded in (e.g. for Create methods name
+   * is optional and unused, while for Update methods it is required). Instead
+   * of method-specific annotations, only `IDENTIFIER` is required.
+   * 
+ * + * IDENTIFIER = 8; + */ + IDENTIFIER(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Conventional default for enums. Do not use this.
+   * 
+ * + * FIELD_BEHAVIOR_UNSPECIFIED = 0; + */ + public static final int FIELD_BEHAVIOR_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Specifically denotes a field as optional.
+   * While all fields in protocol buffers are optional, this may be specified
+   * for emphasis if appropriate.
+   * 
+ * + * OPTIONAL = 1; + */ + public static final int OPTIONAL_VALUE = 1; + /** + * + * + *
+   * Denotes a field as required.
+   * This indicates that the field **must** be provided as part of the request,
+   * and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
+   * 
+ * + * REQUIRED = 2; + */ + public static final int REQUIRED_VALUE = 2; + /** + * + * + *
+   * Denotes a field as output only.
+   * This indicates that the field is provided in responses, but including the
+   * field in a request does nothing (the server *must* ignore it and
+   * *must not* throw an error as a result of the field's presence).
+   * 
+ * + * OUTPUT_ONLY = 3; + */ + public static final int OUTPUT_ONLY_VALUE = 3; + /** + * + * + *
+   * Denotes a field as input only.
+   * This indicates that the field is provided in requests, and the
+   * corresponding field is not included in output.
+   * 
+ * + * INPUT_ONLY = 4; + */ + public static final int INPUT_ONLY_VALUE = 4; + /** + * + * + *
+   * Denotes a field as immutable.
+   * This indicates that the field may be set once in a request to create a
+   * resource, but may not be changed thereafter.
+   * 
+ * + * IMMUTABLE = 5; + */ + public static final int IMMUTABLE_VALUE = 5; + /** + * + * + *
+   * Denotes that a (repeated) field is an unordered list.
+   * This indicates that the service may provide the elements of the list
+   * in any arbitrary  order, rather than the order the user originally
+   * provided. Additionally, the list's order may or may not be stable.
+   * 
+ * + * UNORDERED_LIST = 6; + */ + public static final int UNORDERED_LIST_VALUE = 6; + /** + * + * + *
+   * Denotes that this field returns a non-empty default value if not set.
+   * This indicates that if the user provides the empty value in a request,
+   * a non-empty value will be returned. The user will not be aware of what
+   * non-empty value to expect.
+   * 
+ * + * NON_EMPTY_DEFAULT = 7; + */ + public static final int NON_EMPTY_DEFAULT_VALUE = 7; + /** + * + * + *
+   * Denotes that the field in a resource (a message annotated with
+   * google.api.resource) is used in the resource name to uniquely identify the
+   * resource. For AIP-compliant APIs, this should only be applied to the
+   * `name` field on the resource.
+   *
+   * This behavior should not be applied to references to other resources within
+   * the message.
+   *
+   * The identifier field of resources often have different field behavior
+   * depending on the request it is embedded in (e.g. for Create methods name
+   * is optional and unused, while for Update methods it is required). Instead
+   * of method-specific annotations, only `IDENTIFIER` is required.
+   * 
+ * + * IDENTIFIER = 8; + */ + public static final int IDENTIFIER_VALUE = 8; + + 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 FieldBehavior 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 FieldBehavior forNumber(int value) { + switch (value) { + case 0: + return FIELD_BEHAVIOR_UNSPECIFIED; + case 1: + return OPTIONAL; + case 2: + return REQUIRED; + case 3: + return OUTPUT_ONLY; + case 4: + return INPUT_ONLY; + case 5: + return IMMUTABLE; + case 6: + return UNORDERED_LIST; + case 7: + return NON_EMPTY_DEFAULT; + case 8: + return IDENTIFIER; + 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 FieldBehavior findValueByNumber(int number) { + return FieldBehavior.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.api.FieldBehaviorProto.getDescriptor().getEnumTypes().get(0); + } + + private static final FieldBehavior[] VALUES = values(); + + public static FieldBehavior 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 FieldBehavior(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.FieldBehavior) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldBehaviorProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldBehaviorProto.java new file mode 100644 index 000000000000..2947e3bf177c --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldBehaviorProto.java @@ -0,0 +1,92 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/field_behavior.proto + +package com.google.api; + +public final class FieldBehaviorProto { + private FieldBehaviorProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static final int FIELD_BEHAVIOR_FIELD_NUMBER = 1052; + /** + * + * + *
+   * A designation of a specific field behavior (required, output only, etc.)
+   * in protobuf messages.
+   *
+   * Examples:
+   *
+   *   string name = 1 [(google.api.field_behavior) = REQUIRED];
+   *   State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+   *   google.protobuf.Duration ttl = 1
+   *     [(google.api.field_behavior) = INPUT_ONLY];
+   *   google.protobuf.Timestamp expire_time = 1
+   *     [(google.api.field_behavior) = OUTPUT_ONLY,
+   *      (google.api.field_behavior) = IMMUTABLE];
+   * 
+ * + * extend .google.protobuf.FieldOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.util.List> + fieldBehavior = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + com.google.api.FieldBehavior.class, null); + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\037google/api/field_behavior.proto\022\ngoogl" + + "e.api\032 google/protobuf/descriptor.proto*" + + "\266\001\n\rFieldBehavior\022\036\n\032FIELD_BEHAVIOR_UNSP" + + "ECIFIED\020\000\022\014\n\010OPTIONAL\020\001\022\014\n\010REQUIRED\020\002\022\017\n" + + "\013OUTPUT_ONLY\020\003\022\016\n\nINPUT_ONLY\020\004\022\r\n\tIMMUTA" + + "BLE\020\005\022\022\n\016UNORDERED_LIST\020\006\022\025\n\021NON_EMPTY_D" + + "EFAULT\020\007\022\016\n\nIDENTIFIER\020\010:Q\n\016field_behavi" + + "or\022\035.google.protobuf.FieldOptions\030\234\010 \003(\016" + + "2\031.google.api.FieldBehaviorBp\n\016com.googl" + + "e.apiB\022FieldBehaviorProtoP\001ZAgoogle.gola" + + "ng.org/genproto/googleapis/api/annotatio" + + "ns;annotations\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.DescriptorProtos.getDescriptor(), + }); + fieldBehavior.internalInit(descriptor.getExtensions().get(0)); + com.google.protobuf.DescriptorProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldPolicy.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldPolicy.java new file mode 100644 index 000000000000..6fb6a38a07d2 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldPolicy.java @@ -0,0 +1,1075 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/policy.proto + +package com.google.api; + +/** + * + * + *
+ * Google API Policy Annotation
+ *
+ * This message defines a simple API policy annotation that can be used to
+ * annotate API request and response message fields with applicable policies.
+ * One field may have multiple applicable policies that must all be satisfied
+ * before a request can be processed. This policy annotation is used to
+ * generate the overall policy that will be used for automatic runtime
+ * policy enforcement and documentation generation.
+ * 
+ * + * Protobuf type {@code google.api.FieldPolicy} + */ +public final class FieldPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.FieldPolicy) + FieldPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use FieldPolicy.newBuilder() to construct. + private FieldPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FieldPolicy() { + selector_ = ""; + resourcePermission_ = ""; + resourceType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FieldPolicy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.PolicyProto.internal_static_google_api_FieldPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.PolicyProto.internal_static_google_api_FieldPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.FieldPolicy.class, com.google.api.FieldPolicy.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object selector_ = ""; + /** + * + * + *
+   * Selects one or more request or response message fields to apply this
+   * `FieldPolicy`.
+   *
+   * When a `FieldPolicy` is used in proto annotation, the selector must
+   * be left as empty. The service config generator will automatically fill
+   * the correct value.
+   *
+   * When a `FieldPolicy` is used in service config, the selector must be a
+   * comma-separated string with valid request or response field paths,
+   * such as "foo.bar" or "foo.bar,foo.baz".
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + @java.lang.Override + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * + * + *
+   * Selects one or more request or response message fields to apply this
+   * `FieldPolicy`.
+   *
+   * When a `FieldPolicy` is used in proto annotation, the selector must
+   * be left as empty. The service config generator will automatically fill
+   * the correct value.
+   *
+   * When a `FieldPolicy` is used in service config, the selector must be a
+   * comma-separated string with valid request or response field paths,
+   * such as "foo.bar" or "foo.bar,foo.baz".
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_PERMISSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourcePermission_ = ""; + /** + * + * + *
+   * Specifies the required permission(s) for the resource referred to by the
+   * field. It requires the field contains a valid resource reference, and
+   * the request must pass the permission checks to proceed. For example,
+   * "resourcemanager.projects.get".
+   * 
+ * + * string resource_permission = 2; + * + * @return The resourcePermission. + */ + @java.lang.Override + public java.lang.String getResourcePermission() { + java.lang.Object ref = resourcePermission_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourcePermission_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies the required permission(s) for the resource referred to by the
+   * field. It requires the field contains a valid resource reference, and
+   * the request must pass the permission checks to proceed. For example,
+   * "resourcemanager.projects.get".
+   * 
+ * + * string resource_permission = 2; + * + * @return The bytes for resourcePermission. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourcePermissionBytes() { + java.lang.Object ref = resourcePermission_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourcePermission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + /** + * + * + *
+   * Specifies the resource type for the resource referred to by the field.
+   * 
+ * + * string resource_type = 3; + * + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies the resource type for the resource referred to by the field.
+   * 
+ * + * string resource_type = 3; + * + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = 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(selector_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourcePermission_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourcePermission_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceType_); + } + 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(selector_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourcePermission_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourcePermission_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resourceType_); + } + 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.api.FieldPolicy)) { + return super.equals(obj); + } + com.google.api.FieldPolicy other = (com.google.api.FieldPolicy) obj; + + if (!getSelector().equals(other.getSelector())) return false; + if (!getResourcePermission().equals(other.getResourcePermission())) return false; + if (!getResourceType().equals(other.getResourceType())) 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) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + hash = (37 * hash) + RESOURCE_PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getResourcePermission().hashCode(); + hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.FieldPolicy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.FieldPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.FieldPolicy parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.FieldPolicy 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.api.FieldPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.FieldPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.FieldPolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.FieldPolicy 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.api.FieldPolicy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.FieldPolicy 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.api.FieldPolicy parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.FieldPolicy 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.api.FieldPolicy 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; + } + /** + * + * + *
+   * Google API Policy Annotation
+   *
+   * This message defines a simple API policy annotation that can be used to
+   * annotate API request and response message fields with applicable policies.
+   * One field may have multiple applicable policies that must all be satisfied
+   * before a request can be processed. This policy annotation is used to
+   * generate the overall policy that will be used for automatic runtime
+   * policy enforcement and documentation generation.
+   * 
+ * + * Protobuf type {@code google.api.FieldPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.FieldPolicy) + com.google.api.FieldPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.PolicyProto.internal_static_google_api_FieldPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.PolicyProto.internal_static_google_api_FieldPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.FieldPolicy.class, com.google.api.FieldPolicy.Builder.class); + } + + // Construct using com.google.api.FieldPolicy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selector_ = ""; + resourcePermission_ = ""; + resourceType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.PolicyProto.internal_static_google_api_FieldPolicy_descriptor; + } + + @java.lang.Override + public com.google.api.FieldPolicy getDefaultInstanceForType() { + return com.google.api.FieldPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.FieldPolicy build() { + com.google.api.FieldPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.FieldPolicy buildPartial() { + com.google.api.FieldPolicy result = new com.google.api.FieldPolicy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.FieldPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selector_ = selector_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourcePermission_ = resourcePermission_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.resourceType_ = resourceType_; + } + } + + @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.api.FieldPolicy) { + return mergeFrom((com.google.api.FieldPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.FieldPolicy other) { + if (other == com.google.api.FieldPolicy.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourcePermission().isEmpty()) { + resourcePermission_ = other.resourcePermission_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + 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: + { + selector_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + resourcePermission_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * + * + *
+     * Selects one or more request or response message fields to apply this
+     * `FieldPolicy`.
+     *
+     * When a `FieldPolicy` is used in proto annotation, the selector must
+     * be left as empty. The service config generator will automatically fill
+     * the correct value.
+     *
+     * When a `FieldPolicy` is used in service config, the selector must be a
+     * comma-separated string with valid request or response field paths,
+     * such as "foo.bar" or "foo.bar,foo.baz".
+     * 
+ * + * string selector = 1; + * + * @return The selector. + */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Selects one or more request or response message fields to apply this
+     * `FieldPolicy`.
+     *
+     * When a `FieldPolicy` is used in proto annotation, the selector must
+     * be left as empty. The service config generator will automatically fill
+     * the correct value.
+     *
+     * When a `FieldPolicy` is used in service config, the selector must be a
+     * comma-separated string with valid request or response field paths,
+     * such as "foo.bar" or "foo.bar,foo.baz".
+     * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Selects one or more request or response message fields to apply this
+     * `FieldPolicy`.
+     *
+     * When a `FieldPolicy` is used in proto annotation, the selector must
+     * be left as empty. The service config generator will automatically fill
+     * the correct value.
+     *
+     * When a `FieldPolicy` is used in service config, the selector must be a
+     * comma-separated string with valid request or response field paths,
+     * such as "foo.bar" or "foo.bar,foo.baz".
+     * 
+ * + * string selector = 1; + * + * @param value The selector to set. + * @return This builder for chaining. + */ + public Builder setSelector(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Selects one or more request or response message fields to apply this
+     * `FieldPolicy`.
+     *
+     * When a `FieldPolicy` is used in proto annotation, the selector must
+     * be left as empty. The service config generator will automatically fill
+     * the correct value.
+     *
+     * When a `FieldPolicy` is used in service config, the selector must be a
+     * comma-separated string with valid request or response field paths,
+     * such as "foo.bar" or "foo.bar,foo.baz".
+     * 
+ * + * string selector = 1; + * + * @return This builder for chaining. + */ + public Builder clearSelector() { + selector_ = getDefaultInstance().getSelector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Selects one or more request or response message fields to apply this
+     * `FieldPolicy`.
+     *
+     * When a `FieldPolicy` is used in proto annotation, the selector must
+     * be left as empty. The service config generator will automatically fill
+     * the correct value.
+     *
+     * When a `FieldPolicy` is used in service config, the selector must be a
+     * comma-separated string with valid request or response field paths,
+     * such as "foo.bar" or "foo.bar,foo.baz".
+     * 
+ * + * string selector = 1; + * + * @param value The bytes for selector to set. + * @return This builder for chaining. + */ + public Builder setSelectorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object resourcePermission_ = ""; + /** + * + * + *
+     * Specifies the required permission(s) for the resource referred to by the
+     * field. It requires the field contains a valid resource reference, and
+     * the request must pass the permission checks to proceed. For example,
+     * "resourcemanager.projects.get".
+     * 
+ * + * string resource_permission = 2; + * + * @return The resourcePermission. + */ + public java.lang.String getResourcePermission() { + java.lang.Object ref = resourcePermission_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourcePermission_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies the required permission(s) for the resource referred to by the
+     * field. It requires the field contains a valid resource reference, and
+     * the request must pass the permission checks to proceed. For example,
+     * "resourcemanager.projects.get".
+     * 
+ * + * string resource_permission = 2; + * + * @return The bytes for resourcePermission. + */ + public com.google.protobuf.ByteString getResourcePermissionBytes() { + java.lang.Object ref = resourcePermission_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourcePermission_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies the required permission(s) for the resource referred to by the
+     * field. It requires the field contains a valid resource reference, and
+     * the request must pass the permission checks to proceed. For example,
+     * "resourcemanager.projects.get".
+     * 
+ * + * string resource_permission = 2; + * + * @param value The resourcePermission to set. + * @return This builder for chaining. + */ + public Builder setResourcePermission(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourcePermission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the required permission(s) for the resource referred to by the
+     * field. It requires the field contains a valid resource reference, and
+     * the request must pass the permission checks to proceed. For example,
+     * "resourcemanager.projects.get".
+     * 
+ * + * string resource_permission = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourcePermission() { + resourcePermission_ = getDefaultInstance().getResourcePermission(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the required permission(s) for the resource referred to by the
+     * field. It requires the field contains a valid resource reference, and
+     * the request must pass the permission checks to proceed. For example,
+     * "resourcemanager.projects.get".
+     * 
+ * + * string resource_permission = 2; + * + * @param value The bytes for resourcePermission to set. + * @return This builder for chaining. + */ + public Builder setResourcePermissionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourcePermission_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object resourceType_ = ""; + /** + * + * + *
+     * Specifies the resource type for the resource referred to by the field.
+     * 
+ * + * string resource_type = 3; + * + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies the resource type for the resource referred to by the field.
+     * 
+ * + * string resource_type = 3; + * + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies the resource type for the resource referred to by the field.
+     * 
+ * + * string resource_type = 3; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the resource type for the resource referred to by the field.
+     * 
+ * + * string resource_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the resource type for the resource referred to by the field.
+     * 
+ * + * string resource_type = 3; + * + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceType_ = 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.api.FieldPolicy) + } + + // @@protoc_insertion_point(class_scope:google.api.FieldPolicy) + private static final com.google.api.FieldPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.FieldPolicy(); + } + + public static com.google.api.FieldPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FieldPolicy 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.api.FieldPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldPolicyOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldPolicyOrBuilder.java new file mode 100644 index 000000000000..99971ce6c378 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/FieldPolicyOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/policy.proto + +package com.google.api; + +public interface FieldPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.FieldPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Selects one or more request or response message fields to apply this
+   * `FieldPolicy`.
+   *
+   * When a `FieldPolicy` is used in proto annotation, the selector must
+   * be left as empty. The service config generator will automatically fill
+   * the correct value.
+   *
+   * When a `FieldPolicy` is used in service config, the selector must be a
+   * comma-separated string with valid request or response field paths,
+   * such as "foo.bar" or "foo.bar,foo.baz".
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + java.lang.String getSelector(); + /** + * + * + *
+   * Selects one or more request or response message fields to apply this
+   * `FieldPolicy`.
+   *
+   * When a `FieldPolicy` is used in proto annotation, the selector must
+   * be left as empty. The service config generator will automatically fill
+   * the correct value.
+   *
+   * When a `FieldPolicy` is used in service config, the selector must be a
+   * comma-separated string with valid request or response field paths,
+   * such as "foo.bar" or "foo.bar,foo.baz".
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + com.google.protobuf.ByteString getSelectorBytes(); + + /** + * + * + *
+   * Specifies the required permission(s) for the resource referred to by the
+   * field. It requires the field contains a valid resource reference, and
+   * the request must pass the permission checks to proceed. For example,
+   * "resourcemanager.projects.get".
+   * 
+ * + * string resource_permission = 2; + * + * @return The resourcePermission. + */ + java.lang.String getResourcePermission(); + /** + * + * + *
+   * Specifies the required permission(s) for the resource referred to by the
+   * field. It requires the field contains a valid resource reference, and
+   * the request must pass the permission checks to proceed. For example,
+   * "resourcemanager.projects.get".
+   * 
+ * + * string resource_permission = 2; + * + * @return The bytes for resourcePermission. + */ + com.google.protobuf.ByteString getResourcePermissionBytes(); + + /** + * + * + *
+   * Specifies the resource type for the resource referred to by the field.
+   * 
+ * + * string resource_type = 3; + * + * @return The resourceType. + */ + java.lang.String getResourceType(); + /** + * + * + *
+   * Specifies the resource type for the resource referred to by the field.
+   * 
+ * + * string resource_type = 3; + * + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString getResourceTypeBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/GoSettings.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/GoSettings.java new file mode 100644 index 000000000000..6f73eac4320d --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/GoSettings.java @@ -0,0 +1,690 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * Settings for Go client libraries.
+ * 
+ * + * Protobuf type {@code google.api.GoSettings} + */ +public final class GoSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.GoSettings) + GoSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GoSettings.newBuilder() to construct. + private GoSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GoSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GoSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_GoSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_GoSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.GoSettings.class, com.google.api.GoSettings.Builder.class); + } + + public static final int COMMON_FIELD_NUMBER = 1; + private com.google.api.CommonLanguageSettings common_; + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + @java.lang.Override + public com.google.api.CommonLanguageSettings getCommon() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + @java.lang.Override + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + + 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 (common_ != null) { + output.writeMessage(1, getCommon()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommon()); + } + 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.api.GoSettings)) { + return super.equals(obj); + } + com.google.api.GoSettings other = (com.google.api.GoSettings) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon().equals(other.getCommon())) 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 (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.GoSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.GoSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.GoSettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.GoSettings 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.api.GoSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.GoSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.GoSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.GoSettings 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.api.GoSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.GoSettings 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.api.GoSettings parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.GoSettings 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.api.GoSettings 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; + } + /** + * + * + *
+   * Settings for Go client libraries.
+   * 
+ * + * Protobuf type {@code google.api.GoSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.GoSettings) + com.google.api.GoSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_GoSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_GoSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.GoSettings.class, com.google.api.GoSettings.Builder.class); + } + + // Construct using com.google.api.GoSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto.internal_static_google_api_GoSettings_descriptor; + } + + @java.lang.Override + public com.google.api.GoSettings getDefaultInstanceForType() { + return com.google.api.GoSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.GoSettings build() { + com.google.api.GoSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.GoSettings buildPartial() { + com.google.api.GoSettings result = new com.google.api.GoSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.GoSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null ? common_ : commonBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.GoSettings) { + return mergeFrom((com.google.api.GoSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.GoSettings other) { + if (other == com.google.api.GoSettings.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + 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(getCommonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.api.CommonLanguageSettings common_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + commonBuilder_; + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + public com.google.api.CommonLanguageSettings getCommon() { + if (commonBuilder_ == null) { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder mergeCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && common_ != null + && common_ != com.google.api.CommonLanguageSettings.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettings.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder>( + getCommon(), getParentForChildren(), isClean()); + common_ = null; + } + return commonBuilder_; + } + + @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.api.GoSettings) + } + + // @@protoc_insertion_point(class_scope:google.api.GoSettings) + private static final com.google.api.GoSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.GoSettings(); + } + + public static com.google.api.GoSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoSettings 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.api.GoSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/GoSettingsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/GoSettingsOrBuilder.java new file mode 100644 index 000000000000..712e58951363 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/GoSettingsOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface GoSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.GoSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + com.google.api.CommonLanguageSettings getCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Http.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Http.java new file mode 100644 index 000000000000..eeaeca7c30cf --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Http.java @@ -0,0 +1,1078 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * + * + *
+ * Defines the HTTP configuration for an API service. It contains a list of
+ * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+ * to one or more HTTP REST API methods.
+ * 
+ * + * Protobuf type {@code google.api.Http} + */ +public final class Http extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Http) + HttpOrBuilder { + private static final long serialVersionUID = 0L; + // Use Http.newBuilder() to construct. + private Http(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Http() { + rules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Http(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Http.class, com.google.api.Http.Builder.class); + } + + public static final int RULES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List rules_; + /** + * + * + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + /** + * + * + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + @java.lang.Override + public java.util.List getRulesOrBuilderList() { + return rules_; + } + /** + * + * + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + /** + * + * + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + @java.lang.Override + public com.google.api.HttpRule getRules(int index) { + return rules_.get(index); + } + /** + * + * + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + @java.lang.Override + public com.google.api.HttpRuleOrBuilder getRulesOrBuilder(int index) { + return rules_.get(index); + } + + public static final int FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER = 2; + private boolean fullyDecodeReservedExpansion_ = false; + /** + * + * + *
+   * When set to true, URL path parameters will be fully URI-decoded except in
+   * cases of single segment matches in reserved expansion, where "%2F" will be
+   * left encoded.
+   *
+   * The default behavior is to not decode RFC 6570 reserved characters in multi
+   * segment matches.
+   * 
+ * + * bool fully_decode_reserved_expansion = 2; + * + * @return The fullyDecodeReservedExpansion. + */ + @java.lang.Override + public boolean getFullyDecodeReservedExpansion() { + return fullyDecodeReservedExpansion_; + } + + 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 < rules_.size(); i++) { + output.writeMessage(1, rules_.get(i)); + } + if (fullyDecodeReservedExpansion_ != false) { + output.writeBool(2, fullyDecodeReservedExpansion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rules_.get(i)); + } + if (fullyDecodeReservedExpansion_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, fullyDecodeReservedExpansion_); + } + 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.api.Http)) { + return super.equals(obj); + } + com.google.api.Http other = (com.google.api.Http) obj; + + if (!getRulesList().equals(other.getRulesList())) return false; + if (getFullyDecodeReservedExpansion() != other.getFullyDecodeReservedExpansion()) 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 (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (37 * hash) + FULLY_DECODE_RESERVED_EXPANSION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullyDecodeReservedExpansion()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Http parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Http parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Http parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Http 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.api.Http parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Http parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Http parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Http 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.api.Http parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Http 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.api.Http parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Http 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.api.Http 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; + } + /** + * + * + *
+   * Defines the HTTP configuration for an API service. It contains a list of
+   * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+   * to one or more HTTP REST API methods.
+   * 
+ * + * Protobuf type {@code google.api.Http} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Http) + com.google.api.HttpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Http.class, com.google.api.Http.Builder.class); + } + + // Construct using com.google.api.Http.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + fullyDecodeReservedExpansion_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; + } + + @java.lang.Override + public com.google.api.Http getDefaultInstanceForType() { + return com.google.api.Http.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Http build() { + com.google.api.Http result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Http buildPartial() { + com.google.api.Http result = new com.google.api.Http(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Http result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Http result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fullyDecodeReservedExpansion_ = fullyDecodeReservedExpansion_; + } + } + + @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.api.Http) { + return mergeFrom((com.google.api.Http) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Http other) { + if (other == com.google.api.Http.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + if (other.getFullyDecodeReservedExpansion() != false) { + setFullyDecodeReservedExpansion(other.getFullyDecodeReservedExpansion()); + } + 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.api.HttpRule m = + input.readMessage(com.google.api.HttpRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + fullyDecodeReservedExpansion_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List rules_ = java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.HttpRule, + com.google.api.HttpRule.Builder, + com.google.api.HttpRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public com.google.api.HttpRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public Builder setRules(int index, com.google.api.HttpRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public Builder setRules(int index, com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public Builder addRules(com.google.api.HttpRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public Builder addRules(int index, com.google.api.HttpRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public Builder addRules(com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public Builder addRules(int index, com.google.api.HttpRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public Builder addAllRules(java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public com.google.api.HttpRule.Builder getRulesBuilder(int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public com.google.api.HttpRuleOrBuilder getRulesOrBuilder(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public java.util.List getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public com.google.api.HttpRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder(com.google.api.HttpRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public com.google.api.HttpRule.Builder addRulesBuilder(int index) { + return getRulesFieldBuilder().addBuilder(index, com.google.api.HttpRule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of HTTP configuration rules that apply to individual API methods.
+     *
+     * **NOTE:** All service configuration rules follow "last one wins" order.
+     * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + public java.util.List getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.HttpRule, + com.google.api.HttpRule.Builder, + com.google.api.HttpRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.HttpRule, + com.google.api.HttpRule.Builder, + com.google.api.HttpRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + private boolean fullyDecodeReservedExpansion_; + /** + * + * + *
+     * When set to true, URL path parameters will be fully URI-decoded except in
+     * cases of single segment matches in reserved expansion, where "%2F" will be
+     * left encoded.
+     *
+     * The default behavior is to not decode RFC 6570 reserved characters in multi
+     * segment matches.
+     * 
+ * + * bool fully_decode_reserved_expansion = 2; + * + * @return The fullyDecodeReservedExpansion. + */ + @java.lang.Override + public boolean getFullyDecodeReservedExpansion() { + return fullyDecodeReservedExpansion_; + } + /** + * + * + *
+     * When set to true, URL path parameters will be fully URI-decoded except in
+     * cases of single segment matches in reserved expansion, where "%2F" will be
+     * left encoded.
+     *
+     * The default behavior is to not decode RFC 6570 reserved characters in multi
+     * segment matches.
+     * 
+ * + * bool fully_decode_reserved_expansion = 2; + * + * @param value The fullyDecodeReservedExpansion to set. + * @return This builder for chaining. + */ + public Builder setFullyDecodeReservedExpansion(boolean value) { + + fullyDecodeReservedExpansion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * When set to true, URL path parameters will be fully URI-decoded except in
+     * cases of single segment matches in reserved expansion, where "%2F" will be
+     * left encoded.
+     *
+     * The default behavior is to not decode RFC 6570 reserved characters in multi
+     * segment matches.
+     * 
+ * + * bool fully_decode_reserved_expansion = 2; + * + * @return This builder for chaining. + */ + public Builder clearFullyDecodeReservedExpansion() { + bitField0_ = (bitField0_ & ~0x00000002); + fullyDecodeReservedExpansion_ = 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.api.Http) + } + + // @@protoc_insertion_point(class_scope:google.api.Http) + private static final com.google.api.Http DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Http(); + } + + public static com.google.api.Http getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Http 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.api.Http getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpBody.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpBody.java new file mode 100644 index 000000000000..127cd37423b3 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpBody.java @@ -0,0 +1,1299 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/httpbody.proto + +package com.google.api; + +/** + * + * + *
+ * Message that represents an arbitrary HTTP body. It should only be used for
+ * payload formats that can't be represented as JSON, such as raw binary or
+ * an HTML page.
+ *
+ *
+ * This message can be used both in streaming and non-streaming API methods in
+ * the request as well as the response.
+ *
+ * It can be used as a top-level request field, which is convenient if one
+ * wants to extract parameters from either the URL or HTTP template into the
+ * request fields and also want access to the raw HTTP body.
+ *
+ * Example:
+ *
+ *     message GetResourceRequest {
+ *       // A unique request id.
+ *       string request_id = 1;
+ *
+ *       // The raw HTTP body is bound to this field.
+ *       google.api.HttpBody http_body = 2;
+ *
+ *     }
+ *
+ *     service ResourceService {
+ *       rpc GetResource(GetResourceRequest)
+ *         returns (google.api.HttpBody);
+ *       rpc UpdateResource(google.api.HttpBody)
+ *         returns (google.protobuf.Empty);
+ *
+ *     }
+ *
+ * Example with streaming methods:
+ *
+ *     service CaldavService {
+ *       rpc GetCalendar(stream google.api.HttpBody)
+ *         returns (stream google.api.HttpBody);
+ *       rpc UpdateCalendar(stream google.api.HttpBody)
+ *         returns (stream google.api.HttpBody);
+ *
+ *     }
+ *
+ * Use of this type only changes how the request and response bodies are
+ * handled, all other features will continue to work unchanged.
+ * 
+ * + * Protobuf type {@code google.api.HttpBody} + */ +public final class HttpBody extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.HttpBody) + HttpBodyOrBuilder { + private static final long serialVersionUID = 0L; + // Use HttpBody.newBuilder() to construct. + private HttpBody(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HttpBody() { + contentType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + extensions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HttpBody(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.HttpBodyProto.internal_static_google_api_HttpBody_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpBodyProto.internal_static_google_api_HttpBody_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.HttpBody.class, com.google.api.HttpBody.Builder.class); + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object contentType_ = ""; + /** + * + * + *
+   * The HTTP Content-Type header value specifying the content type of the body.
+   * 
+ * + * string content_type = 1; + * + * @return The contentType. + */ + @java.lang.Override + public java.lang.String getContentType() { + java.lang.Object ref = contentType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentType_ = s; + return s; + } + } + /** + * + * + *
+   * The HTTP Content-Type header value specifying the content type of the body.
+   * 
+ * + * string content_type = 1; + * + * @return The bytes for contentType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentTypeBytes() { + java.lang.Object ref = contentType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contentType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * The HTTP request/response body as raw binary.
+   * 
+ * + * bytes data = 2; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int EXTENSIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List extensions_; + /** + * + * + *
+   * Application specific response metadata. Must be set in the first response
+   * for streaming APIs.
+   * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + @java.lang.Override + public java.util.List getExtensionsList() { + return extensions_; + } + /** + * + * + *
+   * Application specific response metadata. Must be set in the first response
+   * for streaming APIs.
+   * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + @java.lang.Override + public java.util.List getExtensionsOrBuilderList() { + return extensions_; + } + /** + * + * + *
+   * Application specific response metadata. Must be set in the first response
+   * for streaming APIs.
+   * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + @java.lang.Override + public int getExtensionsCount() { + return extensions_.size(); + } + /** + * + * + *
+   * Application specific response metadata. Must be set in the first response
+   * for streaming APIs.
+   * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + @java.lang.Override + public com.google.protobuf.Any getExtensions(int index) { + return extensions_.get(index); + } + /** + * + * + *
+   * Application specific response metadata. Must be set in the first response
+   * for streaming APIs.
+   * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getExtensionsOrBuilder(int index) { + return extensions_.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(contentType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contentType_); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + for (int i = 0; i < extensions_.size(); i++) { + output.writeMessage(3, extensions_.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(contentType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, contentType_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, data_); + } + for (int i = 0; i < extensions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, extensions_.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.api.HttpBody)) { + return super.equals(obj); + } + com.google.api.HttpBody other = (com.google.api.HttpBody) obj; + + if (!getContentType().equals(other.getContentType())) return false; + if (!getData().equals(other.getData())) return false; + if (!getExtensionsList().equals(other.getExtensionsList())) 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) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getContentType().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + if (getExtensionsCount() > 0) { + hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getExtensionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.HttpBody parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.HttpBody parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.HttpBody parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.HttpBody 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.api.HttpBody parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.HttpBody parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.HttpBody parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.HttpBody 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.api.HttpBody parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.HttpBody 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.api.HttpBody parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.HttpBody 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.api.HttpBody prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message that represents an arbitrary HTTP body. It should only be used for
+   * payload formats that can't be represented as JSON, such as raw binary or
+   * an HTML page.
+   *
+   *
+   * This message can be used both in streaming and non-streaming API methods in
+   * the request as well as the response.
+   *
+   * It can be used as a top-level request field, which is convenient if one
+   * wants to extract parameters from either the URL or HTTP template into the
+   * request fields and also want access to the raw HTTP body.
+   *
+   * Example:
+   *
+   *     message GetResourceRequest {
+   *       // A unique request id.
+   *       string request_id = 1;
+   *
+   *       // The raw HTTP body is bound to this field.
+   *       google.api.HttpBody http_body = 2;
+   *
+   *     }
+   *
+   *     service ResourceService {
+   *       rpc GetResource(GetResourceRequest)
+   *         returns (google.api.HttpBody);
+   *       rpc UpdateResource(google.api.HttpBody)
+   *         returns (google.protobuf.Empty);
+   *
+   *     }
+   *
+   * Example with streaming methods:
+   *
+   *     service CaldavService {
+   *       rpc GetCalendar(stream google.api.HttpBody)
+   *         returns (stream google.api.HttpBody);
+   *       rpc UpdateCalendar(stream google.api.HttpBody)
+   *         returns (stream google.api.HttpBody);
+   *
+   *     }
+   *
+   * Use of this type only changes how the request and response bodies are
+   * handled, all other features will continue to work unchanged.
+   * 
+ * + * Protobuf type {@code google.api.HttpBody} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.HttpBody) + com.google.api.HttpBodyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.HttpBodyProto.internal_static_google_api_HttpBody_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpBodyProto.internal_static_google_api_HttpBody_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.HttpBody.class, com.google.api.HttpBody.Builder.class); + } + + // Construct using com.google.api.HttpBody.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + contentType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + if (extensionsBuilder_ == null) { + extensions_ = java.util.Collections.emptyList(); + } else { + extensions_ = null; + extensionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.HttpBodyProto.internal_static_google_api_HttpBody_descriptor; + } + + @java.lang.Override + public com.google.api.HttpBody getDefaultInstanceForType() { + return com.google.api.HttpBody.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.HttpBody build() { + com.google.api.HttpBody result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.HttpBody buildPartial() { + com.google.api.HttpBody result = new com.google.api.HttpBody(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.HttpBody result) { + if (extensionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + extensions_ = java.util.Collections.unmodifiableList(extensions_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.extensions_ = extensions_; + } else { + result.extensions_ = extensionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.HttpBody result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contentType_ = contentType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.data_ = data_; + } + } + + @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.api.HttpBody) { + return mergeFrom((com.google.api.HttpBody) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.HttpBody other) { + if (other == com.google.api.HttpBody.getDefaultInstance()) return this; + if (!other.getContentType().isEmpty()) { + contentType_ = other.contentType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + if (extensionsBuilder_ == null) { + if (!other.extensions_.isEmpty()) { + if (extensions_.isEmpty()) { + extensions_ = other.extensions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureExtensionsIsMutable(); + extensions_.addAll(other.extensions_); + } + onChanged(); + } + } else { + if (!other.extensions_.isEmpty()) { + if (extensionsBuilder_.isEmpty()) { + extensionsBuilder_.dispose(); + extensionsBuilder_ = null; + extensions_ = other.extensions_; + bitField0_ = (bitField0_ & ~0x00000004); + extensionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExtensionsFieldBuilder() + : null; + } else { + extensionsBuilder_.addAllMessages(other.extensions_); + } + } + } + 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: + { + contentType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + data_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.Any m = + input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (extensionsBuilder_ == null) { + ensureExtensionsIsMutable(); + extensions_.add(m); + } else { + extensionsBuilder_.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 contentType_ = ""; + /** + * + * + *
+     * The HTTP Content-Type header value specifying the content type of the body.
+     * 
+ * + * string content_type = 1; + * + * @return The contentType. + */ + public java.lang.String getContentType() { + java.lang.Object ref = contentType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The HTTP Content-Type header value specifying the content type of the body.
+     * 
+ * + * string content_type = 1; + * + * @return The bytes for contentType. + */ + public com.google.protobuf.ByteString getContentTypeBytes() { + java.lang.Object ref = contentType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contentType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The HTTP Content-Type header value specifying the content type of the body.
+     * 
+ * + * string content_type = 1; + * + * @param value The contentType to set. + * @return This builder for chaining. + */ + public Builder setContentType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + contentType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP Content-Type header value specifying the content type of the body.
+     * 
+ * + * string content_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearContentType() { + contentType_ = getDefaultInstance().getContentType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP Content-Type header value specifying the content type of the body.
+     * 
+ * + * string content_type = 1; + * + * @param value The bytes for contentType to set. + * @return This builder for chaining. + */ + public Builder setContentTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + contentType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * The HTTP request/response body as raw binary.
+     * 
+ * + * bytes data = 2; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + * + * + *
+     * The HTTP request/response body as raw binary.
+     * 
+ * + * bytes data = 2; + * + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP request/response body as raw binary.
+     * 
+ * + * bytes data = 2; + * + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000002); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private java.util.List extensions_ = java.util.Collections.emptyList(); + + private void ensureExtensionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + extensions_ = new java.util.ArrayList(extensions_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + extensionsBuilder_; + + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public java.util.List getExtensionsList() { + if (extensionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(extensions_); + } else { + return extensionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public int getExtensionsCount() { + if (extensionsBuilder_ == null) { + return extensions_.size(); + } else { + return extensionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public com.google.protobuf.Any getExtensions(int index) { + if (extensionsBuilder_ == null) { + return extensions_.get(index); + } else { + return extensionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public Builder setExtensions(int index, com.google.protobuf.Any value) { + if (extensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtensionsIsMutable(); + extensions_.set(index, value); + onChanged(); + } else { + extensionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public Builder setExtensions(int index, com.google.protobuf.Any.Builder builderForValue) { + if (extensionsBuilder_ == null) { + ensureExtensionsIsMutable(); + extensions_.set(index, builderForValue.build()); + onChanged(); + } else { + extensionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public Builder addExtensions(com.google.protobuf.Any value) { + if (extensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtensionsIsMutable(); + extensions_.add(value); + onChanged(); + } else { + extensionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public Builder addExtensions(int index, com.google.protobuf.Any value) { + if (extensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtensionsIsMutable(); + extensions_.add(index, value); + onChanged(); + } else { + extensionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public Builder addExtensions(com.google.protobuf.Any.Builder builderForValue) { + if (extensionsBuilder_ == null) { + ensureExtensionsIsMutable(); + extensions_.add(builderForValue.build()); + onChanged(); + } else { + extensionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public Builder addExtensions(int index, com.google.protobuf.Any.Builder builderForValue) { + if (extensionsBuilder_ == null) { + ensureExtensionsIsMutable(); + extensions_.add(index, builderForValue.build()); + onChanged(); + } else { + extensionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public Builder addAllExtensions(java.lang.Iterable values) { + if (extensionsBuilder_ == null) { + ensureExtensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, extensions_); + onChanged(); + } else { + extensionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public Builder clearExtensions() { + if (extensionsBuilder_ == null) { + extensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + extensionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public Builder removeExtensions(int index) { + if (extensionsBuilder_ == null) { + ensureExtensionsIsMutable(); + extensions_.remove(index); + onChanged(); + } else { + extensionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public com.google.protobuf.Any.Builder getExtensionsBuilder(int index) { + return getExtensionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public com.google.protobuf.AnyOrBuilder getExtensionsOrBuilder(int index) { + if (extensionsBuilder_ == null) { + return extensions_.get(index); + } else { + return extensionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public java.util.List getExtensionsOrBuilderList() { + if (extensionsBuilder_ != null) { + return extensionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(extensions_); + } + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public com.google.protobuf.Any.Builder addExtensionsBuilder() { + return getExtensionsFieldBuilder().addBuilder(com.google.protobuf.Any.getDefaultInstance()); + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public com.google.protobuf.Any.Builder addExtensionsBuilder(int index) { + return getExtensionsFieldBuilder() + .addBuilder(index, com.google.protobuf.Any.getDefaultInstance()); + } + /** + * + * + *
+     * Application specific response metadata. Must be set in the first response
+     * for streaming APIs.
+     * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + public java.util.List getExtensionsBuilderList() { + return getExtensionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + getExtensionsFieldBuilder() { + if (extensionsBuilder_ == null) { + extensionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder>( + extensions_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + extensions_ = null; + } + return extensionsBuilder_; + } + + @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.api.HttpBody) + } + + // @@protoc_insertion_point(class_scope:google.api.HttpBody) + private static final com.google.api.HttpBody DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.HttpBody(); + } + + public static com.google.api.HttpBody getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HttpBody 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.api.HttpBody getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpBodyOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpBodyOrBuilder.java new file mode 100644 index 000000000000..037865f52b03 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpBodyOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/httpbody.proto + +package com.google.api; + +public interface HttpBodyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.HttpBody) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The HTTP Content-Type header value specifying the content type of the body.
+   * 
+ * + * string content_type = 1; + * + * @return The contentType. + */ + java.lang.String getContentType(); + /** + * + * + *
+   * The HTTP Content-Type header value specifying the content type of the body.
+   * 
+ * + * string content_type = 1; + * + * @return The bytes for contentType. + */ + com.google.protobuf.ByteString getContentTypeBytes(); + + /** + * + * + *
+   * The HTTP request/response body as raw binary.
+   * 
+ * + * bytes data = 2; + * + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + /** + * + * + *
+   * Application specific response metadata. Must be set in the first response
+   * for streaming APIs.
+   * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + java.util.List getExtensionsList(); + /** + * + * + *
+   * Application specific response metadata. Must be set in the first response
+   * for streaming APIs.
+   * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + com.google.protobuf.Any getExtensions(int index); + /** + * + * + *
+   * Application specific response metadata. Must be set in the first response
+   * for streaming APIs.
+   * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + int getExtensionsCount(); + /** + * + * + *
+   * Application specific response metadata. Must be set in the first response
+   * for streaming APIs.
+   * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + java.util.List getExtensionsOrBuilderList(); + /** + * + * + *
+   * Application specific response metadata. Must be set in the first response
+   * for streaming APIs.
+   * 
+ * + * repeated .google.protobuf.Any extensions = 3; + */ + com.google.protobuf.AnyOrBuilder getExtensionsOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpBodyProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpBodyProto.java new file mode 100644 index 000000000000..904ed3efcc11 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpBodyProto.java @@ -0,0 +1,68 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/httpbody.proto + +package com.google.api; + +public final class HttpBodyProto { + private HttpBodyProto() {} + + 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_api_HttpBody_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_HttpBody_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\031google/api/httpbody.proto\022\ngoogle.api\032" + + "\031google/protobuf/any.proto\"X\n\010HttpBody\022\024" + + "\n\014content_type\030\001 \001(\t\022\014\n\004data\030\002 \001(\014\022(\n\nex" + + "tensions\030\003 \003(\0132\024.google.protobuf.AnyBh\n\016" + + "com.google.apiB\rHttpBodyProtoP\001Z;google." + + "golang.org/genproto/googleapis/api/httpb" + + "ody;httpbody\370\001\001\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.AnyProto.getDescriptor(), + }); + internal_static_google_api_HttpBody_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_HttpBody_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_HttpBody_descriptor, + new java.lang.String[] { + "ContentType", "Data", "Extensions", + }); + com.google.protobuf.AnyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpOrBuilder.java new file mode 100644 index 000000000000..9169fe7be814 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface HttpOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Http) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + java.util.List getRulesList(); + /** + * + * + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + com.google.api.HttpRule getRules(int index); + /** + * + * + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + int getRulesCount(); + /** + * + * + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + java.util.List getRulesOrBuilderList(); + /** + * + * + *
+   * A list of HTTP configuration rules that apply to individual API methods.
+   *
+   * **NOTE:** All service configuration rules follow "last one wins" order.
+   * 
+ * + * repeated .google.api.HttpRule rules = 1; + */ + com.google.api.HttpRuleOrBuilder getRulesOrBuilder(int index); + + /** + * + * + *
+   * When set to true, URL path parameters will be fully URI-decoded except in
+   * cases of single segment matches in reserved expansion, where "%2F" will be
+   * left encoded.
+   *
+   * The default behavior is to not decode RFC 6570 reserved characters in multi
+   * segment matches.
+   * 
+ * + * bool fully_decode_reserved_expansion = 2; + * + * @return The fullyDecodeReservedExpansion. + */ + boolean getFullyDecodeReservedExpansion(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpProto.java new file mode 100644 index 000000000000..157b7d6a1887 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpProto.java @@ -0,0 +1,104 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public final class HttpProto { + private HttpProto() {} + + 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_api_Http_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Http_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_HttpRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_HttpRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_CustomHttpPattern_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_CustomHttpPattern_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\025google/api/http.proto\022\ngoogle.api\"T\n\004H" + + "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule" + + "\022\'\n\037fully_decode_reserved_expansion\030\002 \001(" + + "\010\"\201\002\n\010HttpRule\022\020\n\010selector\030\001 \001(\t\022\r\n\003get\030" + + "\002 \001(\tH\000\022\r\n\003put\030\003 \001(\tH\000\022\016\n\004post\030\004 \001(\tH\000\022\020" + + "\n\006delete\030\005 \001(\tH\000\022\017\n\005patch\030\006 \001(\tH\000\022/\n\006cus" + + "tom\030\010 \001(\0132\035.google.api.CustomHttpPattern" + + "H\000\022\014\n\004body\030\007 \001(\t\022\025\n\rresponse_body\030\014 \001(\t\022" + + "1\n\023additional_bindings\030\013 \003(\0132\024.google.ap" + + "i.HttpRuleB\t\n\007pattern\"/\n\021CustomHttpPatte" + + "rn\022\014\n\004kind\030\001 \001(\t\022\014\n\004path\030\002 \001(\tBj\n\016com.go" + + "ogle.apiB\tHttpProtoP\001ZAgoogle.golang.org" + + "/genproto/googleapis/api/annotations;ann" + + "otations\370\001\001\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_Http_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Http_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Http_descriptor, + new java.lang.String[] { + "Rules", "FullyDecodeReservedExpansion", + }); + internal_static_google_api_HttpRule_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_api_HttpRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_HttpRule_descriptor, + new java.lang.String[] { + "Selector", + "Get", + "Put", + "Post", + "Delete", + "Patch", + "Custom", + "Body", + "ResponseBody", + "AdditionalBindings", + "Pattern", + }); + internal_static_google_api_CustomHttpPattern_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_api_CustomHttpPattern_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_CustomHttpPattern_descriptor, + new java.lang.String[] { + "Kind", "Path", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpRule.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpRule.java new file mode 100644 index 000000000000..3c088fd527eb --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpRule.java @@ -0,0 +1,3737 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +/** + * + * + *
+ * # gRPC Transcoding
+ *
+ * gRPC Transcoding is a feature for mapping between a gRPC method and one or
+ * more HTTP REST endpoints. It allows developers to build a single API service
+ * that supports both gRPC APIs and REST APIs. Many systems, including [Google
+ * APIs](https://github.com/googleapis/googleapis),
+ * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
+ * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
+ * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
+ * and use it for large scale production services.
+ *
+ * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
+ * how different portions of the gRPC request message are mapped to the URL
+ * path, URL query parameters, and HTTP request body. It also controls how the
+ * gRPC response message is mapped to the HTTP response body. `HttpRule` is
+ * typically specified as an `google.api.http` annotation on the gRPC method.
+ *
+ * Each mapping specifies a URL path template and an HTTP method. The path
+ * template may refer to one or more fields in the gRPC request message, as long
+ * as each field is a non-repeated field with a primitive (non-message) type.
+ * The path template controls how fields of the request message are mapped to
+ * the URL path.
+ *
+ * Example:
+ *
+ *     service Messaging {
+ *       rpc GetMessage(GetMessageRequest) returns (Message) {
+ *         option (google.api.http) = {
+ *             get: "/v1/{name=messages/*}"
+ *         };
+ *       }
+ *     }
+ *     message GetMessageRequest {
+ *       string name = 1; // Mapped to URL path.
+ *     }
+ *     message Message {
+ *       string text = 1; // The resource content.
+ *     }
+ *
+ * This enables an HTTP REST to gRPC mapping as below:
+ *
+ * HTTP | gRPC
+ * -----|-----
+ * `GET /v1/messages/123456`  | `GetMessage(name: "messages/123456")`
+ *
+ * Any fields in the request message which are not bound by the path template
+ * automatically become HTTP query parameters if there is no HTTP request body.
+ * For example:
+ *
+ *     service Messaging {
+ *       rpc GetMessage(GetMessageRequest) returns (Message) {
+ *         option (google.api.http) = {
+ *             get:"/v1/messages/{message_id}"
+ *         };
+ *       }
+ *     }
+ *     message GetMessageRequest {
+ *       message SubMessage {
+ *         string subfield = 1;
+ *       }
+ *       string message_id = 1; // Mapped to URL path.
+ *       int64 revision = 2;    // Mapped to URL query parameter `revision`.
+ *       SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.
+ *     }
+ *
+ * This enables a HTTP JSON to RPC mapping as below:
+ *
+ * HTTP | gRPC
+ * -----|-----
+ * `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
+ * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
+ * "foo"))`
+ *
+ * Note that fields which are mapped to URL query parameters must have a
+ * primitive type or a repeated primitive type or a non-repeated message type.
+ * In the case of a repeated type, the parameter can be repeated in the URL
+ * as `...?param=A&param=B`. In the case of a message type, each field of the
+ * message is mapped to a separate parameter, such as
+ * `...?foo.a=A&foo.b=B&foo.c=C`.
+ *
+ * For HTTP methods that allow a request body, the `body` field
+ * specifies the mapping. Consider a REST update method on the
+ * message resource collection:
+ *
+ *     service Messaging {
+ *       rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+ *         option (google.api.http) = {
+ *           patch: "/v1/messages/{message_id}"
+ *           body: "message"
+ *         };
+ *       }
+ *     }
+ *     message UpdateMessageRequest {
+ *       string message_id = 1; // mapped to the URL
+ *       Message message = 2;   // mapped to the body
+ *     }
+ *
+ * The following HTTP JSON to RPC mapping is enabled, where the
+ * representation of the JSON in the request body is determined by
+ * protos JSON encoding:
+ *
+ * HTTP | gRPC
+ * -----|-----
+ * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
+ * "123456" message { text: "Hi!" })`
+ *
+ * The special name `*` can be used in the body mapping to define that
+ * every field not bound by the path template should be mapped to the
+ * request body.  This enables the following alternative definition of
+ * the update method:
+ *
+ *     service Messaging {
+ *       rpc UpdateMessage(Message) returns (Message) {
+ *         option (google.api.http) = {
+ *           patch: "/v1/messages/{message_id}"
+ *           body: "*"
+ *         };
+ *       }
+ *     }
+ *     message Message {
+ *       string message_id = 1;
+ *       string text = 2;
+ *     }
+ *
+ *
+ * The following HTTP JSON to RPC mapping is enabled:
+ *
+ * HTTP | gRPC
+ * -----|-----
+ * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
+ * "123456" text: "Hi!")`
+ *
+ * Note that when using `*` in the body mapping, it is not possible to
+ * have HTTP parameters, as all fields not bound by the path end in
+ * the body. This makes this option more rarely used in practice when
+ * defining REST APIs. The common usage of `*` is in custom methods
+ * which don't use the URL at all for transferring data.
+ *
+ * It is possible to define multiple HTTP methods for one RPC by using
+ * the `additional_bindings` option. Example:
+ *
+ *     service Messaging {
+ *       rpc GetMessage(GetMessageRequest) returns (Message) {
+ *         option (google.api.http) = {
+ *           get: "/v1/messages/{message_id}"
+ *           additional_bindings {
+ *             get: "/v1/users/{user_id}/messages/{message_id}"
+ *           }
+ *         };
+ *       }
+ *     }
+ *     message GetMessageRequest {
+ *       string message_id = 1;
+ *       string user_id = 2;
+ *     }
+ *
+ * This enables the following two alternative HTTP JSON to RPC mappings:
+ *
+ * HTTP | gRPC
+ * -----|-----
+ * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
+ * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
+ * "123456")`
+ *
+ * ## Rules for HTTP mapping
+ *
+ * 1. Leaf request fields (recursive expansion nested messages in the request
+ *    message) are classified into three categories:
+ *    - Fields referred by the path template. They are passed via the URL path.
+ *    - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
+ *    are passed via the HTTP
+ *      request body.
+ *    - All other fields are passed via the URL query parameters, and the
+ *      parameter name is the field path in the request message. A repeated
+ *      field can be represented as multiple query parameters under the same
+ *      name.
+ *  2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
+ *  query parameter, all fields
+ *     are passed via URL path and HTTP request body.
+ *  3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
+ *  request body, all
+ *     fields are passed via URL path and URL query parameters.
+ *
+ * ### Path template syntax
+ *
+ *     Template = "/" Segments [ Verb ] ;
+ *     Segments = Segment { "/" Segment } ;
+ *     Segment  = "*" | "**" | LITERAL | Variable ;
+ *     Variable = "{" FieldPath [ "=" Segments ] "}" ;
+ *     FieldPath = IDENT { "." IDENT } ;
+ *     Verb     = ":" LITERAL ;
+ *
+ * The syntax `*` matches a single URL path segment. The syntax `**` matches
+ * zero or more URL path segments, which must be the last part of the URL path
+ * except the `Verb`.
+ *
+ * The syntax `Variable` matches part of the URL path as specified by its
+ * template. A variable template must not contain other variables. If a variable
+ * matches a single path segment, its template may be omitted, e.g. `{var}`
+ * is equivalent to `{var=*}`.
+ *
+ * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
+ * contains any reserved character, such characters should be percent-encoded
+ * before the matching.
+ *
+ * If a variable contains exactly one path segment, such as `"{var}"` or
+ * `"{var=*}"`, when such a variable is expanded into a URL path on the client
+ * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
+ * server side does the reverse decoding. Such variables show up in the
+ * [Discovery
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
+ * `{var}`.
+ *
+ * If a variable contains multiple path segments, such as `"{var=foo/*}"`
+ * or `"{var=**}"`, when such a variable is expanded into a URL path on the
+ * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
+ * The server side does the reverse decoding, except "%2F" and "%2f" are left
+ * unchanged. Such variables show up in the
+ * [Discovery
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
+ * `{+var}`.
+ *
+ * ## Using gRPC API Service Configuration
+ *
+ * gRPC API Service Configuration (service config) is a configuration language
+ * for configuring a gRPC service to become a user-facing product. The
+ * service config is simply the YAML representation of the `google.api.Service`
+ * proto message.
+ *
+ * As an alternative to annotating your proto file, you can configure gRPC
+ * transcoding in your service config YAML files. You do this by specifying a
+ * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
+ * effect as the proto annotation. This can be particularly useful if you
+ * have a proto that is reused in multiple services. Note that any transcoding
+ * specified in the service config will override any matching transcoding
+ * configuration in the proto.
+ *
+ * Example:
+ *
+ *     http:
+ *       rules:
+ *         # Selects a gRPC method and applies HttpRule to it.
+ *         - selector: example.v1.Messaging.GetMessage
+ *           get: /v1/messages/{message_id}/{sub.subfield}
+ *
+ * ## Special notes
+ *
+ * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
+ * proto to JSON conversion must follow the [proto3
+ * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
+ *
+ * While the single segment variable follows the semantics of
+ * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
+ * Expansion, the multi segment variable **does not** follow RFC 6570 Section
+ * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
+ * does not expand special characters like `?` and `#`, which would lead
+ * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
+ * for multi segment variables.
+ *
+ * The path variables **must not** refer to any repeated or mapped field,
+ * because client libraries are not capable of handling such variable expansion.
+ *
+ * The path variables **must not** capture the leading "/" character. The reason
+ * is that the most common use case "{var}" does not capture the leading "/"
+ * character. For consistency, all path variables must share the same behavior.
+ *
+ * Repeated message fields must not be mapped to URL query parameters, because
+ * no client library can support such complicated mapping.
+ *
+ * If an API needs to use a JSON array for request or response body, it can map
+ * the request or response body to a repeated field. However, some gRPC
+ * Transcoding implementations may not support this feature.
+ * 
+ * + * Protobuf type {@code google.api.HttpRule} + */ +public final class HttpRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.HttpRule) + HttpRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use HttpRule.newBuilder() to construct. + private HttpRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HttpRule() { + selector_ = ""; + body_ = ""; + responseBody_ = ""; + additionalBindings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HttpRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); + } + + private int patternCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object pattern_; + + public enum PatternCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GET(2), + PUT(3), + POST(4), + DELETE(5), + PATCH(6), + CUSTOM(8), + PATTERN_NOT_SET(0); + private final int value; + + private PatternCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PatternCase valueOf(int value) { + return forNumber(value); + } + + public static PatternCase forNumber(int value) { + switch (value) { + case 2: + return GET; + case 3: + return PUT; + case 4: + return POST; + case 5: + return DELETE; + case 6: + return PATCH; + case 8: + return CUSTOM; + case 0: + return PATTERN_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PatternCase getPatternCase() { + return PatternCase.forNumber(patternCase_); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object selector_ = ""; + /** + * + * + *
+   * Selects a method to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + @java.lang.Override + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * + * + *
+   * Selects a method to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GET_FIELD_NUMBER = 2; + /** + * + * + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2; + * + * @return Whether the get field is set. + */ + public boolean hasGet() { + return patternCase_ == 2; + } + /** + * + * + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2; + * + * @return The get. + */ + public java.lang.String getGet() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 2) { + pattern_ = s; + } + return s; + } + } + /** + * + * + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2; + * + * @return The bytes for get. + */ + public com.google.protobuf.ByteString getGetBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (patternCase_ == 2) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3; + * + * @return Whether the put field is set. + */ + public boolean hasPut() { + return patternCase_ == 3; + } + /** + * + * + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3; + * + * @return The put. + */ + public java.lang.String getPut() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 3) { + pattern_ = s; + } + return s; + } + } + /** + * + * + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3; + * + * @return The bytes for put. + */ + public com.google.protobuf.ByteString getPutBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (patternCase_ == 3) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POST_FIELD_NUMBER = 4; + /** + * + * + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4; + * + * @return Whether the post field is set. + */ + public boolean hasPost() { + return patternCase_ == 4; + } + /** + * + * + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4; + * + * @return The post. + */ + public java.lang.String getPost() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 4) { + pattern_ = s; + } + return s; + } + } + /** + * + * + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4; + * + * @return The bytes for post. + */ + public com.google.protobuf.ByteString getPostBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (patternCase_ == 4) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELETE_FIELD_NUMBER = 5; + /** + * + * + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5; + * + * @return Whether the delete field is set. + */ + public boolean hasDelete() { + return patternCase_ == 5; + } + /** + * + * + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5; + * + * @return The delete. + */ + public java.lang.String getDelete() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 5) { + pattern_ = s; + } + return s; + } + } + /** + * + * + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5; + * + * @return The bytes for delete. + */ + public com.google.protobuf.ByteString getDeleteBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (patternCase_ == 5) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATCH_FIELD_NUMBER = 6; + /** + * + * + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6; + * + * @return Whether the patch field is set. + */ + public boolean hasPatch() { + return patternCase_ == 6; + } + /** + * + * + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6; + * + * @return The patch. + */ + public java.lang.String getPatch() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 6) { + pattern_ = s; + } + return s; + } + } + /** + * + * + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6; + * + * @return The bytes for patch. + */ + public com.google.protobuf.ByteString getPatchBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (patternCase_ == 6) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_FIELD_NUMBER = 8; + /** + * + * + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8; + * + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return patternCase_ == 8; + } + /** + * + * + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8; + * + * @return The custom. + */ + @java.lang.Override + public com.google.api.CustomHttpPattern getCustom() { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + /** + * + * + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8; + */ + @java.lang.Override + public com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder() { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + + public static final int BODY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object body_ = ""; + /** + * + * + *
+   * The name of the request field whose value is mapped to the HTTP request
+   * body, or `*` for mapping all request fields not captured by the path
+   * pattern to the HTTP body, or omitted for not having any HTTP request body.
+   *
+   * NOTE: the referred field must be present at the top-level of the request
+   * message type.
+   * 
+ * + * string body = 7; + * + * @return The body. + */ + @java.lang.Override + public java.lang.String getBody() { + java.lang.Object ref = body_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + body_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the request field whose value is mapped to the HTTP request
+   * body, or `*` for mapping all request fields not captured by the path
+   * pattern to the HTTP body, or omitted for not having any HTTP request body.
+   *
+   * NOTE: the referred field must be present at the top-level of the request
+   * message type.
+   * 
+ * + * string body = 7; + * + * @return The bytes for body. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESPONSE_BODY_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object responseBody_ = ""; + /** + * + * + *
+   * Optional. The name of the response field whose value is mapped to the HTTP
+   * response body. When omitted, the entire response message will be used
+   * as the HTTP response body.
+   *
+   * NOTE: The referred field must be present at the top-level of the response
+   * message type.
+   * 
+ * + * string response_body = 12; + * + * @return The responseBody. + */ + @java.lang.Override + public java.lang.String getResponseBody() { + java.lang.Object ref = responseBody_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseBody_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The name of the response field whose value is mapped to the HTTP
+   * response body. When omitted, the entire response message will be used
+   * as the HTTP response body.
+   *
+   * NOTE: The referred field must be present at the top-level of the response
+   * message type.
+   * 
+ * + * string response_body = 12; + * + * @return The bytes for responseBody. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResponseBodyBytes() { + java.lang.Object ref = responseBody_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseBody_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDITIONAL_BINDINGS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private java.util.List additionalBindings_; + /** + * + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + @java.lang.Override + public java.util.List getAdditionalBindingsList() { + return additionalBindings_; + } + /** + * + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + @java.lang.Override + public java.util.List + getAdditionalBindingsOrBuilderList() { + return additionalBindings_; + } + /** + * + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + @java.lang.Override + public int getAdditionalBindingsCount() { + return additionalBindings_.size(); + } + /** + * + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + @java.lang.Override + public com.google.api.HttpRule getAdditionalBindings(int index) { + return additionalBindings_.get(index); + } + /** + * + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + @java.lang.Override + public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder(int index) { + return additionalBindings_.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(selector_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_); + } + if (patternCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pattern_); + } + if (patternCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pattern_); + } + if (patternCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pattern_); + } + if (patternCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pattern_); + } + if (patternCase_ == 6) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pattern_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, body_); + } + if (patternCase_ == 8) { + output.writeMessage(8, (com.google.api.CustomHttpPattern) pattern_); + } + for (int i = 0; i < additionalBindings_.size(); i++) { + output.writeMessage(11, additionalBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseBody_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, responseBody_); + } + 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(selector_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_); + } + if (patternCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pattern_); + } + if (patternCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pattern_); + } + if (patternCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pattern_); + } + if (patternCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pattern_); + } + if (patternCase_ == 6) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pattern_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, body_); + } + if (patternCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.api.CustomHttpPattern) pattern_); + } + for (int i = 0; i < additionalBindings_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(11, additionalBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseBody_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, responseBody_); + } + 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.api.HttpRule)) { + return super.equals(obj); + } + com.google.api.HttpRule other = (com.google.api.HttpRule) obj; + + if (!getSelector().equals(other.getSelector())) return false; + if (!getBody().equals(other.getBody())) return false; + if (!getResponseBody().equals(other.getResponseBody())) return false; + if (!getAdditionalBindingsList().equals(other.getAdditionalBindingsList())) return false; + if (!getPatternCase().equals(other.getPatternCase())) return false; + switch (patternCase_) { + case 2: + if (!getGet().equals(other.getGet())) return false; + break; + case 3: + if (!getPut().equals(other.getPut())) return false; + break; + case 4: + if (!getPost().equals(other.getPost())) return false; + break; + case 5: + if (!getDelete().equals(other.getDelete())) return false; + break; + case 6: + if (!getPatch().equals(other.getPatch())) return false; + break; + case 8: + if (!getCustom().equals(other.getCustom())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + hash = (37 * hash) + RESPONSE_BODY_FIELD_NUMBER; + hash = (53 * hash) + getResponseBody().hashCode(); + if (getAdditionalBindingsCount() > 0) { + hash = (37 * hash) + ADDITIONAL_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalBindingsList().hashCode(); + } + switch (patternCase_) { + case 2: + hash = (37 * hash) + GET_FIELD_NUMBER; + hash = (53 * hash) + getGet().hashCode(); + break; + case 3: + hash = (37 * hash) + PUT_FIELD_NUMBER; + hash = (53 * hash) + getPut().hashCode(); + break; + case 4: + hash = (37 * hash) + POST_FIELD_NUMBER; + hash = (53 * hash) + getPost().hashCode(); + break; + case 5: + hash = (37 * hash) + DELETE_FIELD_NUMBER; + hash = (53 * hash) + getDelete().hashCode(); + break; + case 6: + hash = (37 * hash) + PATCH_FIELD_NUMBER; + hash = (53 * hash) + getPatch().hashCode(); + break; + case 8: + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getCustom().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.HttpRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.HttpRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.HttpRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.HttpRule 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.api.HttpRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.HttpRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.HttpRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.HttpRule 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.api.HttpRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.HttpRule 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.api.HttpRule parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.HttpRule 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.api.HttpRule 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; + } + /** + * + * + *
+   * # gRPC Transcoding
+   *
+   * gRPC Transcoding is a feature for mapping between a gRPC method and one or
+   * more HTTP REST endpoints. It allows developers to build a single API service
+   * that supports both gRPC APIs and REST APIs. Many systems, including [Google
+   * APIs](https://github.com/googleapis/googleapis),
+   * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
+   * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
+   * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
+   * and use it for large scale production services.
+   *
+   * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
+   * how different portions of the gRPC request message are mapped to the URL
+   * path, URL query parameters, and HTTP request body. It also controls how the
+   * gRPC response message is mapped to the HTTP response body. `HttpRule` is
+   * typically specified as an `google.api.http` annotation on the gRPC method.
+   *
+   * Each mapping specifies a URL path template and an HTTP method. The path
+   * template may refer to one or more fields in the gRPC request message, as long
+   * as each field is a non-repeated field with a primitive (non-message) type.
+   * The path template controls how fields of the request message are mapped to
+   * the URL path.
+   *
+   * Example:
+   *
+   *     service Messaging {
+   *       rpc GetMessage(GetMessageRequest) returns (Message) {
+   *         option (google.api.http) = {
+   *             get: "/v1/{name=messages/*}"
+   *         };
+   *       }
+   *     }
+   *     message GetMessageRequest {
+   *       string name = 1; // Mapped to URL path.
+   *     }
+   *     message Message {
+   *       string text = 1; // The resource content.
+   *     }
+   *
+   * This enables an HTTP REST to gRPC mapping as below:
+   *
+   * HTTP | gRPC
+   * -----|-----
+   * `GET /v1/messages/123456`  | `GetMessage(name: "messages/123456")`
+   *
+   * Any fields in the request message which are not bound by the path template
+   * automatically become HTTP query parameters if there is no HTTP request body.
+   * For example:
+   *
+   *     service Messaging {
+   *       rpc GetMessage(GetMessageRequest) returns (Message) {
+   *         option (google.api.http) = {
+   *             get:"/v1/messages/{message_id}"
+   *         };
+   *       }
+   *     }
+   *     message GetMessageRequest {
+   *       message SubMessage {
+   *         string subfield = 1;
+   *       }
+   *       string message_id = 1; // Mapped to URL path.
+   *       int64 revision = 2;    // Mapped to URL query parameter `revision`.
+   *       SubMessage sub = 3;    // Mapped to URL query parameter `sub.subfield`.
+   *     }
+   *
+   * This enables a HTTP JSON to RPC mapping as below:
+   *
+   * HTTP | gRPC
+   * -----|-----
+   * `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
+   * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
+   * "foo"))`
+   *
+   * Note that fields which are mapped to URL query parameters must have a
+   * primitive type or a repeated primitive type or a non-repeated message type.
+   * In the case of a repeated type, the parameter can be repeated in the URL
+   * as `...?param=A&param=B`. In the case of a message type, each field of the
+   * message is mapped to a separate parameter, such as
+   * `...?foo.a=A&foo.b=B&foo.c=C`.
+   *
+   * For HTTP methods that allow a request body, the `body` field
+   * specifies the mapping. Consider a REST update method on the
+   * message resource collection:
+   *
+   *     service Messaging {
+   *       rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+   *         option (google.api.http) = {
+   *           patch: "/v1/messages/{message_id}"
+   *           body: "message"
+   *         };
+   *       }
+   *     }
+   *     message UpdateMessageRequest {
+   *       string message_id = 1; // mapped to the URL
+   *       Message message = 2;   // mapped to the body
+   *     }
+   *
+   * The following HTTP JSON to RPC mapping is enabled, where the
+   * representation of the JSON in the request body is determined by
+   * protos JSON encoding:
+   *
+   * HTTP | gRPC
+   * -----|-----
+   * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
+   * "123456" message { text: "Hi!" })`
+   *
+   * The special name `*` can be used in the body mapping to define that
+   * every field not bound by the path template should be mapped to the
+   * request body.  This enables the following alternative definition of
+   * the update method:
+   *
+   *     service Messaging {
+   *       rpc UpdateMessage(Message) returns (Message) {
+   *         option (google.api.http) = {
+   *           patch: "/v1/messages/{message_id}"
+   *           body: "*"
+   *         };
+   *       }
+   *     }
+   *     message Message {
+   *       string message_id = 1;
+   *       string text = 2;
+   *     }
+   *
+   *
+   * The following HTTP JSON to RPC mapping is enabled:
+   *
+   * HTTP | gRPC
+   * -----|-----
+   * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
+   * "123456" text: "Hi!")`
+   *
+   * Note that when using `*` in the body mapping, it is not possible to
+   * have HTTP parameters, as all fields not bound by the path end in
+   * the body. This makes this option more rarely used in practice when
+   * defining REST APIs. The common usage of `*` is in custom methods
+   * which don't use the URL at all for transferring data.
+   *
+   * It is possible to define multiple HTTP methods for one RPC by using
+   * the `additional_bindings` option. Example:
+   *
+   *     service Messaging {
+   *       rpc GetMessage(GetMessageRequest) returns (Message) {
+   *         option (google.api.http) = {
+   *           get: "/v1/messages/{message_id}"
+   *           additional_bindings {
+   *             get: "/v1/users/{user_id}/messages/{message_id}"
+   *           }
+   *         };
+   *       }
+   *     }
+   *     message GetMessageRequest {
+   *       string message_id = 1;
+   *       string user_id = 2;
+   *     }
+   *
+   * This enables the following two alternative HTTP JSON to RPC mappings:
+   *
+   * HTTP | gRPC
+   * -----|-----
+   * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
+   * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
+   * "123456")`
+   *
+   * ## Rules for HTTP mapping
+   *
+   * 1. Leaf request fields (recursive expansion nested messages in the request
+   *    message) are classified into three categories:
+   *    - Fields referred by the path template. They are passed via the URL path.
+   *    - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
+   *    are passed via the HTTP
+   *      request body.
+   *    - All other fields are passed via the URL query parameters, and the
+   *      parameter name is the field path in the request message. A repeated
+   *      field can be represented as multiple query parameters under the same
+   *      name.
+   *  2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
+   *  query parameter, all fields
+   *     are passed via URL path and HTTP request body.
+   *  3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
+   *  request body, all
+   *     fields are passed via URL path and URL query parameters.
+   *
+   * ### Path template syntax
+   *
+   *     Template = "/" Segments [ Verb ] ;
+   *     Segments = Segment { "/" Segment } ;
+   *     Segment  = "*" | "**" | LITERAL | Variable ;
+   *     Variable = "{" FieldPath [ "=" Segments ] "}" ;
+   *     FieldPath = IDENT { "." IDENT } ;
+   *     Verb     = ":" LITERAL ;
+   *
+   * The syntax `*` matches a single URL path segment. The syntax `**` matches
+   * zero or more URL path segments, which must be the last part of the URL path
+   * except the `Verb`.
+   *
+   * The syntax `Variable` matches part of the URL path as specified by its
+   * template. A variable template must not contain other variables. If a variable
+   * matches a single path segment, its template may be omitted, e.g. `{var}`
+   * is equivalent to `{var=*}`.
+   *
+   * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
+   * contains any reserved character, such characters should be percent-encoded
+   * before the matching.
+   *
+   * If a variable contains exactly one path segment, such as `"{var}"` or
+   * `"{var=*}"`, when such a variable is expanded into a URL path on the client
+   * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
+   * server side does the reverse decoding. Such variables show up in the
+   * [Discovery
+   * Document](https://developers.google.com/discovery/v1/reference/apis) as
+   * `{var}`.
+   *
+   * If a variable contains multiple path segments, such as `"{var=foo/*}"`
+   * or `"{var=**}"`, when such a variable is expanded into a URL path on the
+   * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
+   * The server side does the reverse decoding, except "%2F" and "%2f" are left
+   * unchanged. Such variables show up in the
+   * [Discovery
+   * Document](https://developers.google.com/discovery/v1/reference/apis) as
+   * `{+var}`.
+   *
+   * ## Using gRPC API Service Configuration
+   *
+   * gRPC API Service Configuration (service config) is a configuration language
+   * for configuring a gRPC service to become a user-facing product. The
+   * service config is simply the YAML representation of the `google.api.Service`
+   * proto message.
+   *
+   * As an alternative to annotating your proto file, you can configure gRPC
+   * transcoding in your service config YAML files. You do this by specifying a
+   * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
+   * effect as the proto annotation. This can be particularly useful if you
+   * have a proto that is reused in multiple services. Note that any transcoding
+   * specified in the service config will override any matching transcoding
+   * configuration in the proto.
+   *
+   * Example:
+   *
+   *     http:
+   *       rules:
+   *         # Selects a gRPC method and applies HttpRule to it.
+   *         - selector: example.v1.Messaging.GetMessage
+   *           get: /v1/messages/{message_id}/{sub.subfield}
+   *
+   * ## Special notes
+   *
+   * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
+   * proto to JSON conversion must follow the [proto3
+   * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   *
+   * While the single segment variable follows the semantics of
+   * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
+   * Expansion, the multi segment variable **does not** follow RFC 6570 Section
+   * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
+   * does not expand special characters like `?` and `#`, which would lead
+   * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
+   * for multi segment variables.
+   *
+   * The path variables **must not** refer to any repeated or mapped field,
+   * because client libraries are not capable of handling such variable expansion.
+   *
+   * The path variables **must not** capture the leading "/" character. The reason
+   * is that the most common use case "{var}" does not capture the leading "/"
+   * character. For consistency, all path variables must share the same behavior.
+   *
+   * Repeated message fields must not be mapped to URL query parameters, because
+   * no client library can support such complicated mapping.
+   *
+   * If an API needs to use a JSON array for request or response body, it can map
+   * the request or response body to a repeated field. However, some gRPC
+   * Transcoding implementations may not support this feature.
+   * 
+ * + * Protobuf type {@code google.api.HttpRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.HttpRule) + com.google.api.HttpRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); + } + + // Construct using com.google.api.HttpRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selector_ = ""; + if (customBuilder_ != null) { + customBuilder_.clear(); + } + body_ = ""; + responseBody_ = ""; + if (additionalBindingsBuilder_ == null) { + additionalBindings_ = java.util.Collections.emptyList(); + } else { + additionalBindings_ = null; + additionalBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + patternCase_ = 0; + pattern_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; + } + + @java.lang.Override + public com.google.api.HttpRule getDefaultInstanceForType() { + return com.google.api.HttpRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.HttpRule build() { + com.google.api.HttpRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.HttpRule buildPartial() { + com.google.api.HttpRule result = new com.google.api.HttpRule(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.HttpRule result) { + if (additionalBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + additionalBindings_ = java.util.Collections.unmodifiableList(additionalBindings_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.additionalBindings_ = additionalBindings_; + } else { + result.additionalBindings_ = additionalBindingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.HttpRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selector_ = selector_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.body_ = body_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.responseBody_ = responseBody_; + } + } + + private void buildPartialOneofs(com.google.api.HttpRule result) { + result.patternCase_ = patternCase_; + result.pattern_ = this.pattern_; + if (patternCase_ == 8 && customBuilder_ != null) { + result.pattern_ = customBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.HttpRule) { + return mergeFrom((com.google.api.HttpRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.HttpRule other) { + if (other == com.google.api.HttpRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBody().isEmpty()) { + body_ = other.body_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getResponseBody().isEmpty()) { + responseBody_ = other.responseBody_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (additionalBindingsBuilder_ == null) { + if (!other.additionalBindings_.isEmpty()) { + if (additionalBindings_.isEmpty()) { + additionalBindings_ = other.additionalBindings_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.addAll(other.additionalBindings_); + } + onChanged(); + } + } else { + if (!other.additionalBindings_.isEmpty()) { + if (additionalBindingsBuilder_.isEmpty()) { + additionalBindingsBuilder_.dispose(); + additionalBindingsBuilder_ = null; + additionalBindings_ = other.additionalBindings_; + bitField0_ = (bitField0_ & ~0x00000200); + additionalBindingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAdditionalBindingsFieldBuilder() + : null; + } else { + additionalBindingsBuilder_.addAllMessages(other.additionalBindings_); + } + } + } + switch (other.getPatternCase()) { + case GET: + { + patternCase_ = 2; + pattern_ = other.pattern_; + onChanged(); + break; + } + case PUT: + { + patternCase_ = 3; + pattern_ = other.pattern_; + onChanged(); + break; + } + case POST: + { + patternCase_ = 4; + pattern_ = other.pattern_; + onChanged(); + break; + } + case DELETE: + { + patternCase_ = 5; + pattern_ = other.pattern_; + onChanged(); + break; + } + case PATCH: + { + patternCase_ = 6; + pattern_ = other.pattern_; + onChanged(); + break; + } + case CUSTOM: + { + mergeCustom(other.getCustom()); + break; + } + case PATTERN_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + selector_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + patternCase_ = 2; + pattern_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + patternCase_ = 3; + pattern_ = s; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + patternCase_ = 4; + pattern_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + patternCase_ = 5; + pattern_ = s; + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + patternCase_ = 6; + pattern_ = s; + break; + } // case 50 + case 58: + { + body_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + input.readMessage(getCustomFieldBuilder().getBuilder(), extensionRegistry); + patternCase_ = 8; + break; + } // case 66 + case 90: + { + com.google.api.HttpRule m = + input.readMessage(com.google.api.HttpRule.parser(), extensionRegistry); + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(m); + } else { + additionalBindingsBuilder_.addMessage(m); + } + break; + } // case 90 + case 98: + { + responseBody_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + 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 patternCase_ = 0; + private java.lang.Object pattern_; + + public PatternCase getPatternCase() { + return PatternCase.forNumber(patternCase_); + } + + public Builder clearPattern() { + patternCase_ = 0; + pattern_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * + * + *
+     * Selects a method to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return The selector. + */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Selects a method to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Selects a method to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @param value The selector to set. + * @return This builder for chaining. + */ + public Builder setSelector(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Selects a method to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return This builder for chaining. + */ + public Builder clearSelector() { + selector_ = getDefaultInstance().getSelector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Selects a method to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @param value The bytes for selector to set. + * @return This builder for chaining. + */ + public Builder setSelectorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2; + * + * @return Whether the get field is set. + */ + @java.lang.Override + public boolean hasGet() { + return patternCase_ == 2; + } + /** + * + * + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2; + * + * @return The get. + */ + @java.lang.Override + public java.lang.String getGet() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 2) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2; + * + * @return The bytes for get. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGetBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 2) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (patternCase_ == 2) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2; + * + * @param value The get to set. + * @return This builder for chaining. + */ + public Builder setGet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 2; + pattern_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2; + * + * @return This builder for chaining. + */ + public Builder clearGet() { + if (patternCase_ == 2) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Maps to HTTP GET. Used for listing and getting information about
+     * resources.
+     * 
+ * + * string get = 2; + * + * @param value The bytes for get to set. + * @return This builder for chaining. + */ + public Builder setGetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 2; + pattern_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3; + * + * @return Whether the put field is set. + */ + @java.lang.Override + public boolean hasPut() { + return patternCase_ == 3; + } + /** + * + * + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3; + * + * @return The put. + */ + @java.lang.Override + public java.lang.String getPut() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 3) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3; + * + * @return The bytes for put. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPutBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 3) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (patternCase_ == 3) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3; + * + * @param value The put to set. + * @return This builder for chaining. + */ + public Builder setPut(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 3; + pattern_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3; + * + * @return This builder for chaining. + */ + public Builder clearPut() { + if (patternCase_ == 3) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Maps to HTTP PUT. Used for replacing a resource.
+     * 
+ * + * string put = 3; + * + * @param value The bytes for put to set. + * @return This builder for chaining. + */ + public Builder setPutBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 3; + pattern_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4; + * + * @return Whether the post field is set. + */ + @java.lang.Override + public boolean hasPost() { + return patternCase_ == 4; + } + /** + * + * + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4; + * + * @return The post. + */ + @java.lang.Override + public java.lang.String getPost() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 4) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4; + * + * @return The bytes for post. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPostBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 4) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (patternCase_ == 4) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4; + * + * @param value The post to set. + * @return This builder for chaining. + */ + public Builder setPost(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 4; + pattern_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4; + * + * @return This builder for chaining. + */ + public Builder clearPost() { + if (patternCase_ == 4) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Maps to HTTP POST. Used for creating a resource or performing an action.
+     * 
+ * + * string post = 4; + * + * @param value The bytes for post to set. + * @return This builder for chaining. + */ + public Builder setPostBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 4; + pattern_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5; + * + * @return Whether the delete field is set. + */ + @java.lang.Override + public boolean hasDelete() { + return patternCase_ == 5; + } + /** + * + * + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5; + * + * @return The delete. + */ + @java.lang.Override + public java.lang.String getDelete() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 5) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5; + * + * @return The bytes for delete. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeleteBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 5) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (patternCase_ == 5) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5; + * + * @param value The delete to set. + * @return This builder for chaining. + */ + public Builder setDelete(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 5; + pattern_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5; + * + * @return This builder for chaining. + */ + public Builder clearDelete() { + if (patternCase_ == 5) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Maps to HTTP DELETE. Used for deleting a resource.
+     * 
+ * + * string delete = 5; + * + * @param value The bytes for delete to set. + * @return This builder for chaining. + */ + public Builder setDeleteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 5; + pattern_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6; + * + * @return Whether the patch field is set. + */ + @java.lang.Override + public boolean hasPatch() { + return patternCase_ == 6; + } + /** + * + * + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6; + * + * @return The patch. + */ + @java.lang.Override + public java.lang.String getPatch() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (patternCase_ == 6) { + pattern_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6; + * + * @return The bytes for patch. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPatchBytes() { + java.lang.Object ref = ""; + if (patternCase_ == 6) { + ref = pattern_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (patternCase_ == 6) { + pattern_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6; + * + * @param value The patch to set. + * @return This builder for chaining. + */ + public Builder setPatch(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + patternCase_ = 6; + pattern_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6; + * + * @return This builder for chaining. + */ + public Builder clearPatch() { + if (patternCase_ == 6) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Maps to HTTP PATCH. Used for updating a resource.
+     * 
+ * + * string patch = 6; + * + * @param value The bytes for patch to set. + * @return This builder for chaining. + */ + public Builder setPatchBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + patternCase_ = 6; + pattern_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CustomHttpPattern, + com.google.api.CustomHttpPattern.Builder, + com.google.api.CustomHttpPatternOrBuilder> + customBuilder_; + /** + * + * + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8; + * + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return patternCase_ == 8; + } + /** + * + * + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8; + * + * @return The custom. + */ + @java.lang.Override + public com.google.api.CustomHttpPattern getCustom() { + if (customBuilder_ == null) { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } else { + if (patternCase_ == 8) { + return customBuilder_.getMessage(); + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + } + /** + * + * + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8; + */ + public Builder setCustom(com.google.api.CustomHttpPattern value) { + if (customBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pattern_ = value; + onChanged(); + } else { + customBuilder_.setMessage(value); + } + patternCase_ = 8; + return this; + } + /** + * + * + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8; + */ + public Builder setCustom(com.google.api.CustomHttpPattern.Builder builderForValue) { + if (customBuilder_ == null) { + pattern_ = builderForValue.build(); + onChanged(); + } else { + customBuilder_.setMessage(builderForValue.build()); + } + patternCase_ = 8; + return this; + } + /** + * + * + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8; + */ + public Builder mergeCustom(com.google.api.CustomHttpPattern value) { + if (customBuilder_ == null) { + if (patternCase_ == 8 + && pattern_ != com.google.api.CustomHttpPattern.getDefaultInstance()) { + pattern_ = + com.google.api.CustomHttpPattern.newBuilder( + (com.google.api.CustomHttpPattern) pattern_) + .mergeFrom(value) + .buildPartial(); + } else { + pattern_ = value; + } + onChanged(); + } else { + if (patternCase_ == 8) { + customBuilder_.mergeFrom(value); + } else { + customBuilder_.setMessage(value); + } + } + patternCase_ = 8; + return this; + } + /** + * + * + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8; + */ + public Builder clearCustom() { + if (customBuilder_ == null) { + if (patternCase_ == 8) { + patternCase_ = 0; + pattern_ = null; + onChanged(); + } + } else { + if (patternCase_ == 8) { + patternCase_ = 0; + pattern_ = null; + } + customBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8; + */ + public com.google.api.CustomHttpPattern.Builder getCustomBuilder() { + return getCustomFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8; + */ + @java.lang.Override + public com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder() { + if ((patternCase_ == 8) && (customBuilder_ != null)) { + return customBuilder_.getMessageOrBuilder(); + } else { + if (patternCase_ == 8) { + return (com.google.api.CustomHttpPattern) pattern_; + } + return com.google.api.CustomHttpPattern.getDefaultInstance(); + } + } + /** + * + * + *
+     * The custom pattern is used for specifying an HTTP method that is not
+     * included in the `pattern` field, such as HEAD, or "*" to leave the
+     * HTTP method unspecified for this rule. The wild-card rule is useful
+     * for services that provide content to Web (HTML) clients.
+     * 
+ * + * .google.api.CustomHttpPattern custom = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CustomHttpPattern, + com.google.api.CustomHttpPattern.Builder, + com.google.api.CustomHttpPatternOrBuilder> + getCustomFieldBuilder() { + if (customBuilder_ == null) { + if (!(patternCase_ == 8)) { + pattern_ = com.google.api.CustomHttpPattern.getDefaultInstance(); + } + customBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CustomHttpPattern, + com.google.api.CustomHttpPattern.Builder, + com.google.api.CustomHttpPatternOrBuilder>( + (com.google.api.CustomHttpPattern) pattern_, getParentForChildren(), isClean()); + pattern_ = null; + } + patternCase_ = 8; + onChanged(); + return customBuilder_; + } + + private java.lang.Object body_ = ""; + /** + * + * + *
+     * The name of the request field whose value is mapped to the HTTP request
+     * body, or `*` for mapping all request fields not captured by the path
+     * pattern to the HTTP body, or omitted for not having any HTTP request body.
+     *
+     * NOTE: the referred field must be present at the top-level of the request
+     * message type.
+     * 
+ * + * string body = 7; + * + * @return The body. + */ + public java.lang.String getBody() { + java.lang.Object ref = body_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + body_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the request field whose value is mapped to the HTTP request
+     * body, or `*` for mapping all request fields not captured by the path
+     * pattern to the HTTP body, or omitted for not having any HTTP request body.
+     *
+     * NOTE: the referred field must be present at the top-level of the request
+     * message type.
+     * 
+ * + * string body = 7; + * + * @return The bytes for body. + */ + public com.google.protobuf.ByteString getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the request field whose value is mapped to the HTTP request
+     * body, or `*` for mapping all request fields not captured by the path
+     * pattern to the HTTP body, or omitted for not having any HTTP request body.
+     *
+     * NOTE: the referred field must be present at the top-level of the request
+     * message type.
+     * 
+ * + * string body = 7; + * + * @param value The body to set. + * @return This builder for chaining. + */ + public Builder setBody(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the request field whose value is mapped to the HTTP request
+     * body, or `*` for mapping all request fields not captured by the path
+     * pattern to the HTTP body, or omitted for not having any HTTP request body.
+     *
+     * NOTE: the referred field must be present at the top-level of the request
+     * message type.
+     * 
+ * + * string body = 7; + * + * @return This builder for chaining. + */ + public Builder clearBody() { + body_ = getDefaultInstance().getBody(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the request field whose value is mapped to the HTTP request
+     * body, or `*` for mapping all request fields not captured by the path
+     * pattern to the HTTP body, or omitted for not having any HTTP request body.
+     *
+     * NOTE: the referred field must be present at the top-level of the request
+     * message type.
+     * 
+ * + * string body = 7; + * + * @param value The bytes for body to set. + * @return This builder for chaining. + */ + public Builder setBodyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + body_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object responseBody_ = ""; + /** + * + * + *
+     * Optional. The name of the response field whose value is mapped to the HTTP
+     * response body. When omitted, the entire response message will be used
+     * as the HTTP response body.
+     *
+     * NOTE: The referred field must be present at the top-level of the response
+     * message type.
+     * 
+ * + * string response_body = 12; + * + * @return The responseBody. + */ + public java.lang.String getResponseBody() { + java.lang.Object ref = responseBody_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseBody_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The name of the response field whose value is mapped to the HTTP
+     * response body. When omitted, the entire response message will be used
+     * as the HTTP response body.
+     *
+     * NOTE: The referred field must be present at the top-level of the response
+     * message type.
+     * 
+ * + * string response_body = 12; + * + * @return The bytes for responseBody. + */ + public com.google.protobuf.ByteString getResponseBodyBytes() { + java.lang.Object ref = responseBody_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseBody_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The name of the response field whose value is mapped to the HTTP
+     * response body. When omitted, the entire response message will be used
+     * as the HTTP response body.
+     *
+     * NOTE: The referred field must be present at the top-level of the response
+     * message type.
+     * 
+ * + * string response_body = 12; + * + * @param value The responseBody to set. + * @return This builder for chaining. + */ + public Builder setResponseBody(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + responseBody_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the response field whose value is mapped to the HTTP
+     * response body. When omitted, the entire response message will be used
+     * as the HTTP response body.
+     *
+     * NOTE: The referred field must be present at the top-level of the response
+     * message type.
+     * 
+ * + * string response_body = 12; + * + * @return This builder for chaining. + */ + public Builder clearResponseBody() { + responseBody_ = getDefaultInstance().getResponseBody(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the response field whose value is mapped to the HTTP
+     * response body. When omitted, the entire response message will be used
+     * as the HTTP response body.
+     *
+     * NOTE: The referred field must be present at the top-level of the response
+     * message type.
+     * 
+ * + * string response_body = 12; + * + * @param value The bytes for responseBody to set. + * @return This builder for chaining. + */ + public Builder setResponseBodyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + responseBody_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.util.List additionalBindings_ = + java.util.Collections.emptyList(); + + private void ensureAdditionalBindingsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + additionalBindings_ = new java.util.ArrayList(additionalBindings_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.HttpRule, + com.google.api.HttpRule.Builder, + com.google.api.HttpRuleOrBuilder> + additionalBindingsBuilder_; + + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public java.util.List getAdditionalBindingsList() { + if (additionalBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(additionalBindings_); + } else { + return additionalBindingsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public int getAdditionalBindingsCount() { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.size(); + } else { + return additionalBindingsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public com.google.api.HttpRule getAdditionalBindings(int index) { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.get(index); + } else { + return additionalBindingsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public Builder setAdditionalBindings(int index, com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.set(index, value); + onChanged(); + } else { + additionalBindingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public Builder setAdditionalBindings( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public Builder addAdditionalBindings(com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(value); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public Builder addAdditionalBindings(int index, com.google.api.HttpRule value) { + if (additionalBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(index, value); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public Builder addAdditionalBindings(com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public Builder addAdditionalBindings( + int index, com.google.api.HttpRule.Builder builderForValue) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + additionalBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public Builder addAllAdditionalBindings( + java.lang.Iterable values) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, additionalBindings_); + onChanged(); + } else { + additionalBindingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public Builder clearAdditionalBindings() { + if (additionalBindingsBuilder_ == null) { + additionalBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + additionalBindingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public Builder removeAdditionalBindings(int index) { + if (additionalBindingsBuilder_ == null) { + ensureAdditionalBindingsIsMutable(); + additionalBindings_.remove(index); + onChanged(); + } else { + additionalBindingsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public com.google.api.HttpRule.Builder getAdditionalBindingsBuilder(int index) { + return getAdditionalBindingsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder(int index) { + if (additionalBindingsBuilder_ == null) { + return additionalBindings_.get(index); + } else { + return additionalBindingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public java.util.List + getAdditionalBindingsOrBuilderList() { + if (additionalBindingsBuilder_ != null) { + return additionalBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(additionalBindings_); + } + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder() { + return getAdditionalBindingsFieldBuilder() + .addBuilder(com.google.api.HttpRule.getDefaultInstance()); + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder(int index) { + return getAdditionalBindingsFieldBuilder() + .addBuilder(index, com.google.api.HttpRule.getDefaultInstance()); + } + /** + * + * + *
+     * Additional HTTP bindings for the selector. Nested bindings must
+     * not contain an `additional_bindings` field themselves (that is,
+     * the nesting may only be one level deep).
+     * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + public java.util.List getAdditionalBindingsBuilderList() { + return getAdditionalBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.HttpRule, + com.google.api.HttpRule.Builder, + com.google.api.HttpRuleOrBuilder> + getAdditionalBindingsFieldBuilder() { + if (additionalBindingsBuilder_ == null) { + additionalBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.HttpRule, + com.google.api.HttpRule.Builder, + com.google.api.HttpRuleOrBuilder>( + additionalBindings_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + additionalBindings_ = null; + } + return additionalBindingsBuilder_; + } + + @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.api.HttpRule) + } + + // @@protoc_insertion_point(class_scope:google.api.HttpRule) + private static final com.google.api.HttpRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.HttpRule(); + } + + public static com.google.api.HttpRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HttpRule 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.api.HttpRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpRuleOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpRuleOrBuilder.java new file mode 100644 index 000000000000..e914b507894a --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/HttpRuleOrBuilder.java @@ -0,0 +1,421 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/http.proto + +package com.google.api; + +public interface HttpRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.HttpRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Selects a method to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + java.lang.String getSelector(); + /** + * + * + *
+   * Selects a method to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + com.google.protobuf.ByteString getSelectorBytes(); + + /** + * + * + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2; + * + * @return Whether the get field is set. + */ + boolean hasGet(); + /** + * + * + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2; + * + * @return The get. + */ + java.lang.String getGet(); + /** + * + * + *
+   * Maps to HTTP GET. Used for listing and getting information about
+   * resources.
+   * 
+ * + * string get = 2; + * + * @return The bytes for get. + */ + com.google.protobuf.ByteString getGetBytes(); + + /** + * + * + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3; + * + * @return Whether the put field is set. + */ + boolean hasPut(); + /** + * + * + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3; + * + * @return The put. + */ + java.lang.String getPut(); + /** + * + * + *
+   * Maps to HTTP PUT. Used for replacing a resource.
+   * 
+ * + * string put = 3; + * + * @return The bytes for put. + */ + com.google.protobuf.ByteString getPutBytes(); + + /** + * + * + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4; + * + * @return Whether the post field is set. + */ + boolean hasPost(); + /** + * + * + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4; + * + * @return The post. + */ + java.lang.String getPost(); + /** + * + * + *
+   * Maps to HTTP POST. Used for creating a resource or performing an action.
+   * 
+ * + * string post = 4; + * + * @return The bytes for post. + */ + com.google.protobuf.ByteString getPostBytes(); + + /** + * + * + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5; + * + * @return Whether the delete field is set. + */ + boolean hasDelete(); + /** + * + * + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5; + * + * @return The delete. + */ + java.lang.String getDelete(); + /** + * + * + *
+   * Maps to HTTP DELETE. Used for deleting a resource.
+   * 
+ * + * string delete = 5; + * + * @return The bytes for delete. + */ + com.google.protobuf.ByteString getDeleteBytes(); + + /** + * + * + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6; + * + * @return Whether the patch field is set. + */ + boolean hasPatch(); + /** + * + * + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6; + * + * @return The patch. + */ + java.lang.String getPatch(); + /** + * + * + *
+   * Maps to HTTP PATCH. Used for updating a resource.
+   * 
+ * + * string patch = 6; + * + * @return The bytes for patch. + */ + com.google.protobuf.ByteString getPatchBytes(); + + /** + * + * + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8; + * + * @return Whether the custom field is set. + */ + boolean hasCustom(); + /** + * + * + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8; + * + * @return The custom. + */ + com.google.api.CustomHttpPattern getCustom(); + /** + * + * + *
+   * The custom pattern is used for specifying an HTTP method that is not
+   * included in the `pattern` field, such as HEAD, or "*" to leave the
+   * HTTP method unspecified for this rule. The wild-card rule is useful
+   * for services that provide content to Web (HTML) clients.
+   * 
+ * + * .google.api.CustomHttpPattern custom = 8; + */ + com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder(); + + /** + * + * + *
+   * The name of the request field whose value is mapped to the HTTP request
+   * body, or `*` for mapping all request fields not captured by the path
+   * pattern to the HTTP body, or omitted for not having any HTTP request body.
+   *
+   * NOTE: the referred field must be present at the top-level of the request
+   * message type.
+   * 
+ * + * string body = 7; + * + * @return The body. + */ + java.lang.String getBody(); + /** + * + * + *
+   * The name of the request field whose value is mapped to the HTTP request
+   * body, or `*` for mapping all request fields not captured by the path
+   * pattern to the HTTP body, or omitted for not having any HTTP request body.
+   *
+   * NOTE: the referred field must be present at the top-level of the request
+   * message type.
+   * 
+ * + * string body = 7; + * + * @return The bytes for body. + */ + com.google.protobuf.ByteString getBodyBytes(); + + /** + * + * + *
+   * Optional. The name of the response field whose value is mapped to the HTTP
+   * response body. When omitted, the entire response message will be used
+   * as the HTTP response body.
+   *
+   * NOTE: The referred field must be present at the top-level of the response
+   * message type.
+   * 
+ * + * string response_body = 12; + * + * @return The responseBody. + */ + java.lang.String getResponseBody(); + /** + * + * + *
+   * Optional. The name of the response field whose value is mapped to the HTTP
+   * response body. When omitted, the entire response message will be used
+   * as the HTTP response body.
+   *
+   * NOTE: The referred field must be present at the top-level of the response
+   * message type.
+   * 
+ * + * string response_body = 12; + * + * @return The bytes for responseBody. + */ + com.google.protobuf.ByteString getResponseBodyBytes(); + + /** + * + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + java.util.List getAdditionalBindingsList(); + /** + * + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + com.google.api.HttpRule getAdditionalBindings(int index); + /** + * + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + int getAdditionalBindingsCount(); + /** + * + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + java.util.List getAdditionalBindingsOrBuilderList(); + /** + * + * + *
+   * Additional HTTP bindings for the selector. Nested bindings must
+   * not contain an `additional_bindings` field themselves (that is,
+   * the nesting may only be one level deep).
+   * 
+ * + * repeated .google.api.HttpRule additional_bindings = 11; + */ + com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder(int index); + + com.google.api.HttpRule.PatternCase getPatternCase(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JavaSettings.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JavaSettings.java new file mode 100644 index 000000000000..eed3b4035727 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JavaSettings.java @@ -0,0 +1,1431 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * Settings for Java client libraries.
+ * 
+ * + * Protobuf type {@code google.api.JavaSettings} + */ +public final class JavaSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.JavaSettings) + JavaSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use JavaSettings.newBuilder() to construct. + private JavaSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private JavaSettings() { + libraryPackage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new JavaSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_JavaSettings_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetServiceClassNames(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_JavaSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.JavaSettings.class, com.google.api.JavaSettings.Builder.class); + } + + public static final int LIBRARY_PACKAGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object libraryPackage_ = ""; + /** + * + * + *
+   * The package name to use in Java. Clobbers the java_package option
+   * set in the protobuf. This should be used **only** by APIs
+   * who have already set the language_settings.java.package_name" field
+   * in gapic.yaml. API teams should use the protobuf java_package option
+   * where possible.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      library_package: com.google.cloud.pubsub.v1
+   * 
+ * + * string library_package = 1; + * + * @return The libraryPackage. + */ + @java.lang.Override + public java.lang.String getLibraryPackage() { + java.lang.Object ref = libraryPackage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + libraryPackage_ = s; + return s; + } + } + /** + * + * + *
+   * The package name to use in Java. Clobbers the java_package option
+   * set in the protobuf. This should be used **only** by APIs
+   * who have already set the language_settings.java.package_name" field
+   * in gapic.yaml. API teams should use the protobuf java_package option
+   * where possible.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      library_package: com.google.cloud.pubsub.v1
+   * 
+ * + * string library_package = 1; + * + * @return The bytes for libraryPackage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLibraryPackageBytes() { + java.lang.Object ref = libraryPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + libraryPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_CLASS_NAMES_FIELD_NUMBER = 2; + + private static final class ServiceClassNamesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.ClientProto + .internal_static_google_api_JavaSettings_ServiceClassNamesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField serviceClassNames_; + + private com.google.protobuf.MapField + internalGetServiceClassNames() { + if (serviceClassNames_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ServiceClassNamesDefaultEntryHolder.defaultEntry); + } + return serviceClassNames_; + } + + public int getServiceClassNamesCount() { + return internalGetServiceClassNames().getMap().size(); + } + /** + * + * + *
+   * Configure the Java class name to use instead of the service's for its
+   * corresponding generated GAPIC client. Keys are fully-qualified
+   * service names as they appear in the protobuf (including the full
+   * the language_settings.java.interface_names" field in gapic.yaml. API
+   * teams should otherwise use the service name as it appears in the
+   * protobuf.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      service_class_names:
+   *        - google.pubsub.v1.Publisher: TopicAdmin
+   *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+   * 
+ * + * map<string, string> service_class_names = 2; + */ + @java.lang.Override + public boolean containsServiceClassNames(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetServiceClassNames().getMap().containsKey(key); + } + /** Use {@link #getServiceClassNamesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getServiceClassNames() { + return getServiceClassNamesMap(); + } + /** + * + * + *
+   * Configure the Java class name to use instead of the service's for its
+   * corresponding generated GAPIC client. Keys are fully-qualified
+   * service names as they appear in the protobuf (including the full
+   * the language_settings.java.interface_names" field in gapic.yaml. API
+   * teams should otherwise use the service name as it appears in the
+   * protobuf.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      service_class_names:
+   *        - google.pubsub.v1.Publisher: TopicAdmin
+   *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+   * 
+ * + * map<string, string> service_class_names = 2; + */ + @java.lang.Override + public java.util.Map getServiceClassNamesMap() { + return internalGetServiceClassNames().getMap(); + } + /** + * + * + *
+   * Configure the Java class name to use instead of the service's for its
+   * corresponding generated GAPIC client. Keys are fully-qualified
+   * service names as they appear in the protobuf (including the full
+   * the language_settings.java.interface_names" field in gapic.yaml. API
+   * teams should otherwise use the service name as it appears in the
+   * protobuf.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      service_class_names:
+   *        - google.pubsub.v1.Publisher: TopicAdmin
+   *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+   * 
+ * + * map<string, string> service_class_names = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getServiceClassNamesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetServiceClassNames().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Configure the Java class name to use instead of the service's for its
+   * corresponding generated GAPIC client. Keys are fully-qualified
+   * service names as they appear in the protobuf (including the full
+   * the language_settings.java.interface_names" field in gapic.yaml. API
+   * teams should otherwise use the service name as it appears in the
+   * protobuf.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      service_class_names:
+   *        - google.pubsub.v1.Publisher: TopicAdmin
+   *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+   * 
+ * + * map<string, string> service_class_names = 2; + */ + @java.lang.Override + public java.lang.String getServiceClassNamesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetServiceClassNames().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int COMMON_FIELD_NUMBER = 3; + private com.google.api.CommonLanguageSettings common_; + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 3; + * + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 3; + * + * @return The common. + */ + @java.lang.Override + public com.google.api.CommonLanguageSettings getCommon() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 3; + */ + @java.lang.Override + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + + 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(libraryPackage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, libraryPackage_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetServiceClassNames(), + ServiceClassNamesDefaultEntryHolder.defaultEntry, + 2); + if (common_ != null) { + output.writeMessage(3, getCommon()); + } + 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(libraryPackage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, libraryPackage_); + } + for (java.util.Map.Entry entry : + internalGetServiceClassNames().getMap().entrySet()) { + com.google.protobuf.MapEntry serviceClassNames__ = + ServiceClassNamesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, serviceClassNames__); + } + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCommon()); + } + 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.api.JavaSettings)) { + return super.equals(obj); + } + com.google.api.JavaSettings other = (com.google.api.JavaSettings) obj; + + if (!getLibraryPackage().equals(other.getLibraryPackage())) return false; + if (!internalGetServiceClassNames().equals(other.internalGetServiceClassNames())) return false; + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon().equals(other.getCommon())) 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) + LIBRARY_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getLibraryPackage().hashCode(); + if (!internalGetServiceClassNames().getMap().isEmpty()) { + hash = (37 * hash) + SERVICE_CLASS_NAMES_FIELD_NUMBER; + hash = (53 * hash) + internalGetServiceClassNames().hashCode(); + } + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.JavaSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.JavaSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.JavaSettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.JavaSettings 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.api.JavaSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.JavaSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.JavaSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.JavaSettings 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.api.JavaSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.JavaSettings 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.api.JavaSettings parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.JavaSettings 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.api.JavaSettings 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; + } + /** + * + * + *
+   * Settings for Java client libraries.
+   * 
+ * + * Protobuf type {@code google.api.JavaSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.JavaSettings) + com.google.api.JavaSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_JavaSettings_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetServiceClassNames(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableServiceClassNames(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_JavaSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.JavaSettings.class, com.google.api.JavaSettings.Builder.class); + } + + // Construct using com.google.api.JavaSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + libraryPackage_ = ""; + internalGetMutableServiceClassNames().clear(); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto.internal_static_google_api_JavaSettings_descriptor; + } + + @java.lang.Override + public com.google.api.JavaSettings getDefaultInstanceForType() { + return com.google.api.JavaSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.JavaSettings build() { + com.google.api.JavaSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.JavaSettings buildPartial() { + com.google.api.JavaSettings result = new com.google.api.JavaSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.JavaSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.libraryPackage_ = libraryPackage_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceClassNames_ = internalGetServiceClassNames(); + result.serviceClassNames_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.common_ = commonBuilder_ == null ? common_ : commonBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.JavaSettings) { + return mergeFrom((com.google.api.JavaSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.JavaSettings other) { + if (other == com.google.api.JavaSettings.getDefaultInstance()) return this; + if (!other.getLibraryPackage().isEmpty()) { + libraryPackage_ = other.libraryPackage_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableServiceClassNames().mergeFrom(other.internalGetServiceClassNames()); + bitField0_ |= 0x00000002; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + 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: + { + libraryPackage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry + serviceClassNames__ = + input.readMessage( + ServiceClassNamesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableServiceClassNames() + .getMutableMap() + .put(serviceClassNames__.getKey(), serviceClassNames__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCommonFieldBuilder().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 libraryPackage_ = ""; + /** + * + * + *
+     * The package name to use in Java. Clobbers the java_package option
+     * set in the protobuf. This should be used **only** by APIs
+     * who have already set the language_settings.java.package_name" field
+     * in gapic.yaml. API teams should use the protobuf java_package option
+     * where possible.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      library_package: com.google.cloud.pubsub.v1
+     * 
+ * + * string library_package = 1; + * + * @return The libraryPackage. + */ + public java.lang.String getLibraryPackage() { + java.lang.Object ref = libraryPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + libraryPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The package name to use in Java. Clobbers the java_package option
+     * set in the protobuf. This should be used **only** by APIs
+     * who have already set the language_settings.java.package_name" field
+     * in gapic.yaml. API teams should use the protobuf java_package option
+     * where possible.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      library_package: com.google.cloud.pubsub.v1
+     * 
+ * + * string library_package = 1; + * + * @return The bytes for libraryPackage. + */ + public com.google.protobuf.ByteString getLibraryPackageBytes() { + java.lang.Object ref = libraryPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + libraryPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The package name to use in Java. Clobbers the java_package option
+     * set in the protobuf. This should be used **only** by APIs
+     * who have already set the language_settings.java.package_name" field
+     * in gapic.yaml. API teams should use the protobuf java_package option
+     * where possible.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      library_package: com.google.cloud.pubsub.v1
+     * 
+ * + * string library_package = 1; + * + * @param value The libraryPackage to set. + * @return This builder for chaining. + */ + public Builder setLibraryPackage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + libraryPackage_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The package name to use in Java. Clobbers the java_package option
+     * set in the protobuf. This should be used **only** by APIs
+     * who have already set the language_settings.java.package_name" field
+     * in gapic.yaml. API teams should use the protobuf java_package option
+     * where possible.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      library_package: com.google.cloud.pubsub.v1
+     * 
+ * + * string library_package = 1; + * + * @return This builder for chaining. + */ + public Builder clearLibraryPackage() { + libraryPackage_ = getDefaultInstance().getLibraryPackage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The package name to use in Java. Clobbers the java_package option
+     * set in the protobuf. This should be used **only** by APIs
+     * who have already set the language_settings.java.package_name" field
+     * in gapic.yaml. API teams should use the protobuf java_package option
+     * where possible.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      library_package: com.google.cloud.pubsub.v1
+     * 
+ * + * string library_package = 1; + * + * @param value The bytes for libraryPackage to set. + * @return This builder for chaining. + */ + public Builder setLibraryPackageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + libraryPackage_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField serviceClassNames_; + + private com.google.protobuf.MapField + internalGetServiceClassNames() { + if (serviceClassNames_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ServiceClassNamesDefaultEntryHolder.defaultEntry); + } + return serviceClassNames_; + } + + private com.google.protobuf.MapField + internalGetMutableServiceClassNames() { + if (serviceClassNames_ == null) { + serviceClassNames_ = + com.google.protobuf.MapField.newMapField( + ServiceClassNamesDefaultEntryHolder.defaultEntry); + } + if (!serviceClassNames_.isMutable()) { + serviceClassNames_ = serviceClassNames_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return serviceClassNames_; + } + + public int getServiceClassNamesCount() { + return internalGetServiceClassNames().getMap().size(); + } + /** + * + * + *
+     * Configure the Java class name to use instead of the service's for its
+     * corresponding generated GAPIC client. Keys are fully-qualified
+     * service names as they appear in the protobuf (including the full
+     * the language_settings.java.interface_names" field in gapic.yaml. API
+     * teams should otherwise use the service name as it appears in the
+     * protobuf.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      service_class_names:
+     *        - google.pubsub.v1.Publisher: TopicAdmin
+     *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+     * 
+ * + * map<string, string> service_class_names = 2; + */ + @java.lang.Override + public boolean containsServiceClassNames(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetServiceClassNames().getMap().containsKey(key); + } + /** Use {@link #getServiceClassNamesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getServiceClassNames() { + return getServiceClassNamesMap(); + } + /** + * + * + *
+     * Configure the Java class name to use instead of the service's for its
+     * corresponding generated GAPIC client. Keys are fully-qualified
+     * service names as they appear in the protobuf (including the full
+     * the language_settings.java.interface_names" field in gapic.yaml. API
+     * teams should otherwise use the service name as it appears in the
+     * protobuf.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      service_class_names:
+     *        - google.pubsub.v1.Publisher: TopicAdmin
+     *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+     * 
+ * + * map<string, string> service_class_names = 2; + */ + @java.lang.Override + public java.util.Map getServiceClassNamesMap() { + return internalGetServiceClassNames().getMap(); + } + /** + * + * + *
+     * Configure the Java class name to use instead of the service's for its
+     * corresponding generated GAPIC client. Keys are fully-qualified
+     * service names as they appear in the protobuf (including the full
+     * the language_settings.java.interface_names" field in gapic.yaml. API
+     * teams should otherwise use the service name as it appears in the
+     * protobuf.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      service_class_names:
+     *        - google.pubsub.v1.Publisher: TopicAdmin
+     *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+     * 
+ * + * map<string, string> service_class_names = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getServiceClassNamesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetServiceClassNames().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Configure the Java class name to use instead of the service's for its
+     * corresponding generated GAPIC client. Keys are fully-qualified
+     * service names as they appear in the protobuf (including the full
+     * the language_settings.java.interface_names" field in gapic.yaml. API
+     * teams should otherwise use the service name as it appears in the
+     * protobuf.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      service_class_names:
+     *        - google.pubsub.v1.Publisher: TopicAdmin
+     *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+     * 
+ * + * map<string, string> service_class_names = 2; + */ + @java.lang.Override + public java.lang.String getServiceClassNamesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetServiceClassNames().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearServiceClassNames() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableServiceClassNames().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Configure the Java class name to use instead of the service's for its
+     * corresponding generated GAPIC client. Keys are fully-qualified
+     * service names as they appear in the protobuf (including the full
+     * the language_settings.java.interface_names" field in gapic.yaml. API
+     * teams should otherwise use the service name as it appears in the
+     * protobuf.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      service_class_names:
+     *        - google.pubsub.v1.Publisher: TopicAdmin
+     *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+     * 
+ * + * map<string, string> service_class_names = 2; + */ + public Builder removeServiceClassNames(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableServiceClassNames().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableServiceClassNames() { + bitField0_ |= 0x00000002; + return internalGetMutableServiceClassNames().getMutableMap(); + } + /** + * + * + *
+     * Configure the Java class name to use instead of the service's for its
+     * corresponding generated GAPIC client. Keys are fully-qualified
+     * service names as they appear in the protobuf (including the full
+     * the language_settings.java.interface_names" field in gapic.yaml. API
+     * teams should otherwise use the service name as it appears in the
+     * protobuf.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      service_class_names:
+     *        - google.pubsub.v1.Publisher: TopicAdmin
+     *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+     * 
+ * + * map<string, string> service_class_names = 2; + */ + public Builder putServiceClassNames(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableServiceClassNames().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * Configure the Java class name to use instead of the service's for its
+     * corresponding generated GAPIC client. Keys are fully-qualified
+     * service names as they appear in the protobuf (including the full
+     * the language_settings.java.interface_names" field in gapic.yaml. API
+     * teams should otherwise use the service name as it appears in the
+     * protobuf.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    java_settings:
+     *      service_class_names:
+     *        - google.pubsub.v1.Publisher: TopicAdmin
+     *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+     * 
+ * + * map<string, string> service_class_names = 2; + */ + public Builder putAllServiceClassNames( + java.util.Map values) { + internalGetMutableServiceClassNames().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.api.CommonLanguageSettings common_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + commonBuilder_; + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 3; + * + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 3; + * + * @return The common. + */ + public com.google.api.CommonLanguageSettings getCommon() { + if (commonBuilder_ == null) { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 3; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 3; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 3; + */ + public Builder mergeCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && common_ != null + && common_ != com.google.api.CommonLanguageSettings.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 3; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000004); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 3; + */ + public com.google.api.CommonLanguageSettings.Builder getCommonBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 3; + */ + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder>( + getCommon(), getParentForChildren(), isClean()); + common_ = null; + } + return commonBuilder_; + } + + @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.api.JavaSettings) + } + + // @@protoc_insertion_point(class_scope:google.api.JavaSettings) + private static final com.google.api.JavaSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.JavaSettings(); + } + + public static com.google.api.JavaSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JavaSettings 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.api.JavaSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JavaSettingsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JavaSettingsOrBuilder.java new file mode 100644 index 000000000000..06bafb381f4d --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JavaSettingsOrBuilder.java @@ -0,0 +1,228 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface JavaSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.JavaSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The package name to use in Java. Clobbers the java_package option
+   * set in the protobuf. This should be used **only** by APIs
+   * who have already set the language_settings.java.package_name" field
+   * in gapic.yaml. API teams should use the protobuf java_package option
+   * where possible.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      library_package: com.google.cloud.pubsub.v1
+   * 
+ * + * string library_package = 1; + * + * @return The libraryPackage. + */ + java.lang.String getLibraryPackage(); + /** + * + * + *
+   * The package name to use in Java. Clobbers the java_package option
+   * set in the protobuf. This should be used **only** by APIs
+   * who have already set the language_settings.java.package_name" field
+   * in gapic.yaml. API teams should use the protobuf java_package option
+   * where possible.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      library_package: com.google.cloud.pubsub.v1
+   * 
+ * + * string library_package = 1; + * + * @return The bytes for libraryPackage. + */ + com.google.protobuf.ByteString getLibraryPackageBytes(); + + /** + * + * + *
+   * Configure the Java class name to use instead of the service's for its
+   * corresponding generated GAPIC client. Keys are fully-qualified
+   * service names as they appear in the protobuf (including the full
+   * the language_settings.java.interface_names" field in gapic.yaml. API
+   * teams should otherwise use the service name as it appears in the
+   * protobuf.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      service_class_names:
+   *        - google.pubsub.v1.Publisher: TopicAdmin
+   *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+   * 
+ * + * map<string, string> service_class_names = 2; + */ + int getServiceClassNamesCount(); + /** + * + * + *
+   * Configure the Java class name to use instead of the service's for its
+   * corresponding generated GAPIC client. Keys are fully-qualified
+   * service names as they appear in the protobuf (including the full
+   * the language_settings.java.interface_names" field in gapic.yaml. API
+   * teams should otherwise use the service name as it appears in the
+   * protobuf.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      service_class_names:
+   *        - google.pubsub.v1.Publisher: TopicAdmin
+   *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+   * 
+ * + * map<string, string> service_class_names = 2; + */ + boolean containsServiceClassNames(java.lang.String key); + /** Use {@link #getServiceClassNamesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getServiceClassNames(); + /** + * + * + *
+   * Configure the Java class name to use instead of the service's for its
+   * corresponding generated GAPIC client. Keys are fully-qualified
+   * service names as they appear in the protobuf (including the full
+   * the language_settings.java.interface_names" field in gapic.yaml. API
+   * teams should otherwise use the service name as it appears in the
+   * protobuf.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      service_class_names:
+   *        - google.pubsub.v1.Publisher: TopicAdmin
+   *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+   * 
+ * + * map<string, string> service_class_names = 2; + */ + java.util.Map getServiceClassNamesMap(); + /** + * + * + *
+   * Configure the Java class name to use instead of the service's for its
+   * corresponding generated GAPIC client. Keys are fully-qualified
+   * service names as they appear in the protobuf (including the full
+   * the language_settings.java.interface_names" field in gapic.yaml. API
+   * teams should otherwise use the service name as it appears in the
+   * protobuf.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      service_class_names:
+   *        - google.pubsub.v1.Publisher: TopicAdmin
+   *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+   * 
+ * + * map<string, string> service_class_names = 2; + */ + /* nullable */ + java.lang.String getServiceClassNamesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Configure the Java class name to use instead of the service's for its
+   * corresponding generated GAPIC client. Keys are fully-qualified
+   * service names as they appear in the protobuf (including the full
+   * the language_settings.java.interface_names" field in gapic.yaml. API
+   * teams should otherwise use the service name as it appears in the
+   * protobuf.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    java_settings:
+   *      service_class_names:
+   *        - google.pubsub.v1.Publisher: TopicAdmin
+   *        - google.pubsub.v1.Subscriber: SubscriptionAdmin
+   * 
+ * + * map<string, string> service_class_names = 2; + */ + java.lang.String getServiceClassNamesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 3; + * + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 3; + * + * @return The common. + */ + com.google.api.CommonLanguageSettings getCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 3; + */ + com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JwtLocation.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JwtLocation.java new file mode 100644 index 000000000000..77747e700a11 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JwtLocation.java @@ -0,0 +1,1444 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * + * + *
+ * Specifies a location to extract JWT from an API request.
+ * 
+ * + * Protobuf type {@code google.api.JwtLocation} + */ +public final class JwtLocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.JwtLocation) + JwtLocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use JwtLocation.newBuilder() to construct. + private JwtLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private JwtLocation() { + valuePrefix_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new JwtLocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_JwtLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_JwtLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.JwtLocation.class, com.google.api.JwtLocation.Builder.class); + } + + private int inCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object in_; + + public enum InCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + HEADER(1), + QUERY(2), + COOKIE(4), + IN_NOT_SET(0); + private final int value; + + private InCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InCase valueOf(int value) { + return forNumber(value); + } + + public static InCase forNumber(int value) { + switch (value) { + case 1: + return HEADER; + case 2: + return QUERY; + case 4: + return COOKIE; + case 0: + return IN_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InCase getInCase() { + return InCase.forNumber(inCase_); + } + + public static final int HEADER_FIELD_NUMBER = 1; + /** + * + * + *
+   * Specifies HTTP header name to extract JWT token.
+   * 
+ * + * string header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return inCase_ == 1; + } + /** + * + * + *
+   * Specifies HTTP header name to extract JWT token.
+   * 
+ * + * string header = 1; + * + * @return The header. + */ + public java.lang.String getHeader() { + java.lang.Object ref = ""; + if (inCase_ == 1) { + ref = in_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (inCase_ == 1) { + in_ = s; + } + return s; + } + } + /** + * + * + *
+   * Specifies HTTP header name to extract JWT token.
+   * 
+ * + * string header = 1; + * + * @return The bytes for header. + */ + public com.google.protobuf.ByteString getHeaderBytes() { + java.lang.Object ref = ""; + if (inCase_ == 1) { + ref = in_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (inCase_ == 1) { + in_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + /** + * + * + *
+   * Specifies URL query parameter name to extract JWT token.
+   * 
+ * + * string query = 2; + * + * @return Whether the query field is set. + */ + public boolean hasQuery() { + return inCase_ == 2; + } + /** + * + * + *
+   * Specifies URL query parameter name to extract JWT token.
+   * 
+ * + * string query = 2; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = ""; + if (inCase_ == 2) { + ref = in_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (inCase_ == 2) { + in_ = s; + } + return s; + } + } + /** + * + * + *
+   * Specifies URL query parameter name to extract JWT token.
+   * 
+ * + * string query = 2; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = ""; + if (inCase_ == 2) { + ref = in_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (inCase_ == 2) { + in_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COOKIE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Specifies cookie name to extract JWT token.
+   * 
+ * + * string cookie = 4; + * + * @return Whether the cookie field is set. + */ + public boolean hasCookie() { + return inCase_ == 4; + } + /** + * + * + *
+   * Specifies cookie name to extract JWT token.
+   * 
+ * + * string cookie = 4; + * + * @return The cookie. + */ + public java.lang.String getCookie() { + java.lang.Object ref = ""; + if (inCase_ == 4) { + ref = in_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (inCase_ == 4) { + in_ = s; + } + return s; + } + } + /** + * + * + *
+   * Specifies cookie name to extract JWT token.
+   * 
+ * + * string cookie = 4; + * + * @return The bytes for cookie. + */ + public com.google.protobuf.ByteString getCookieBytes() { + java.lang.Object ref = ""; + if (inCase_ == 4) { + ref = in_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (inCase_ == 4) { + in_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_PREFIX_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object valuePrefix_ = ""; + /** + * + * + *
+   * The value prefix. The value format is "value_prefix{token}"
+   * Only applies to "in" header type. Must be empty for "in" query type.
+   * If not empty, the header value has to match (case sensitive) this prefix.
+   * If not matched, JWT will not be extracted. If matched, JWT will be
+   * extracted after the prefix is removed.
+   *
+   * For example, for "Authorization: Bearer {JWT}",
+   * value_prefix="Bearer " with a space at the end.
+   * 
+ * + * string value_prefix = 3; + * + * @return The valuePrefix. + */ + @java.lang.Override + public java.lang.String getValuePrefix() { + java.lang.Object ref = valuePrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valuePrefix_ = s; + return s; + } + } + /** + * + * + *
+   * The value prefix. The value format is "value_prefix{token}"
+   * Only applies to "in" header type. Must be empty for "in" query type.
+   * If not empty, the header value has to match (case sensitive) this prefix.
+   * If not matched, JWT will not be extracted. If matched, JWT will be
+   * extracted after the prefix is removed.
+   *
+   * For example, for "Authorization: Bearer {JWT}",
+   * value_prefix="Bearer " with a space at the end.
+   * 
+ * + * string value_prefix = 3; + * + * @return The bytes for valuePrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValuePrefixBytes() { + java.lang.Object ref = valuePrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + valuePrefix_ = 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 (inCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, in_); + } + if (inCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, in_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valuePrefix_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, valuePrefix_); + } + if (inCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, in_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, in_); + } + if (inCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, in_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(valuePrefix_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, valuePrefix_); + } + if (inCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, in_); + } + 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.api.JwtLocation)) { + return super.equals(obj); + } + com.google.api.JwtLocation other = (com.google.api.JwtLocation) obj; + + if (!getValuePrefix().equals(other.getValuePrefix())) return false; + if (!getInCase().equals(other.getInCase())) return false; + switch (inCase_) { + case 1: + if (!getHeader().equals(other.getHeader())) return false; + break; + case 2: + if (!getQuery().equals(other.getQuery())) return false; + break; + case 4: + if (!getCookie().equals(other.getCookie())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getValuePrefix().hashCode(); + switch (inCase_) { + case 1: + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + break; + case 2: + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + break; + case 4: + hash = (37 * hash) + COOKIE_FIELD_NUMBER; + hash = (53 * hash) + getCookie().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.JwtLocation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.JwtLocation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.JwtLocation parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.JwtLocation 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.api.JwtLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.JwtLocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.JwtLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.JwtLocation 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.api.JwtLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.JwtLocation 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.api.JwtLocation parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.JwtLocation 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.api.JwtLocation 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; + } + /** + * + * + *
+   * Specifies a location to extract JWT from an API request.
+   * 
+ * + * Protobuf type {@code google.api.JwtLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.JwtLocation) + com.google.api.JwtLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_JwtLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_JwtLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.JwtLocation.class, com.google.api.JwtLocation.Builder.class); + } + + // Construct using com.google.api.JwtLocation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valuePrefix_ = ""; + inCase_ = 0; + in_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_JwtLocation_descriptor; + } + + @java.lang.Override + public com.google.api.JwtLocation getDefaultInstanceForType() { + return com.google.api.JwtLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.JwtLocation build() { + com.google.api.JwtLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.JwtLocation buildPartial() { + com.google.api.JwtLocation result = new com.google.api.JwtLocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.JwtLocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.valuePrefix_ = valuePrefix_; + } + } + + private void buildPartialOneofs(com.google.api.JwtLocation result) { + result.inCase_ = inCase_; + result.in_ = this.in_; + } + + @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.api.JwtLocation) { + return mergeFrom((com.google.api.JwtLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.JwtLocation other) { + if (other == com.google.api.JwtLocation.getDefaultInstance()) return this; + if (!other.getValuePrefix().isEmpty()) { + valuePrefix_ = other.valuePrefix_; + bitField0_ |= 0x00000008; + onChanged(); + } + switch (other.getInCase()) { + case HEADER: + { + inCase_ = 1; + in_ = other.in_; + onChanged(); + break; + } + case QUERY: + { + inCase_ = 2; + in_ = other.in_; + onChanged(); + break; + } + case COOKIE: + { + inCase_ = 4; + in_ = other.in_; + onChanged(); + break; + } + case IN_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + inCase_ = 1; + in_ = s; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + inCase_ = 2; + in_ = s; + break; + } // case 18 + case 26: + { + valuePrefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + inCase_ = 4; + in_ = s; + 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 inCase_ = 0; + private java.lang.Object in_; + + public InCase getInCase() { + return InCase.forNumber(inCase_); + } + + public Builder clearIn() { + inCase_ = 0; + in_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Specifies HTTP header name to extract JWT token.
+     * 
+ * + * string header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return inCase_ == 1; + } + /** + * + * + *
+     * Specifies HTTP header name to extract JWT token.
+     * 
+ * + * string header = 1; + * + * @return The header. + */ + @java.lang.Override + public java.lang.String getHeader() { + java.lang.Object ref = ""; + if (inCase_ == 1) { + ref = in_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (inCase_ == 1) { + in_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies HTTP header name to extract JWT token.
+     * 
+ * + * string header = 1; + * + * @return The bytes for header. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHeaderBytes() { + java.lang.Object ref = ""; + if (inCase_ == 1) { + ref = in_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (inCase_ == 1) { + in_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies HTTP header name to extract JWT token.
+     * 
+ * + * string header = 1; + * + * @param value The header to set. + * @return This builder for chaining. + */ + public Builder setHeader(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + inCase_ = 1; + in_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies HTTP header name to extract JWT token.
+     * 
+ * + * string header = 1; + * + * @return This builder for chaining. + */ + public Builder clearHeader() { + if (inCase_ == 1) { + inCase_ = 0; + in_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Specifies HTTP header name to extract JWT token.
+     * 
+ * + * string header = 1; + * + * @param value The bytes for header to set. + * @return This builder for chaining. + */ + public Builder setHeaderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + inCase_ = 1; + in_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies URL query parameter name to extract JWT token.
+     * 
+ * + * string query = 2; + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return inCase_ == 2; + } + /** + * + * + *
+     * Specifies URL query parameter name to extract JWT token.
+     * 
+ * + * string query = 2; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = ""; + if (inCase_ == 2) { + ref = in_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (inCase_ == 2) { + in_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies URL query parameter name to extract JWT token.
+     * 
+ * + * string query = 2; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = ""; + if (inCase_ == 2) { + ref = in_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (inCase_ == 2) { + in_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies URL query parameter name to extract JWT token.
+     * 
+ * + * string query = 2; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + inCase_ = 2; + in_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies URL query parameter name to extract JWT token.
+     * 
+ * + * string query = 2; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + if (inCase_ == 2) { + inCase_ = 0; + in_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Specifies URL query parameter name to extract JWT token.
+     * 
+ * + * string query = 2; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + inCase_ = 2; + in_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies cookie name to extract JWT token.
+     * 
+ * + * string cookie = 4; + * + * @return Whether the cookie field is set. + */ + @java.lang.Override + public boolean hasCookie() { + return inCase_ == 4; + } + /** + * + * + *
+     * Specifies cookie name to extract JWT token.
+     * 
+ * + * string cookie = 4; + * + * @return The cookie. + */ + @java.lang.Override + public java.lang.String getCookie() { + java.lang.Object ref = ""; + if (inCase_ == 4) { + ref = in_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (inCase_ == 4) { + in_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies cookie name to extract JWT token.
+     * 
+ * + * string cookie = 4; + * + * @return The bytes for cookie. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCookieBytes() { + java.lang.Object ref = ""; + if (inCase_ == 4) { + ref = in_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (inCase_ == 4) { + in_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies cookie name to extract JWT token.
+     * 
+ * + * string cookie = 4; + * + * @param value The cookie to set. + * @return This builder for chaining. + */ + public Builder setCookie(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + inCase_ = 4; + in_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies cookie name to extract JWT token.
+     * 
+ * + * string cookie = 4; + * + * @return This builder for chaining. + */ + public Builder clearCookie() { + if (inCase_ == 4) { + inCase_ = 0; + in_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Specifies cookie name to extract JWT token.
+     * 
+ * + * string cookie = 4; + * + * @param value The bytes for cookie to set. + * @return This builder for chaining. + */ + public Builder setCookieBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + inCase_ = 4; + in_ = value; + onChanged(); + return this; + } + + private java.lang.Object valuePrefix_ = ""; + /** + * + * + *
+     * The value prefix. The value format is "value_prefix{token}"
+     * Only applies to "in" header type. Must be empty for "in" query type.
+     * If not empty, the header value has to match (case sensitive) this prefix.
+     * If not matched, JWT will not be extracted. If matched, JWT will be
+     * extracted after the prefix is removed.
+     *
+     * For example, for "Authorization: Bearer {JWT}",
+     * value_prefix="Bearer " with a space at the end.
+     * 
+ * + * string value_prefix = 3; + * + * @return The valuePrefix. + */ + public java.lang.String getValuePrefix() { + java.lang.Object ref = valuePrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valuePrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The value prefix. The value format is "value_prefix{token}"
+     * Only applies to "in" header type. Must be empty for "in" query type.
+     * If not empty, the header value has to match (case sensitive) this prefix.
+     * If not matched, JWT will not be extracted. If matched, JWT will be
+     * extracted after the prefix is removed.
+     *
+     * For example, for "Authorization: Bearer {JWT}",
+     * value_prefix="Bearer " with a space at the end.
+     * 
+ * + * string value_prefix = 3; + * + * @return The bytes for valuePrefix. + */ + public com.google.protobuf.ByteString getValuePrefixBytes() { + java.lang.Object ref = valuePrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + valuePrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The value prefix. The value format is "value_prefix{token}"
+     * Only applies to "in" header type. Must be empty for "in" query type.
+     * If not empty, the header value has to match (case sensitive) this prefix.
+     * If not matched, JWT will not be extracted. If matched, JWT will be
+     * extracted after the prefix is removed.
+     *
+     * For example, for "Authorization: Bearer {JWT}",
+     * value_prefix="Bearer " with a space at the end.
+     * 
+ * + * string value_prefix = 3; + * + * @param value The valuePrefix to set. + * @return This builder for chaining. + */ + public Builder setValuePrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valuePrefix_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The value prefix. The value format is "value_prefix{token}"
+     * Only applies to "in" header type. Must be empty for "in" query type.
+     * If not empty, the header value has to match (case sensitive) this prefix.
+     * If not matched, JWT will not be extracted. If matched, JWT will be
+     * extracted after the prefix is removed.
+     *
+     * For example, for "Authorization: Bearer {JWT}",
+     * value_prefix="Bearer " with a space at the end.
+     * 
+ * + * string value_prefix = 3; + * + * @return This builder for chaining. + */ + public Builder clearValuePrefix() { + valuePrefix_ = getDefaultInstance().getValuePrefix(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The value prefix. The value format is "value_prefix{token}"
+     * Only applies to "in" header type. Must be empty for "in" query type.
+     * If not empty, the header value has to match (case sensitive) this prefix.
+     * If not matched, JWT will not be extracted. If matched, JWT will be
+     * extracted after the prefix is removed.
+     *
+     * For example, for "Authorization: Bearer {JWT}",
+     * value_prefix="Bearer " with a space at the end.
+     * 
+ * + * string value_prefix = 3; + * + * @param value The bytes for valuePrefix to set. + * @return This builder for chaining. + */ + public Builder setValuePrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valuePrefix_ = 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.api.JwtLocation) + } + + // @@protoc_insertion_point(class_scope:google.api.JwtLocation) + private static final com.google.api.JwtLocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.JwtLocation(); + } + + public static com.google.api.JwtLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JwtLocation 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.api.JwtLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JwtLocationOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JwtLocationOrBuilder.java new file mode 100644 index 000000000000..e201fc10b099 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/JwtLocationOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface JwtLocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.JwtLocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Specifies HTTP header name to extract JWT token.
+   * 
+ * + * string header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * Specifies HTTP header name to extract JWT token.
+   * 
+ * + * string header = 1; + * + * @return The header. + */ + java.lang.String getHeader(); + /** + * + * + *
+   * Specifies HTTP header name to extract JWT token.
+   * 
+ * + * string header = 1; + * + * @return The bytes for header. + */ + com.google.protobuf.ByteString getHeaderBytes(); + + /** + * + * + *
+   * Specifies URL query parameter name to extract JWT token.
+   * 
+ * + * string query = 2; + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + /** + * + * + *
+   * Specifies URL query parameter name to extract JWT token.
+   * 
+ * + * string query = 2; + * + * @return The query. + */ + java.lang.String getQuery(); + /** + * + * + *
+   * Specifies URL query parameter name to extract JWT token.
+   * 
+ * + * string query = 2; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * Specifies cookie name to extract JWT token.
+   * 
+ * + * string cookie = 4; + * + * @return Whether the cookie field is set. + */ + boolean hasCookie(); + /** + * + * + *
+   * Specifies cookie name to extract JWT token.
+   * 
+ * + * string cookie = 4; + * + * @return The cookie. + */ + java.lang.String getCookie(); + /** + * + * + *
+   * Specifies cookie name to extract JWT token.
+   * 
+ * + * string cookie = 4; + * + * @return The bytes for cookie. + */ + com.google.protobuf.ByteString getCookieBytes(); + + /** + * + * + *
+   * The value prefix. The value format is "value_prefix{token}"
+   * Only applies to "in" header type. Must be empty for "in" query type.
+   * If not empty, the header value has to match (case sensitive) this prefix.
+   * If not matched, JWT will not be extracted. If matched, JWT will be
+   * extracted after the prefix is removed.
+   *
+   * For example, for "Authorization: Bearer {JWT}",
+   * value_prefix="Bearer " with a space at the end.
+   * 
+ * + * string value_prefix = 3; + * + * @return The valuePrefix. + */ + java.lang.String getValuePrefix(); + /** + * + * + *
+   * The value prefix. The value format is "value_prefix{token}"
+   * Only applies to "in" header type. Must be empty for "in" query type.
+   * If not empty, the header value has to match (case sensitive) this prefix.
+   * If not matched, JWT will not be extracted. If matched, JWT will be
+   * extracted after the prefix is removed.
+   *
+   * For example, for "Authorization: Bearer {JWT}",
+   * value_prefix="Bearer " with a space at the end.
+   * 
+ * + * string value_prefix = 3; + * + * @return The bytes for valuePrefix. + */ + com.google.protobuf.ByteString getValuePrefixBytes(); + + com.google.api.JwtLocation.InCase getInCase(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LabelDescriptor.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LabelDescriptor.java new file mode 100644 index 000000000000..47c2cb7f75f7 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LabelDescriptor.java @@ -0,0 +1,1100 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/label.proto + +package com.google.api; + +/** + * + * + *
+ * A description of a label.
+ * 
+ * + * Protobuf type {@code google.api.LabelDescriptor} + */ +public final class LabelDescriptor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.LabelDescriptor) + LabelDescriptorOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelDescriptor.newBuilder() to construct. + private LabelDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelDescriptor() { + key_ = ""; + valueType_ = 0; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LabelDescriptor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.LabelDescriptor.class, com.google.api.LabelDescriptor.Builder.class); + } + + /** + * + * + *
+   * Value types that can be used as label values.
+   * 
+ * + * Protobuf enum {@code google.api.LabelDescriptor.ValueType} + */ + public enum ValueType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * A variable-length string. This is the default.
+     * 
+ * + * STRING = 0; + */ + STRING(0), + /** + * + * + *
+     * Boolean; true or false.
+     * 
+ * + * BOOL = 1; + */ + BOOL(1), + /** + * + * + *
+     * A 64-bit signed integer.
+     * 
+ * + * INT64 = 2; + */ + INT64(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * A variable-length string. This is the default.
+     * 
+ * + * STRING = 0; + */ + public static final int STRING_VALUE = 0; + /** + * + * + *
+     * Boolean; true or false.
+     * 
+ * + * BOOL = 1; + */ + public static final int BOOL_VALUE = 1; + /** + * + * + *
+     * A 64-bit signed integer.
+     * 
+ * + * INT64 = 2; + */ + public static final int INT64_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 ValueType 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 ValueType forNumber(int value) { + switch (value) { + case 0: + return STRING; + case 1: + return BOOL; + case 2: + return INT64; + 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 ValueType findValueByNumber(int number) { + return ValueType.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.api.LabelDescriptor.getDescriptor().getEnumTypes().get(0); + } + + private static final ValueType[] VALUES = values(); + + public static ValueType 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 ValueType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.LabelDescriptor.ValueType) + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+   * The label key.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * + * + *
+   * The label key.
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_TYPE_FIELD_NUMBER = 2; + private int valueType_ = 0; + /** + * + * + *
+   * The type of data that can be assigned to the label.
+   * 
+ * + * .google.api.LabelDescriptor.ValueType value_type = 2; + * + * @return The enum numeric value on the wire for valueType. + */ + @java.lang.Override + public int getValueTypeValue() { + return valueType_; + } + /** + * + * + *
+   * The type of data that can be assigned to the label.
+   * 
+ * + * .google.api.LabelDescriptor.ValueType value_type = 2; + * + * @return The valueType. + */ + @java.lang.Override + public com.google.api.LabelDescriptor.ValueType getValueType() { + com.google.api.LabelDescriptor.ValueType result = + com.google.api.LabelDescriptor.ValueType.forNumber(valueType_); + return result == null ? com.google.api.LabelDescriptor.ValueType.UNRECOGNIZED : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A human-readable description for the label.
+   * 
+ * + * string description = 3; + * + * @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; + } + } + /** + * + * + *
+   * A human-readable description for the label.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (valueType_ != com.google.api.LabelDescriptor.ValueType.STRING.getNumber()) { + output.writeEnum(2, valueType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + 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(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (valueType_ != com.google.api.LabelDescriptor.ValueType.STRING.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, valueType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.LabelDescriptor)) { + return super.equals(obj); + } + com.google.api.LabelDescriptor other = (com.google.api.LabelDescriptor) obj; + + if (!getKey().equals(other.getKey())) return false; + if (valueType_ != other.valueType_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + valueType_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.LabelDescriptor parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.LabelDescriptor parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.LabelDescriptor parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.LabelDescriptor 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.api.LabelDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.LabelDescriptor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.LabelDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.LabelDescriptor 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.api.LabelDescriptor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.LabelDescriptor 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.api.LabelDescriptor parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.LabelDescriptor 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.api.LabelDescriptor 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 description of a label.
+   * 
+ * + * Protobuf type {@code google.api.LabelDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.LabelDescriptor) + com.google.api.LabelDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.LabelDescriptor.class, com.google.api.LabelDescriptor.Builder.class); + } + + // Construct using com.google.api.LabelDescriptor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + valueType_ = 0; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.LabelProto.internal_static_google_api_LabelDescriptor_descriptor; + } + + @java.lang.Override + public com.google.api.LabelDescriptor getDefaultInstanceForType() { + return com.google.api.LabelDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.LabelDescriptor build() { + com.google.api.LabelDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.LabelDescriptor buildPartial() { + com.google.api.LabelDescriptor result = new com.google.api.LabelDescriptor(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.LabelDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.valueType_ = valueType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + } + + @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.api.LabelDescriptor) { + return mergeFrom((com.google.api.LabelDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.LabelDescriptor other) { + if (other == com.google.api.LabelDescriptor.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.valueType_ != 0) { + setValueTypeValue(other.getValueTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + 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: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + valueType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * + * + *
+     * The label key.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The label key.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The label key.
+     * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The label key.
+     * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The label key.
+     * 
+ * + * string key = 1; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int valueType_ = 0; + /** + * + * + *
+     * The type of data that can be assigned to the label.
+     * 
+ * + * .google.api.LabelDescriptor.ValueType value_type = 2; + * + * @return The enum numeric value on the wire for valueType. + */ + @java.lang.Override + public int getValueTypeValue() { + return valueType_; + } + /** + * + * + *
+     * The type of data that can be assigned to the label.
+     * 
+ * + * .google.api.LabelDescriptor.ValueType value_type = 2; + * + * @param value The enum numeric value on the wire for valueType to set. + * @return This builder for chaining. + */ + public Builder setValueTypeValue(int value) { + valueType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of data that can be assigned to the label.
+     * 
+ * + * .google.api.LabelDescriptor.ValueType value_type = 2; + * + * @return The valueType. + */ + @java.lang.Override + public com.google.api.LabelDescriptor.ValueType getValueType() { + com.google.api.LabelDescriptor.ValueType result = + com.google.api.LabelDescriptor.ValueType.forNumber(valueType_); + return result == null ? com.google.api.LabelDescriptor.ValueType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The type of data that can be assigned to the label.
+     * 
+ * + * .google.api.LabelDescriptor.ValueType value_type = 2; + * + * @param value The valueType to set. + * @return This builder for chaining. + */ + public Builder setValueType(com.google.api.LabelDescriptor.ValueType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + valueType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of data that can be assigned to the label.
+     * 
+ * + * .google.api.LabelDescriptor.ValueType value_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearValueType() { + bitField0_ = (bitField0_ & ~0x00000002); + valueType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A human-readable description for the label.
+     * 
+ * + * string description = 3; + * + * @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; + } + } + /** + * + * + *
+     * A human-readable description for the label.
+     * 
+ * + * string description = 3; + * + * @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; + } + } + /** + * + * + *
+     * A human-readable description for the label.
+     * 
+ * + * string description = 3; + * + * @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; + } + /** + * + * + *
+     * A human-readable description for the label.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable description for the label.
+     * 
+ * + * string description = 3; + * + * @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; + } + + @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.api.LabelDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.api.LabelDescriptor) + private static final com.google.api.LabelDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.LabelDescriptor(); + } + + public static com.google.api.LabelDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelDescriptor 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.api.LabelDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LabelDescriptorOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LabelDescriptorOrBuilder.java new file mode 100644 index 000000000000..97bc5ca92531 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LabelDescriptorOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/label.proto + +package com.google.api; + +public interface LabelDescriptorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.LabelDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The label key.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * The label key.
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * The type of data that can be assigned to the label.
+   * 
+ * + * .google.api.LabelDescriptor.ValueType value_type = 2; + * + * @return The enum numeric value on the wire for valueType. + */ + int getValueTypeValue(); + /** + * + * + *
+   * The type of data that can be assigned to the label.
+   * 
+ * + * .google.api.LabelDescriptor.ValueType value_type = 2; + * + * @return The valueType. + */ + com.google.api.LabelDescriptor.ValueType getValueType(); + + /** + * + * + *
+   * A human-readable description for the label.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A human-readable description for the label.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LabelProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LabelProto.java new file mode 100644 index 000000000000..5e40687db0c5 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LabelProto.java @@ -0,0 +1,66 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/label.proto + +package com.google.api; + +public final class LabelProto { + private LabelProto() {} + + 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_api_LabelDescriptor_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_LabelDescriptor_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\026google/api/label.proto\022\ngoogle.api\"\234\001\n" + + "\017LabelDescriptor\022\013\n\003key\030\001 \001(\t\0229\n\nvalue_t" + + "ype\030\002 \001(\0162%.google.api.LabelDescriptor.V" + + "alueType\022\023\n\013description\030\003 \001(\t\",\n\tValueTy" + + "pe\022\n\n\006STRING\020\000\022\010\n\004BOOL\020\001\022\t\n\005INT64\020\002B_\n\016c" + + "om.google.apiB\nLabelProtoP\001Z5google.gola" + + "ng.org/genproto/googleapis/api/label;lab" + + "el\370\001\001\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_LabelDescriptor_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_LabelDescriptor_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_LabelDescriptor_descriptor, + new java.lang.String[] { + "Key", "ValueType", "Description", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LaunchStage.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LaunchStage.java new file mode 100644 index 000000000000..8058a86dc8ea --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LaunchStage.java @@ -0,0 +1,329 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/launch_stage.proto + +package com.google.api; + +/** + * + * + *
+ * The launch stage as defined by [Google Cloud Platform
+ * Launch Stages](https://cloud.google.com/terms/launch-stages).
+ * 
+ * + * Protobuf enum {@code google.api.LaunchStage} + */ +public enum LaunchStage implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Do not use this default value.
+   * 
+ * + * LAUNCH_STAGE_UNSPECIFIED = 0; + */ + LAUNCH_STAGE_UNSPECIFIED(0), + /** + * + * + *
+   * The feature is not yet implemented. Users can not use it.
+   * 
+ * + * UNIMPLEMENTED = 6; + */ + UNIMPLEMENTED(6), + /** + * + * + *
+   * Prelaunch features are hidden from users and are only visible internally.
+   * 
+ * + * PRELAUNCH = 7; + */ + PRELAUNCH(7), + /** + * + * + *
+   * Early Access features are limited to a closed group of testers. To use
+   * these features, you must sign up in advance and sign a Trusted Tester
+   * agreement (which includes confidentiality provisions). These features may
+   * be unstable, changed in backward-incompatible ways, and are not
+   * guaranteed to be released.
+   * 
+ * + * EARLY_ACCESS = 1; + */ + EARLY_ACCESS(1), + /** + * + * + *
+   * Alpha is a limited availability test for releases before they are cleared
+   * for widespread use. By Alpha, all significant design issues are resolved
+   * and we are in the process of verifying functionality. Alpha customers
+   * need to apply for access, agree to applicable terms, and have their
+   * projects allowlisted. Alpha releases don't have to be feature complete,
+   * no SLAs are provided, and there are no technical support obligations, but
+   * they will be far enough along that customers can actually use them in
+   * test environments or for limited-use tests -- just like they would in
+   * normal production cases.
+   * 
+ * + * ALPHA = 2; + */ + ALPHA(2), + /** + * + * + *
+   * Beta is the point at which we are ready to open a release for any
+   * customer to use. There are no SLA or technical support obligations in a
+   * Beta release. Products will be complete from a feature perspective, but
+   * may have some open outstanding issues. Beta releases are suitable for
+   * limited production use cases.
+   * 
+ * + * BETA = 3; + */ + BETA(3), + /** + * + * + *
+   * GA features are open to all developers and are considered stable and
+   * fully qualified for production use.
+   * 
+ * + * GA = 4; + */ + GA(4), + /** + * + * + *
+   * Deprecated features are scheduled to be shut down and removed. For more
+   * information, see the "Deprecation Policy" section of our [Terms of
+   * Service](https://cloud.google.com/terms/)
+   * and the [Google Cloud Platform Subject to the Deprecation
+   * Policy](https://cloud.google.com/terms/deprecation) documentation.
+   * 
+ * + * DEPRECATED = 5; + */ + DEPRECATED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Do not use this default value.
+   * 
+ * + * LAUNCH_STAGE_UNSPECIFIED = 0; + */ + public static final int LAUNCH_STAGE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The feature is not yet implemented. Users can not use it.
+   * 
+ * + * UNIMPLEMENTED = 6; + */ + public static final int UNIMPLEMENTED_VALUE = 6; + /** + * + * + *
+   * Prelaunch features are hidden from users and are only visible internally.
+   * 
+ * + * PRELAUNCH = 7; + */ + public static final int PRELAUNCH_VALUE = 7; + /** + * + * + *
+   * Early Access features are limited to a closed group of testers. To use
+   * these features, you must sign up in advance and sign a Trusted Tester
+   * agreement (which includes confidentiality provisions). These features may
+   * be unstable, changed in backward-incompatible ways, and are not
+   * guaranteed to be released.
+   * 
+ * + * EARLY_ACCESS = 1; + */ + public static final int EARLY_ACCESS_VALUE = 1; + /** + * + * + *
+   * Alpha is a limited availability test for releases before they are cleared
+   * for widespread use. By Alpha, all significant design issues are resolved
+   * and we are in the process of verifying functionality. Alpha customers
+   * need to apply for access, agree to applicable terms, and have their
+   * projects allowlisted. Alpha releases don't have to be feature complete,
+   * no SLAs are provided, and there are no technical support obligations, but
+   * they will be far enough along that customers can actually use them in
+   * test environments or for limited-use tests -- just like they would in
+   * normal production cases.
+   * 
+ * + * ALPHA = 2; + */ + public static final int ALPHA_VALUE = 2; + /** + * + * + *
+   * Beta is the point at which we are ready to open a release for any
+   * customer to use. There are no SLA or technical support obligations in a
+   * Beta release. Products will be complete from a feature perspective, but
+   * may have some open outstanding issues. Beta releases are suitable for
+   * limited production use cases.
+   * 
+ * + * BETA = 3; + */ + public static final int BETA_VALUE = 3; + /** + * + * + *
+   * GA features are open to all developers and are considered stable and
+   * fully qualified for production use.
+   * 
+ * + * GA = 4; + */ + public static final int GA_VALUE = 4; + /** + * + * + *
+   * Deprecated features are scheduled to be shut down and removed. For more
+   * information, see the "Deprecation Policy" section of our [Terms of
+   * Service](https://cloud.google.com/terms/)
+   * and the [Google Cloud Platform Subject to the Deprecation
+   * Policy](https://cloud.google.com/terms/deprecation) documentation.
+   * 
+ * + * DEPRECATED = 5; + */ + public static final int DEPRECATED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LaunchStage 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 LaunchStage forNumber(int value) { + switch (value) { + case 0: + return LAUNCH_STAGE_UNSPECIFIED; + case 6: + return UNIMPLEMENTED; + case 7: + return PRELAUNCH; + case 1: + return EARLY_ACCESS; + case 2: + return ALPHA; + case 3: + return BETA; + case 4: + return GA; + case 5: + return DEPRECATED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LaunchStage findValueByNumber(int number) { + return LaunchStage.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.api.LaunchStageProto.getDescriptor().getEnumTypes().get(0); + } + + private static final LaunchStage[] VALUES = values(); + + public static LaunchStage 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 LaunchStage(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.LaunchStage) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LaunchStageProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LaunchStageProto.java new file mode 100644 index 000000000000..f2d97444071b --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LaunchStageProto.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/launch_stage.proto + +package com.google.api; + +public final class LaunchStageProto { + private LaunchStageProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\035google/api/launch_stage.proto\022\ngoogle." + + "api*\214\001\n\013LaunchStage\022\034\n\030LAUNCH_STAGE_UNSP" + + "ECIFIED\020\000\022\021\n\rUNIMPLEMENTED\020\006\022\r\n\tPRELAUNC" + + "H\020\007\022\020\n\014EARLY_ACCESS\020\001\022\t\n\005ALPHA\020\002\022\010\n\004BETA" + + "\020\003\022\006\n\002GA\020\004\022\016\n\nDEPRECATED\020\005BZ\n\016com.google" + + ".apiB\020LaunchStageProtoP\001Z-google.golang." + + "org/genproto/googleapis/api;api\242\002\004GAPIb\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LogDescriptor.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LogDescriptor.java new file mode 100644 index 000000000000..d41bff71e321 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LogDescriptor.java @@ -0,0 +1,1560 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/log.proto + +package com.google.api; + +/** + * + * + *
+ * A description of a log type. Example in YAML format:
+ *
+ *     - name: library.googleapis.com/activity_history
+ *       description: The history of borrowing and returning library items.
+ *       display_name: Activity
+ *       labels:
+ *       - key: /customer_id
+ *         description: Identifier of a library customer
+ * 
+ * + * Protobuf type {@code google.api.LogDescriptor} + */ +public final class LogDescriptor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.LogDescriptor) + LogDescriptorOrBuilder { + private static final long serialVersionUID = 0L; + // Use LogDescriptor.newBuilder() to construct. + private LogDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LogDescriptor() { + name_ = ""; + labels_ = java.util.Collections.emptyList(); + description_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LogDescriptor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.LogProto.internal_static_google_api_LogDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LogProto.internal_static_google_api_LogDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.LogDescriptor.class, com.google.api.LogDescriptor.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The name of the log. It must be less than 512 characters long and can
+   * include the following characters: upper- and lower-case alphanumeric
+   * characters [A-Za-z0-9], and punctuation characters including
+   * slash, underscore, hyphen, period [/_-.].
+   * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+   * The name of the log. It must be less than 512 characters long and can
+   * include the following characters: upper- and lower-case alphanumeric
+   * characters [A-Za-z0-9], and punctuation characters including
+   * slash, underscore, hyphen, period [/_-.].
+   * 
+ * + * string name = 1; + * + * @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 LABELS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List labels_; + /** + * + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + @java.lang.Override + public java.util.List getLabelsList() { + return labels_; + } + /** + * + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + @java.lang.Override + public java.util.List + getLabelsOrBuilderList() { + return labels_; + } + /** + * + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + @java.lang.Override + public int getLabelsCount() { + return labels_.size(); + } + /** + * + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + @java.lang.Override + public com.google.api.LabelDescriptor getLabels(int index) { + return labels_.get(index); + } + /** + * + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + @java.lang.Override + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder(int index) { + return labels_.get(index); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A human-readable description of this log. This information appears in
+   * the documentation and can contain details.
+   * 
+ * + * string description = 3; + * + * @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; + } + } + /** + * + * + *
+   * A human-readable description of this log. This information appears in
+   * the documentation and can contain details.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * The human-readable name for this log. This information appears on
+   * the user interface and should be concise.
+   * 
+ * + * string display_name = 4; + * + * @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; + } + } + /** + * + * + *
+   * The human-readable name for this log. This information appears on
+   * the user interface and should be concise.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < labels_.size(); i++) { + output.writeMessage(2, labels_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < labels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labels_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.LogDescriptor)) { + return super.equals(obj); + } + com.google.api.LogDescriptor other = (com.google.api.LogDescriptor) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLabelsList().equals(other.getLabelsList())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getLabelsCount() > 0) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + getLabelsList().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.LogDescriptor parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.LogDescriptor parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.LogDescriptor parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.LogDescriptor 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.api.LogDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.LogDescriptor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.LogDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.LogDescriptor 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.api.LogDescriptor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.LogDescriptor 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.api.LogDescriptor parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.LogDescriptor 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.api.LogDescriptor 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 description of a log type. Example in YAML format:
+   *
+   *     - name: library.googleapis.com/activity_history
+   *       description: The history of borrowing and returning library items.
+   *       display_name: Activity
+   *       labels:
+   *       - key: /customer_id
+   *         description: Identifier of a library customer
+   * 
+ * + * Protobuf type {@code google.api.LogDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.LogDescriptor) + com.google.api.LogDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.LogProto.internal_static_google_api_LogDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LogProto.internal_static_google_api_LogDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.LogDescriptor.class, com.google.api.LogDescriptor.Builder.class); + } + + // Construct using com.google.api.LogDescriptor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + } else { + labels_ = null; + labelsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + description_ = ""; + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.LogProto.internal_static_google_api_LogDescriptor_descriptor; + } + + @java.lang.Override + public com.google.api.LogDescriptor getDefaultInstanceForType() { + return com.google.api.LogDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.LogDescriptor build() { + com.google.api.LogDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.LogDescriptor buildPartial() { + com.google.api.LogDescriptor result = new com.google.api.LogDescriptor(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.LogDescriptor result) { + if (labelsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.labels_ = labels_; + } else { + result.labels_ = labelsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.LogDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayName_ = displayName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.LogDescriptor) { + return mergeFrom((com.google.api.LogDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.LogDescriptor other) { + if (other == com.google.api.LogDescriptor.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (labelsBuilder_ == null) { + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } + } else { + if (!other.labels_.isEmpty()) { + if (labelsBuilder_.isEmpty()) { + labelsBuilder_.dispose(); + labelsBuilder_ = null; + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000002); + labelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLabelsFieldBuilder() + : null; + } else { + labelsBuilder_.addAllMessages(other.labels_); + } + } + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + 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: + { + com.google.api.LabelDescriptor m = + input.readMessage(com.google.api.LabelDescriptor.parser(), extensionRegistry); + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(m); + } else { + labelsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + displayName_ = 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_ = ""; + /** + * + * + *
+     * The name of the log. It must be less than 512 characters long and can
+     * include the following characters: upper- and lower-case alphanumeric
+     * characters [A-Za-z0-9], and punctuation characters including
+     * slash, underscore, hyphen, period [/_-.].
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The name of the log. It must be less than 512 characters long and can
+     * include the following characters: upper- and lower-case alphanumeric
+     * characters [A-Za-z0-9], and punctuation characters including
+     * slash, underscore, hyphen, period [/_-.].
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The name of the log. It must be less than 512 characters long and can
+     * include the following characters: upper- and lower-case alphanumeric
+     * characters [A-Za-z0-9], and punctuation characters including
+     * slash, underscore, hyphen, period [/_-.].
+     * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+     * The name of the log. It must be less than 512 characters long and can
+     * include the following characters: upper- and lower-case alphanumeric
+     * characters [A-Za-z0-9], and punctuation characters including
+     * slash, underscore, hyphen, period [/_-.].
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the log. It must be less than 512 characters long and can
+     * include the following characters: upper- and lower-case alphanumeric
+     * characters [A-Za-z0-9], and punctuation characters including
+     * slash, underscore, hyphen, period [/_-.].
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List labels_ = + java.util.Collections.emptyList(); + + private void ensureLabelsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + labels_ = new java.util.ArrayList(labels_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.LabelDescriptor, + com.google.api.LabelDescriptor.Builder, + com.google.api.LabelDescriptorOrBuilder> + labelsBuilder_; + + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public java.util.List getLabelsList() { + if (labelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labels_); + } else { + return labelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public int getLabelsCount() { + if (labelsBuilder_ == null) { + return labels_.size(); + } else { + return labelsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public com.google.api.LabelDescriptor getLabels(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder setLabels(int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + onChanged(); + } else { + labelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder setLabels(int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.set(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder addLabels(com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + onChanged(); + } else { + labelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder addLabels(int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(index, value); + onChanged(); + } else { + labelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder addLabels(com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder addLabels(int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder addAllLabels( + java.lang.Iterable values) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labels_); + onChanged(); + } else { + labelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder clearLabels() { + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + labelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder removeLabels(int index) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.remove(index); + onChanged(); + } else { + labelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public com.google.api.LabelDescriptor.Builder getLabelsBuilder(int index) { + return getLabelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public java.util.List + getLabelsOrBuilderList() { + if (labelsBuilder_ != null) { + return labelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labels_); + } + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder() { + return getLabelsFieldBuilder() + .addBuilder(com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder(int index) { + return getLabelsFieldBuilder() + .addBuilder(index, com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * + * + *
+     * The set of labels that are available to describe a specific log entry.
+     * Runtime requests that contain labels not specified here are
+     * considered invalid.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public java.util.List getLabelsBuilderList() { + return getLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.LabelDescriptor, + com.google.api.LabelDescriptor.Builder, + com.google.api.LabelDescriptorOrBuilder> + getLabelsFieldBuilder() { + if (labelsBuilder_ == null) { + labelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.LabelDescriptor, + com.google.api.LabelDescriptor.Builder, + com.google.api.LabelDescriptorOrBuilder>( + labels_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + labels_ = null; + } + return labelsBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A human-readable description of this log. This information appears in
+     * the documentation and can contain details.
+     * 
+ * + * string description = 3; + * + * @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; + } + } + /** + * + * + *
+     * A human-readable description of this log. This information appears in
+     * the documentation and can contain details.
+     * 
+ * + * string description = 3; + * + * @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; + } + } + /** + * + * + *
+     * A human-readable description of this log. This information appears in
+     * the documentation and can contain details.
+     * 
+ * + * string description = 3; + * + * @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; + } + /** + * + * + *
+     * A human-readable description of this log. This information appears in
+     * the documentation and can contain details.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable description of this log. This information appears in
+     * the documentation and can contain details.
+     * 
+ * + * string description = 3; + * + * @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 java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The human-readable name for this log. This information appears on
+     * the user interface and should be concise.
+     * 
+ * + * string display_name = 4; + * + * @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; + } + } + /** + * + * + *
+     * The human-readable name for this log. This information appears on
+     * the user interface and should be concise.
+     * 
+ * + * string display_name = 4; + * + * @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; + } + } + /** + * + * + *
+     * The human-readable name for this log. This information appears on
+     * the user interface and should be concise.
+     * 
+ * + * string display_name = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable name for this log. This information appears on
+     * the user interface and should be concise.
+     * 
+ * + * string display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable name for this log. This information appears on
+     * the user interface and should be concise.
+     * 
+ * + * string display_name = 4; + * + * @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_ |= 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.api.LogDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.api.LogDescriptor) + private static final com.google.api.LogDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.LogDescriptor(); + } + + public static com.google.api.LogDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogDescriptor 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.api.LogDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LogDescriptorOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LogDescriptorOrBuilder.java new file mode 100644 index 000000000000..d021a00121a8 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LogDescriptorOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/log.proto + +package com.google.api; + +public interface LogDescriptorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.LogDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the log. It must be less than 512 characters long and can
+   * include the following characters: upper- and lower-case alphanumeric
+   * characters [A-Za-z0-9], and punctuation characters including
+   * slash, underscore, hyphen, period [/_-.].
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of the log. It must be less than 512 characters long and can
+   * include the following characters: upper- and lower-case alphanumeric
+   * characters [A-Za-z0-9], and punctuation characters including
+   * slash, underscore, hyphen, period [/_-.].
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + java.util.List getLabelsList(); + /** + * + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + com.google.api.LabelDescriptor getLabels(int index); + /** + * + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + int getLabelsCount(); + /** + * + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + java.util.List getLabelsOrBuilderList(); + /** + * + * + *
+   * The set of labels that are available to describe a specific log entry.
+   * Runtime requests that contain labels not specified here are
+   * considered invalid.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder(int index); + + /** + * + * + *
+   * A human-readable description of this log. This information appears in
+   * the documentation and can contain details.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A human-readable description of this log. This information appears in
+   * the documentation and can contain details.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * The human-readable name for this log. This information appears on
+   * the user interface and should be concise.
+   * 
+ * + * string display_name = 4; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The human-readable name for this log. This information appears on
+   * the user interface and should be concise.
+   * 
+ * + * string display_name = 4; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LogProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LogProto.java new file mode 100644 index 000000000000..9a8ef28231d8 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LogProto.java @@ -0,0 +1,69 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/log.proto + +package com.google.api; + +public final class LogProto { + private LogProto() {} + + 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_api_LogDescriptor_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_LogDescriptor_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\024google/api/log.proto\022\ngoogle.api\032\026goog" + + "le/api/label.proto\"u\n\rLogDescriptor\022\014\n\004n" + + "ame\030\001 \001(\t\022+\n\006labels\030\002 \003(\0132\033.google.api.L" + + "abelDescriptor\022\023\n\013description\030\003 \001(\t\022\024\n\014d" + + "isplay_name\030\004 \001(\tBj\n\016com.google.apiB\010Log" + + "ProtoP\001ZEgoogle.golang.org/genproto/goog" + + "leapis/api/serviceconfig;serviceconfig\242\002" + + "\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.LabelProto.getDescriptor(), + }); + internal_static_google_api_LogDescriptor_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_LogDescriptor_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_LogDescriptor_descriptor, + new java.lang.String[] { + "Name", "Labels", "Description", "DisplayName", + }); + com.google.api.LabelProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Logging.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Logging.java new file mode 100644 index 000000000000..542685fca976 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Logging.java @@ -0,0 +1,2670 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/logging.proto + +package com.google.api; + +/** + * + * + *
+ * Logging configuration of the service.
+ *
+ * The following example shows how to configure logs to be sent to the
+ * producer and consumer projects. In the example, the `activity_history`
+ * log is sent to both the producer and consumer projects, whereas the
+ * `purchase_history` log is only sent to the producer project.
+ *
+ *     monitored_resources:
+ *     - type: library.googleapis.com/branch
+ *       labels:
+ *       - key: /city
+ *         description: The city where the library branch is located in.
+ *       - key: /name
+ *         description: The name of the branch.
+ *     logs:
+ *     - name: activity_history
+ *       labels:
+ *       - key: /customer_id
+ *     - name: purchase_history
+ *     logging:
+ *       producer_destinations:
+ *       - monitored_resource: library.googleapis.com/branch
+ *         logs:
+ *         - activity_history
+ *         - purchase_history
+ *       consumer_destinations:
+ *       - monitored_resource: library.googleapis.com/branch
+ *         logs:
+ *         - activity_history
+ * 
+ * + * Protobuf type {@code google.api.Logging} + */ +public final class Logging extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Logging) + LoggingOrBuilder { + private static final long serialVersionUID = 0L; + // Use Logging.newBuilder() to construct. + private Logging(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Logging() { + producerDestinations_ = java.util.Collections.emptyList(); + consumerDestinations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Logging(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Logging.class, com.google.api.Logging.Builder.class); + } + + public interface LoggingDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Logging.LoggingDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The monitored resource type. The type must be defined in the
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 3; + * + * @return The monitoredResource. + */ + java.lang.String getMonitoredResource(); + /** + * + * + *
+     * The monitored resource type. The type must be defined in the
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 3; + * + * @return The bytes for monitoredResource. + */ + com.google.protobuf.ByteString getMonitoredResourceBytes(); + + /** + * + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][google.api.Service.logs] section. If the
+     * log name is not a domain scoped name, it will be automatically prefixed
+     * with the service name followed by "/".
+     * 
+ * + * repeated string logs = 1; + * + * @return A list containing the logs. + */ + java.util.List getLogsList(); + /** + * + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][google.api.Service.logs] section. If the
+     * log name is not a domain scoped name, it will be automatically prefixed
+     * with the service name followed by "/".
+     * 
+ * + * repeated string logs = 1; + * + * @return The count of logs. + */ + int getLogsCount(); + /** + * + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][google.api.Service.logs] section. If the
+     * log name is not a domain scoped name, it will be automatically prefixed
+     * with the service name followed by "/".
+     * 
+ * + * repeated string logs = 1; + * + * @param index The index of the element to return. + * @return The logs at the given index. + */ + java.lang.String getLogs(int index); + /** + * + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][google.api.Service.logs] section. If the
+     * log name is not a domain scoped name, it will be automatically prefixed
+     * with the service name followed by "/".
+     * 
+ * + * repeated string logs = 1; + * + * @param index The index of the value to return. + * @return The bytes of the logs at the given index. + */ + com.google.protobuf.ByteString getLogsBytes(int index); + } + /** + * + * + *
+   * Configuration of a specific logging destination (the producer project
+   * or the consumer project).
+   * 
+ * + * Protobuf type {@code google.api.Logging.LoggingDestination} + */ + public static final class LoggingDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Logging.LoggingDestination) + LoggingDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoggingDestination.newBuilder() to construct. + private LoggingDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LoggingDestination() { + monitoredResource_ = ""; + logs_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LoggingDestination(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.LoggingProto + .internal_static_google_api_Logging_LoggingDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LoggingProto + .internal_static_google_api_Logging_LoggingDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Logging.LoggingDestination.class, + com.google.api.Logging.LoggingDestination.Builder.class); + } + + public static final int MONITORED_RESOURCE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object monitoredResource_ = ""; + /** + * + * + *
+     * The monitored resource type. The type must be defined in the
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 3; + * + * @return The monitoredResource. + */ + @java.lang.Override + public java.lang.String getMonitoredResource() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + monitoredResource_ = s; + return s; + } + } + /** + * + * + *
+     * The monitored resource type. The type must be defined in the
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 3; + * + * @return The bytes for monitoredResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMonitoredResourceBytes() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + monitoredResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList logs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][google.api.Service.logs] section. If the
+     * log name is not a domain scoped name, it will be automatically prefixed
+     * with the service name followed by "/".
+     * 
+ * + * repeated string logs = 1; + * + * @return A list containing the logs. + */ + public com.google.protobuf.ProtocolStringList getLogsList() { + return logs_; + } + /** + * + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][google.api.Service.logs] section. If the
+     * log name is not a domain scoped name, it will be automatically prefixed
+     * with the service name followed by "/".
+     * 
+ * + * repeated string logs = 1; + * + * @return The count of logs. + */ + public int getLogsCount() { + return logs_.size(); + } + /** + * + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][google.api.Service.logs] section. If the
+     * log name is not a domain scoped name, it will be automatically prefixed
+     * with the service name followed by "/".
+     * 
+ * + * repeated string logs = 1; + * + * @param index The index of the element to return. + * @return The logs at the given index. + */ + public java.lang.String getLogs(int index) { + return logs_.get(index); + } + /** + * + * + *
+     * Names of the logs to be sent to this destination. Each name must
+     * be defined in the [Service.logs][google.api.Service.logs] section. If the
+     * log name is not a domain scoped name, it will be automatically prefixed
+     * with the service name followed by "/".
+     * 
+ * + * repeated string logs = 1; + * + * @param index The index of the value to return. + * @return The bytes of the logs at the given index. + */ + public com.google.protobuf.ByteString getLogsBytes(int index) { + return logs_.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 < logs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, logs_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(monitoredResource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, monitoredResource_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < logs_.size(); i++) { + dataSize += computeStringSizeNoTag(logs_.getRaw(i)); + } + size += dataSize; + size += 1 * getLogsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(monitoredResource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, monitoredResource_); + } + 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.api.Logging.LoggingDestination)) { + return super.equals(obj); + } + com.google.api.Logging.LoggingDestination other = + (com.google.api.Logging.LoggingDestination) obj; + + if (!getMonitoredResource().equals(other.getMonitoredResource())) return false; + if (!getLogsList().equals(other.getLogsList())) 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) + MONITORED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getMonitoredResource().hashCode(); + if (getLogsCount() > 0) { + hash = (37 * hash) + LOGS_FIELD_NUMBER; + hash = (53 * hash) + getLogsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Logging.LoggingDestination parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Logging.LoggingDestination parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Logging.LoggingDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Logging.LoggingDestination 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.api.Logging.LoggingDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Logging.LoggingDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Logging.LoggingDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Logging.LoggingDestination 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.api.Logging.LoggingDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Logging.LoggingDestination 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.api.Logging.LoggingDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Logging.LoggingDestination 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.api.Logging.LoggingDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration of a specific logging destination (the producer project
+     * or the consumer project).
+     * 
+ * + * Protobuf type {@code google.api.Logging.LoggingDestination} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Logging.LoggingDestination) + com.google.api.Logging.LoggingDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.LoggingProto + .internal_static_google_api_Logging_LoggingDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LoggingProto + .internal_static_google_api_Logging_LoggingDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Logging.LoggingDestination.class, + com.google.api.Logging.LoggingDestination.Builder.class); + } + + // Construct using com.google.api.Logging.LoggingDestination.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + monitoredResource_ = ""; + logs_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.LoggingProto + .internal_static_google_api_Logging_LoggingDestination_descriptor; + } + + @java.lang.Override + public com.google.api.Logging.LoggingDestination getDefaultInstanceForType() { + return com.google.api.Logging.LoggingDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Logging.LoggingDestination build() { + com.google.api.Logging.LoggingDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Logging.LoggingDestination buildPartial() { + com.google.api.Logging.LoggingDestination result = + new com.google.api.Logging.LoggingDestination(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Logging.LoggingDestination result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.monitoredResource_ = monitoredResource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + logs_.makeImmutable(); + result.logs_ = logs_; + } + } + + @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.api.Logging.LoggingDestination) { + return mergeFrom((com.google.api.Logging.LoggingDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Logging.LoggingDestination other) { + if (other == com.google.api.Logging.LoggingDestination.getDefaultInstance()) return this; + if (!other.getMonitoredResource().isEmpty()) { + monitoredResource_ = other.monitoredResource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.logs_.isEmpty()) { + if (logs_.isEmpty()) { + logs_ = other.logs_; + bitField0_ |= 0x00000002; + } else { + ensureLogsIsMutable(); + logs_.addAll(other.logs_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLogsIsMutable(); + logs_.add(s); + break; + } // case 10 + case 26: + { + monitoredResource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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 monitoredResource_ = ""; + /** + * + * + *
+       * The monitored resource type. The type must be defined in the
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 3; + * + * @return The monitoredResource. + */ + public java.lang.String getMonitoredResource() { + java.lang.Object ref = monitoredResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + monitoredResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in the
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 3; + * + * @return The bytes for monitoredResource. + */ + public com.google.protobuf.ByteString getMonitoredResourceBytes() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + monitoredResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in the
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 3; + * + * @param value The monitoredResource to set. + * @return This builder for chaining. + */ + public Builder setMonitoredResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + monitoredResource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in the
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 3; + * + * @return This builder for chaining. + */ + public Builder clearMonitoredResource() { + monitoredResource_ = getDefaultInstance().getMonitoredResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in the
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 3; + * + * @param value The bytes for monitoredResource to set. + * @return This builder for chaining. + */ + public Builder setMonitoredResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + monitoredResource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList logs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLogsIsMutable() { + if (!logs_.isModifiable()) { + logs_ = new com.google.protobuf.LazyStringArrayList(logs_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][google.api.Service.logs] section. If the
+       * log name is not a domain scoped name, it will be automatically prefixed
+       * with the service name followed by "/".
+       * 
+ * + * repeated string logs = 1; + * + * @return A list containing the logs. + */ + public com.google.protobuf.ProtocolStringList getLogsList() { + logs_.makeImmutable(); + return logs_; + } + /** + * + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][google.api.Service.logs] section. If the
+       * log name is not a domain scoped name, it will be automatically prefixed
+       * with the service name followed by "/".
+       * 
+ * + * repeated string logs = 1; + * + * @return The count of logs. + */ + public int getLogsCount() { + return logs_.size(); + } + /** + * + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][google.api.Service.logs] section. If the
+       * log name is not a domain scoped name, it will be automatically prefixed
+       * with the service name followed by "/".
+       * 
+ * + * repeated string logs = 1; + * + * @param index The index of the element to return. + * @return The logs at the given index. + */ + public java.lang.String getLogs(int index) { + return logs_.get(index); + } + /** + * + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][google.api.Service.logs] section. If the
+       * log name is not a domain scoped name, it will be automatically prefixed
+       * with the service name followed by "/".
+       * 
+ * + * repeated string logs = 1; + * + * @param index The index of the value to return. + * @return The bytes of the logs at the given index. + */ + public com.google.protobuf.ByteString getLogsBytes(int index) { + return logs_.getByteString(index); + } + /** + * + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][google.api.Service.logs] section. If the
+       * log name is not a domain scoped name, it will be automatically prefixed
+       * with the service name followed by "/".
+       * 
+ * + * repeated string logs = 1; + * + * @param index The index to set the value at. + * @param value The logs to set. + * @return This builder for chaining. + */ + public Builder setLogs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][google.api.Service.logs] section. If the
+       * log name is not a domain scoped name, it will be automatically prefixed
+       * with the service name followed by "/".
+       * 
+ * + * repeated string logs = 1; + * + * @param value The logs to add. + * @return This builder for chaining. + */ + public Builder addLogs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][google.api.Service.logs] section. If the
+       * log name is not a domain scoped name, it will be automatically prefixed
+       * with the service name followed by "/".
+       * 
+ * + * repeated string logs = 1; + * + * @param values The logs to add. + * @return This builder for chaining. + */ + public Builder addAllLogs(java.lang.Iterable values) { + ensureLogsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logs_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][google.api.Service.logs] section. If the
+       * log name is not a domain scoped name, it will be automatically prefixed
+       * with the service name followed by "/".
+       * 
+ * + * repeated string logs = 1; + * + * @return This builder for chaining. + */ + public Builder clearLogs() { + logs_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Names of the logs to be sent to this destination. Each name must
+       * be defined in the [Service.logs][google.api.Service.logs] section. If the
+       * log name is not a domain scoped name, it will be automatically prefixed
+       * with the service name followed by "/".
+       * 
+ * + * repeated string logs = 1; + * + * @param value The bytes of the logs to add. + * @return This builder for chaining. + */ + public Builder addLogsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLogsIsMutable(); + logs_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.Logging.LoggingDestination) + } + + // @@protoc_insertion_point(class_scope:google.api.Logging.LoggingDestination) + private static final com.google.api.Logging.LoggingDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Logging.LoggingDestination(); + } + + public static com.google.api.Logging.LoggingDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoggingDestination 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.api.Logging.LoggingDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List producerDestinations_; + /** + * + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + @java.lang.Override + public java.util.List getProducerDestinationsList() { + return producerDestinations_; + } + /** + * + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + @java.lang.Override + public java.util.List + getProducerDestinationsOrBuilderList() { + return producerDestinations_; + } + /** + * + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + @java.lang.Override + public int getProducerDestinationsCount() { + return producerDestinations_.size(); + } + /** + * + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + @java.lang.Override + public com.google.api.Logging.LoggingDestination getProducerDestinations(int index) { + return producerDestinations_.get(index); + } + /** + * + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + @java.lang.Override + public com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder( + int index) { + return producerDestinations_.get(index); + } + + public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List consumerDestinations_; + /** + * + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + @java.lang.Override + public java.util.List getConsumerDestinationsList() { + return consumerDestinations_; + } + /** + * + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + @java.lang.Override + public java.util.List + getConsumerDestinationsOrBuilderList() { + return consumerDestinations_; + } + /** + * + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + @java.lang.Override + public int getConsumerDestinationsCount() { + return consumerDestinations_.size(); + } + /** + * + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + @java.lang.Override + public com.google.api.Logging.LoggingDestination getConsumerDestinations(int index) { + return consumerDestinations_.get(index); + } + /** + * + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + @java.lang.Override + public com.google.api.Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index) { + return consumerDestinations_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < producerDestinations_.size(); i++) { + output.writeMessage(1, producerDestinations_.get(i)); + } + for (int i = 0; i < consumerDestinations_.size(); i++) { + output.writeMessage(2, consumerDestinations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < producerDestinations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, producerDestinations_.get(i)); + } + for (int i = 0; i < consumerDestinations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, consumerDestinations_.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.api.Logging)) { + return super.equals(obj); + } + com.google.api.Logging other = (com.google.api.Logging) obj; + + if (!getProducerDestinationsList().equals(other.getProducerDestinationsList())) return false; + if (!getConsumerDestinationsList().equals(other.getConsumerDestinationsList())) 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 (getProducerDestinationsCount() > 0) { + hash = (37 * hash) + PRODUCER_DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + getProducerDestinationsList().hashCode(); + } + if (getConsumerDestinationsCount() > 0) { + hash = (37 * hash) + CONSUMER_DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + getConsumerDestinationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Logging parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Logging parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Logging parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Logging 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.api.Logging parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Logging parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Logging parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Logging 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.api.Logging parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Logging 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.api.Logging parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Logging 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.api.Logging 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; + } + /** + * + * + *
+   * Logging configuration of the service.
+   *
+   * The following example shows how to configure logs to be sent to the
+   * producer and consumer projects. In the example, the `activity_history`
+   * log is sent to both the producer and consumer projects, whereas the
+   * `purchase_history` log is only sent to the producer project.
+   *
+   *     monitored_resources:
+   *     - type: library.googleapis.com/branch
+   *       labels:
+   *       - key: /city
+   *         description: The city where the library branch is located in.
+   *       - key: /name
+   *         description: The name of the branch.
+   *     logs:
+   *     - name: activity_history
+   *       labels:
+   *       - key: /customer_id
+   *     - name: purchase_history
+   *     logging:
+   *       producer_destinations:
+   *       - monitored_resource: library.googleapis.com/branch
+   *         logs:
+   *         - activity_history
+   *         - purchase_history
+   *       consumer_destinations:
+   *       - monitored_resource: library.googleapis.com/branch
+   *         logs:
+   *         - activity_history
+   * 
+ * + * Protobuf type {@code google.api.Logging} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Logging) + com.google.api.LoggingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Logging.class, com.google.api.Logging.Builder.class); + } + + // Construct using com.google.api.Logging.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (producerDestinationsBuilder_ == null) { + producerDestinations_ = java.util.Collections.emptyList(); + } else { + producerDestinations_ = null; + producerDestinationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (consumerDestinationsBuilder_ == null) { + consumerDestinations_ = java.util.Collections.emptyList(); + } else { + consumerDestinations_ = null; + consumerDestinationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.LoggingProto.internal_static_google_api_Logging_descriptor; + } + + @java.lang.Override + public com.google.api.Logging getDefaultInstanceForType() { + return com.google.api.Logging.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Logging build() { + com.google.api.Logging result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Logging buildPartial() { + com.google.api.Logging result = new com.google.api.Logging(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Logging result) { + if (producerDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.producerDestinations_ = producerDestinations_; + } else { + result.producerDestinations_ = producerDestinationsBuilder_.build(); + } + if (consumerDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.consumerDestinations_ = consumerDestinations_; + } else { + result.consumerDestinations_ = consumerDestinationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Logging result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Logging) { + return mergeFrom((com.google.api.Logging) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Logging other) { + if (other == com.google.api.Logging.getDefaultInstance()) return this; + if (producerDestinationsBuilder_ == null) { + if (!other.producerDestinations_.isEmpty()) { + if (producerDestinations_.isEmpty()) { + producerDestinations_ = other.producerDestinations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProducerDestinationsIsMutable(); + producerDestinations_.addAll(other.producerDestinations_); + } + onChanged(); + } + } else { + if (!other.producerDestinations_.isEmpty()) { + if (producerDestinationsBuilder_.isEmpty()) { + producerDestinationsBuilder_.dispose(); + producerDestinationsBuilder_ = null; + producerDestinations_ = other.producerDestinations_; + bitField0_ = (bitField0_ & ~0x00000001); + producerDestinationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProducerDestinationsFieldBuilder() + : null; + } else { + producerDestinationsBuilder_.addAllMessages(other.producerDestinations_); + } + } + } + if (consumerDestinationsBuilder_ == null) { + if (!other.consumerDestinations_.isEmpty()) { + if (consumerDestinations_.isEmpty()) { + consumerDestinations_ = other.consumerDestinations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.addAll(other.consumerDestinations_); + } + onChanged(); + } + } else { + if (!other.consumerDestinations_.isEmpty()) { + if (consumerDestinationsBuilder_.isEmpty()) { + consumerDestinationsBuilder_.dispose(); + consumerDestinationsBuilder_ = null; + consumerDestinations_ = other.consumerDestinations_; + bitField0_ = (bitField0_ & ~0x00000002); + consumerDestinationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConsumerDestinationsFieldBuilder() + : null; + } else { + consumerDestinationsBuilder_.addAllMessages(other.consumerDestinations_); + } + } + } + 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.api.Logging.LoggingDestination m = + input.readMessage( + com.google.api.Logging.LoggingDestination.parser(), extensionRegistry); + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(m); + } else { + producerDestinationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.api.Logging.LoggingDestination m = + input.readMessage( + com.google.api.Logging.LoggingDestination.parser(), extensionRegistry); + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(m); + } else { + consumerDestinationsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List producerDestinations_ = + java.util.Collections.emptyList(); + + private void ensureProducerDestinationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + producerDestinations_ = + new java.util.ArrayList( + producerDestinations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Logging.LoggingDestination, + com.google.api.Logging.LoggingDestination.Builder, + com.google.api.Logging.LoggingDestinationOrBuilder> + producerDestinationsBuilder_; + + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public java.util.List getProducerDestinationsList() { + if (producerDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(producerDestinations_); + } else { + return producerDestinationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public int getProducerDestinationsCount() { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.size(); + } else { + return producerDestinationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public com.google.api.Logging.LoggingDestination getProducerDestinations(int index) { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.get(index); + } else { + return producerDestinationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public Builder setProducerDestinations( + int index, com.google.api.Logging.LoggingDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.set(index, value); + onChanged(); + } else { + producerDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public Builder setProducerDestinations( + int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public Builder addProducerDestinations(com.google.api.Logging.LoggingDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(value); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public Builder addProducerDestinations( + int index, com.google.api.Logging.LoggingDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(index, value); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public Builder addProducerDestinations( + com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public Builder addProducerDestinations( + int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public Builder addAllProducerDestinations( + java.lang.Iterable values) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, producerDestinations_); + onChanged(); + } else { + producerDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public Builder clearProducerDestinations() { + if (producerDestinationsBuilder_ == null) { + producerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + producerDestinationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public Builder removeProducerDestinations(int index) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.remove(index); + onChanged(); + } else { + producerDestinationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public com.google.api.Logging.LoggingDestination.Builder getProducerDestinationsBuilder( + int index) { + return getProducerDestinationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder( + int index) { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.get(index); + } else { + return producerDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public java.util.List + getProducerDestinationsOrBuilderList() { + if (producerDestinationsBuilder_ != null) { + return producerDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(producerDestinations_); + } + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public com.google.api.Logging.LoggingDestination.Builder addProducerDestinationsBuilder() { + return getProducerDestinationsFieldBuilder() + .addBuilder(com.google.api.Logging.LoggingDestination.getDefaultInstance()); + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public com.google.api.Logging.LoggingDestination.Builder addProducerDestinationsBuilder( + int index) { + return getProducerDestinationsFieldBuilder() + .addBuilder(index, com.google.api.Logging.LoggingDestination.getDefaultInstance()); + } + /** + * + * + *
+     * Logging configurations for sending logs to the producer project.
+     * There can be multiple producer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one producer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + public java.util.List + getProducerDestinationsBuilderList() { + return getProducerDestinationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Logging.LoggingDestination, + com.google.api.Logging.LoggingDestination.Builder, + com.google.api.Logging.LoggingDestinationOrBuilder> + getProducerDestinationsFieldBuilder() { + if (producerDestinationsBuilder_ == null) { + producerDestinationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Logging.LoggingDestination, + com.google.api.Logging.LoggingDestination.Builder, + com.google.api.Logging.LoggingDestinationOrBuilder>( + producerDestinations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + producerDestinations_ = null; + } + return producerDestinationsBuilder_; + } + + private java.util.List consumerDestinations_ = + java.util.Collections.emptyList(); + + private void ensureConsumerDestinationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + consumerDestinations_ = + new java.util.ArrayList( + consumerDestinations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Logging.LoggingDestination, + com.google.api.Logging.LoggingDestination.Builder, + com.google.api.Logging.LoggingDestinationOrBuilder> + consumerDestinationsBuilder_; + + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public java.util.List getConsumerDestinationsList() { + if (consumerDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumerDestinations_); + } else { + return consumerDestinationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public int getConsumerDestinationsCount() { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.size(); + } else { + return consumerDestinationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public com.google.api.Logging.LoggingDestination getConsumerDestinations(int index) { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.get(index); + } else { + return consumerDestinationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public Builder setConsumerDestinations( + int index, com.google.api.Logging.LoggingDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.set(index, value); + onChanged(); + } else { + consumerDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public Builder setConsumerDestinations( + int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public Builder addConsumerDestinations(com.google.api.Logging.LoggingDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(value); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public Builder addConsumerDestinations( + int index, com.google.api.Logging.LoggingDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(index, value); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public Builder addConsumerDestinations( + com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public Builder addConsumerDestinations( + int index, com.google.api.Logging.LoggingDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public Builder addAllConsumerDestinations( + java.lang.Iterable values) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, consumerDestinations_); + onChanged(); + } else { + consumerDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public Builder clearConsumerDestinations() { + if (consumerDestinationsBuilder_ == null) { + consumerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + consumerDestinationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public Builder removeConsumerDestinations(int index) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.remove(index); + onChanged(); + } else { + consumerDestinationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public com.google.api.Logging.LoggingDestination.Builder getConsumerDestinationsBuilder( + int index) { + return getConsumerDestinationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public com.google.api.Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index) { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.get(index); + } else { + return consumerDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public java.util.List + getConsumerDestinationsOrBuilderList() { + if (consumerDestinationsBuilder_ != null) { + return consumerDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(consumerDestinations_); + } + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public com.google.api.Logging.LoggingDestination.Builder addConsumerDestinationsBuilder() { + return getConsumerDestinationsFieldBuilder() + .addBuilder(com.google.api.Logging.LoggingDestination.getDefaultInstance()); + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public com.google.api.Logging.LoggingDestination.Builder addConsumerDestinationsBuilder( + int index) { + return getConsumerDestinationsFieldBuilder() + .addBuilder(index, com.google.api.Logging.LoggingDestination.getDefaultInstance()); + } + /** + * + * + *
+     * Logging configurations for sending logs to the consumer project.
+     * There can be multiple consumer destinations, each one must have a
+     * different monitored resource type. A log can be used in at most
+     * one consumer destination.
+     * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + public java.util.List + getConsumerDestinationsBuilderList() { + return getConsumerDestinationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Logging.LoggingDestination, + com.google.api.Logging.LoggingDestination.Builder, + com.google.api.Logging.LoggingDestinationOrBuilder> + getConsumerDestinationsFieldBuilder() { + if (consumerDestinationsBuilder_ == null) { + consumerDestinationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Logging.LoggingDestination, + com.google.api.Logging.LoggingDestination.Builder, + com.google.api.Logging.LoggingDestinationOrBuilder>( + consumerDestinations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + consumerDestinations_ = null; + } + return consumerDestinationsBuilder_; + } + + @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.api.Logging) + } + + // @@protoc_insertion_point(class_scope:google.api.Logging) + private static final com.google.api.Logging DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Logging(); + } + + public static com.google.api.Logging getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Logging 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.api.Logging getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LoggingOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LoggingOrBuilder.java new file mode 100644 index 000000000000..69cc81163558 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LoggingOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/logging.proto + +package com.google.api; + +public interface LoggingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Logging) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + java.util.List getProducerDestinationsList(); + /** + * + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + com.google.api.Logging.LoggingDestination getProducerDestinations(int index); + /** + * + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + int getProducerDestinationsCount(); + /** + * + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + java.util.List + getProducerDestinationsOrBuilderList(); + /** + * + * + *
+   * Logging configurations for sending logs to the producer project.
+   * There can be multiple producer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one producer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination producer_destinations = 1; + */ + com.google.api.Logging.LoggingDestinationOrBuilder getProducerDestinationsOrBuilder(int index); + + /** + * + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + java.util.List getConsumerDestinationsList(); + /** + * + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + com.google.api.Logging.LoggingDestination getConsumerDestinations(int index); + /** + * + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + int getConsumerDestinationsCount(); + /** + * + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + java.util.List + getConsumerDestinationsOrBuilderList(); + /** + * + * + *
+   * Logging configurations for sending logs to the consumer project.
+   * There can be multiple consumer destinations, each one must have a
+   * different monitored resource type. A log can be used in at most
+   * one consumer destination.
+   * 
+ * + * repeated .google.api.Logging.LoggingDestination consumer_destinations = 2; + */ + com.google.api.Logging.LoggingDestinationOrBuilder getConsumerDestinationsOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LoggingProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LoggingProto.java new file mode 100644 index 000000000000..01bf6d8061b3 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/LoggingProto.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/logging.proto + +package com.google.api; + +public final class LoggingProto { + private LoggingProto() {} + + 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_api_Logging_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Logging_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Logging_LoggingDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Logging_LoggingDestination_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\030google/api/logging.proto\022\ngoogle.api\"\327" + + "\001\n\007Logging\022E\n\025producer_destinations\030\001 \003(" + + "\0132&.google.api.Logging.LoggingDestinatio" + + "n\022E\n\025consumer_destinations\030\002 \003(\0132&.googl" + + "e.api.Logging.LoggingDestination\032>\n\022Logg" + + "ingDestination\022\032\n\022monitored_resource\030\003 \001" + + "(\t\022\014\n\004logs\030\001 \003(\tBn\n\016com.google.apiB\014Logg" + + "ingProtoP\001ZEgoogle.golang.org/genproto/g" + + "oogleapis/api/serviceconfig;serviceconfi" + + "g\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_Logging_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Logging_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Logging_descriptor, + new java.lang.String[] { + "ProducerDestinations", "ConsumerDestinations", + }); + internal_static_google_api_Logging_LoggingDestination_descriptor = + internal_static_google_api_Logging_descriptor.getNestedTypes().get(0); + internal_static_google_api_Logging_LoggingDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Logging_LoggingDestination_descriptor, + new java.lang.String[] { + "MonitoredResource", "Logs", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodPolicy.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodPolicy.java new file mode 100644 index 000000000000..579df8311cf1 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodPolicy.java @@ -0,0 +1,1155 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/policy.proto + +package com.google.api; + +/** + * + * + *
+ * Defines policies applying to an RPC method.
+ * 
+ * + * Protobuf type {@code google.api.MethodPolicy} + */ +public final class MethodPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.MethodPolicy) + MethodPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use MethodPolicy.newBuilder() to construct. + private MethodPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MethodPolicy() { + selector_ = ""; + requestPolicies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MethodPolicy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.PolicyProto.internal_static_google_api_MethodPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.PolicyProto.internal_static_google_api_MethodPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MethodPolicy.class, com.google.api.MethodPolicy.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object selector_ = ""; + /** + * + * + *
+   * Selects a method to which these policies should be enforced, for example,
+   * "google.pubsub.v1.Subscriber.CreateSubscription".
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   *
+   * NOTE: This field must not be set in the proto annotation. It will be
+   * automatically filled by the service config compiler .
+   * 
+ * + * string selector = 9; + * + * @return The selector. + */ + @java.lang.Override + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * + * + *
+   * Selects a method to which these policies should be enforced, for example,
+   * "google.pubsub.v1.Subscriber.CreateSubscription".
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   *
+   * NOTE: This field must not be set in the proto annotation. It will be
+   * automatically filled by the service config compiler .
+   * 
+ * + * string selector = 9; + * + * @return The bytes for selector. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_POLICIES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List requestPolicies_; + /** + * + * + *
+   * Policies that are applicable to the request message.
+   * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + @java.lang.Override + public java.util.List getRequestPoliciesList() { + return requestPolicies_; + } + /** + * + * + *
+   * Policies that are applicable to the request message.
+   * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + @java.lang.Override + public java.util.List + getRequestPoliciesOrBuilderList() { + return requestPolicies_; + } + /** + * + * + *
+   * Policies that are applicable to the request message.
+   * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + @java.lang.Override + public int getRequestPoliciesCount() { + return requestPolicies_.size(); + } + /** + * + * + *
+   * Policies that are applicable to the request message.
+   * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + @java.lang.Override + public com.google.api.FieldPolicy getRequestPolicies(int index) { + return requestPolicies_.get(index); + } + /** + * + * + *
+   * Policies that are applicable to the request message.
+   * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + @java.lang.Override + public com.google.api.FieldPolicyOrBuilder getRequestPoliciesOrBuilder(int index) { + return requestPolicies_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < requestPolicies_.size(); i++) { + output.writeMessage(2, requestPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, selector_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < requestPolicies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, requestPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, selector_); + } + 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.api.MethodPolicy)) { + return super.equals(obj); + } + com.google.api.MethodPolicy other = (com.google.api.MethodPolicy) obj; + + if (!getSelector().equals(other.getSelector())) return false; + if (!getRequestPoliciesList().equals(other.getRequestPoliciesList())) 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) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + if (getRequestPoliciesCount() > 0) { + hash = (37 * hash) + REQUEST_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getRequestPoliciesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.MethodPolicy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MethodPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MethodPolicy parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MethodPolicy 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.api.MethodPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MethodPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MethodPolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MethodPolicy 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.api.MethodPolicy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.MethodPolicy 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.api.MethodPolicy parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MethodPolicy 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.api.MethodPolicy 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; + } + /** + * + * + *
+   * Defines policies applying to an RPC method.
+   * 
+ * + * Protobuf type {@code google.api.MethodPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.MethodPolicy) + com.google.api.MethodPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.PolicyProto.internal_static_google_api_MethodPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.PolicyProto.internal_static_google_api_MethodPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MethodPolicy.class, com.google.api.MethodPolicy.Builder.class); + } + + // Construct using com.google.api.MethodPolicy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selector_ = ""; + if (requestPoliciesBuilder_ == null) { + requestPolicies_ = java.util.Collections.emptyList(); + } else { + requestPolicies_ = null; + requestPoliciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.PolicyProto.internal_static_google_api_MethodPolicy_descriptor; + } + + @java.lang.Override + public com.google.api.MethodPolicy getDefaultInstanceForType() { + return com.google.api.MethodPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.MethodPolicy build() { + com.google.api.MethodPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.MethodPolicy buildPartial() { + com.google.api.MethodPolicy result = new com.google.api.MethodPolicy(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.MethodPolicy result) { + if (requestPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + requestPolicies_ = java.util.Collections.unmodifiableList(requestPolicies_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.requestPolicies_ = requestPolicies_; + } else { + result.requestPolicies_ = requestPoliciesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.MethodPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selector_ = selector_; + } + } + + @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.api.MethodPolicy) { + return mergeFrom((com.google.api.MethodPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MethodPolicy other) { + if (other == com.google.api.MethodPolicy.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (requestPoliciesBuilder_ == null) { + if (!other.requestPolicies_.isEmpty()) { + if (requestPolicies_.isEmpty()) { + requestPolicies_ = other.requestPolicies_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRequestPoliciesIsMutable(); + requestPolicies_.addAll(other.requestPolicies_); + } + onChanged(); + } + } else { + if (!other.requestPolicies_.isEmpty()) { + if (requestPoliciesBuilder_.isEmpty()) { + requestPoliciesBuilder_.dispose(); + requestPoliciesBuilder_ = null; + requestPolicies_ = other.requestPolicies_; + bitField0_ = (bitField0_ & ~0x00000002); + requestPoliciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequestPoliciesFieldBuilder() + : null; + } else { + requestPoliciesBuilder_.addAllMessages(other.requestPolicies_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.api.FieldPolicy m = + input.readMessage(com.google.api.FieldPolicy.parser(), extensionRegistry); + if (requestPoliciesBuilder_ == null) { + ensureRequestPoliciesIsMutable(); + requestPolicies_.add(m); + } else { + requestPoliciesBuilder_.addMessage(m); + } + break; + } // case 18 + case 74: + { + selector_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * + * + *
+     * Selects a method to which these policies should be enforced, for example,
+     * "google.pubsub.v1.Subscriber.CreateSubscription".
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     *
+     * NOTE: This field must not be set in the proto annotation. It will be
+     * automatically filled by the service config compiler .
+     * 
+ * + * string selector = 9; + * + * @return The selector. + */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Selects a method to which these policies should be enforced, for example,
+     * "google.pubsub.v1.Subscriber.CreateSubscription".
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     *
+     * NOTE: This field must not be set in the proto annotation. It will be
+     * automatically filled by the service config compiler .
+     * 
+ * + * string selector = 9; + * + * @return The bytes for selector. + */ + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Selects a method to which these policies should be enforced, for example,
+     * "google.pubsub.v1.Subscriber.CreateSubscription".
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     *
+     * NOTE: This field must not be set in the proto annotation. It will be
+     * automatically filled by the service config compiler .
+     * 
+ * + * string selector = 9; + * + * @param value The selector to set. + * @return This builder for chaining. + */ + public Builder setSelector(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Selects a method to which these policies should be enforced, for example,
+     * "google.pubsub.v1.Subscriber.CreateSubscription".
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     *
+     * NOTE: This field must not be set in the proto annotation. It will be
+     * automatically filled by the service config compiler .
+     * 
+ * + * string selector = 9; + * + * @return This builder for chaining. + */ + public Builder clearSelector() { + selector_ = getDefaultInstance().getSelector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Selects a method to which these policies should be enforced, for example,
+     * "google.pubsub.v1.Subscriber.CreateSubscription".
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     *
+     * NOTE: This field must not be set in the proto annotation. It will be
+     * automatically filled by the service config compiler .
+     * 
+ * + * string selector = 9; + * + * @param value The bytes for selector to set. + * @return This builder for chaining. + */ + public Builder setSelectorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List requestPolicies_ = + java.util.Collections.emptyList(); + + private void ensureRequestPoliciesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + requestPolicies_ = new java.util.ArrayList(requestPolicies_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.FieldPolicy, + com.google.api.FieldPolicy.Builder, + com.google.api.FieldPolicyOrBuilder> + requestPoliciesBuilder_; + + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public java.util.List getRequestPoliciesList() { + if (requestPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(requestPolicies_); + } else { + return requestPoliciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public int getRequestPoliciesCount() { + if (requestPoliciesBuilder_ == null) { + return requestPolicies_.size(); + } else { + return requestPoliciesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public com.google.api.FieldPolicy getRequestPolicies(int index) { + if (requestPoliciesBuilder_ == null) { + return requestPolicies_.get(index); + } else { + return requestPoliciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public Builder setRequestPolicies(int index, com.google.api.FieldPolicy value) { + if (requestPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestPoliciesIsMutable(); + requestPolicies_.set(index, value); + onChanged(); + } else { + requestPoliciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public Builder setRequestPolicies( + int index, com.google.api.FieldPolicy.Builder builderForValue) { + if (requestPoliciesBuilder_ == null) { + ensureRequestPoliciesIsMutable(); + requestPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + requestPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public Builder addRequestPolicies(com.google.api.FieldPolicy value) { + if (requestPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestPoliciesIsMutable(); + requestPolicies_.add(value); + onChanged(); + } else { + requestPoliciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public Builder addRequestPolicies(int index, com.google.api.FieldPolicy value) { + if (requestPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestPoliciesIsMutable(); + requestPolicies_.add(index, value); + onChanged(); + } else { + requestPoliciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public Builder addRequestPolicies(com.google.api.FieldPolicy.Builder builderForValue) { + if (requestPoliciesBuilder_ == null) { + ensureRequestPoliciesIsMutable(); + requestPolicies_.add(builderForValue.build()); + onChanged(); + } else { + requestPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public Builder addRequestPolicies( + int index, com.google.api.FieldPolicy.Builder builderForValue) { + if (requestPoliciesBuilder_ == null) { + ensureRequestPoliciesIsMutable(); + requestPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + requestPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public Builder addAllRequestPolicies( + java.lang.Iterable values) { + if (requestPoliciesBuilder_ == null) { + ensureRequestPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requestPolicies_); + onChanged(); + } else { + requestPoliciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public Builder clearRequestPolicies() { + if (requestPoliciesBuilder_ == null) { + requestPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + requestPoliciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public Builder removeRequestPolicies(int index) { + if (requestPoliciesBuilder_ == null) { + ensureRequestPoliciesIsMutable(); + requestPolicies_.remove(index); + onChanged(); + } else { + requestPoliciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public com.google.api.FieldPolicy.Builder getRequestPoliciesBuilder(int index) { + return getRequestPoliciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public com.google.api.FieldPolicyOrBuilder getRequestPoliciesOrBuilder(int index) { + if (requestPoliciesBuilder_ == null) { + return requestPolicies_.get(index); + } else { + return requestPoliciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public java.util.List + getRequestPoliciesOrBuilderList() { + if (requestPoliciesBuilder_ != null) { + return requestPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requestPolicies_); + } + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public com.google.api.FieldPolicy.Builder addRequestPoliciesBuilder() { + return getRequestPoliciesFieldBuilder() + .addBuilder(com.google.api.FieldPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public com.google.api.FieldPolicy.Builder addRequestPoliciesBuilder(int index) { + return getRequestPoliciesFieldBuilder() + .addBuilder(index, com.google.api.FieldPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Policies that are applicable to the request message.
+     * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + public java.util.List getRequestPoliciesBuilderList() { + return getRequestPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.FieldPolicy, + com.google.api.FieldPolicy.Builder, + com.google.api.FieldPolicyOrBuilder> + getRequestPoliciesFieldBuilder() { + if (requestPoliciesBuilder_ == null) { + requestPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.FieldPolicy, + com.google.api.FieldPolicy.Builder, + com.google.api.FieldPolicyOrBuilder>( + requestPolicies_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + requestPolicies_ = null; + } + return requestPoliciesBuilder_; + } + + @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.api.MethodPolicy) + } + + // @@protoc_insertion_point(class_scope:google.api.MethodPolicy) + private static final com.google.api.MethodPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.MethodPolicy(); + } + + public static com.google.api.MethodPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MethodPolicy 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.api.MethodPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodPolicyOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodPolicyOrBuilder.java new file mode 100644 index 000000000000..833d9a25f851 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodPolicyOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/policy.proto + +package com.google.api; + +public interface MethodPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.MethodPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Selects a method to which these policies should be enforced, for example,
+   * "google.pubsub.v1.Subscriber.CreateSubscription".
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   *
+   * NOTE: This field must not be set in the proto annotation. It will be
+   * automatically filled by the service config compiler .
+   * 
+ * + * string selector = 9; + * + * @return The selector. + */ + java.lang.String getSelector(); + /** + * + * + *
+   * Selects a method to which these policies should be enforced, for example,
+   * "google.pubsub.v1.Subscriber.CreateSubscription".
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   *
+   * NOTE: This field must not be set in the proto annotation. It will be
+   * automatically filled by the service config compiler .
+   * 
+ * + * string selector = 9; + * + * @return The bytes for selector. + */ + com.google.protobuf.ByteString getSelectorBytes(); + + /** + * + * + *
+   * Policies that are applicable to the request message.
+   * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + java.util.List getRequestPoliciesList(); + /** + * + * + *
+   * Policies that are applicable to the request message.
+   * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + com.google.api.FieldPolicy getRequestPolicies(int index); + /** + * + * + *
+   * Policies that are applicable to the request message.
+   * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + int getRequestPoliciesCount(); + /** + * + * + *
+   * Policies that are applicable to the request message.
+   * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + java.util.List getRequestPoliciesOrBuilderList(); + /** + * + * + *
+   * Policies that are applicable to the request message.
+   * 
+ * + * repeated .google.api.FieldPolicy request_policies = 2; + */ + com.google.api.FieldPolicyOrBuilder getRequestPoliciesOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodSettings.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodSettings.java new file mode 100644 index 000000000000..ac1e940b1cb6 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodSettings.java @@ -0,0 +1,2586 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * Describes the generator configuration for a method.
+ * 
+ * + * Protobuf type {@code google.api.MethodSettings} + */ +public final class MethodSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.MethodSettings) + MethodSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use MethodSettings.newBuilder() to construct. + private MethodSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MethodSettings() { + selector_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MethodSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_MethodSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_MethodSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MethodSettings.class, com.google.api.MethodSettings.Builder.class); + } + + public interface LongRunningOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.MethodSettings.LongRunning) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Initial delay after which the first poll request will be made.
+     * Default value: 5 seconds.
+     * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + * + * @return Whether the initialPollDelay field is set. + */ + boolean hasInitialPollDelay(); + /** + * + * + *
+     * Initial delay after which the first poll request will be made.
+     * Default value: 5 seconds.
+     * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + * + * @return The initialPollDelay. + */ + com.google.protobuf.Duration getInitialPollDelay(); + /** + * + * + *
+     * Initial delay after which the first poll request will be made.
+     * Default value: 5 seconds.
+     * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + */ + com.google.protobuf.DurationOrBuilder getInitialPollDelayOrBuilder(); + + /** + * + * + *
+     * Multiplier to gradually increase delay between subsequent polls until it
+     * reaches max_poll_delay.
+     * Default value: 1.5.
+     * 
+ * + * float poll_delay_multiplier = 2; + * + * @return The pollDelayMultiplier. + */ + float getPollDelayMultiplier(); + + /** + * + * + *
+     * Maximum time between two subsequent poll requests.
+     * Default value: 45 seconds.
+     * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + * + * @return Whether the maxPollDelay field is set. + */ + boolean hasMaxPollDelay(); + /** + * + * + *
+     * Maximum time between two subsequent poll requests.
+     * Default value: 45 seconds.
+     * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + * + * @return The maxPollDelay. + */ + com.google.protobuf.Duration getMaxPollDelay(); + /** + * + * + *
+     * Maximum time between two subsequent poll requests.
+     * Default value: 45 seconds.
+     * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + */ + com.google.protobuf.DurationOrBuilder getMaxPollDelayOrBuilder(); + + /** + * + * + *
+     * Total polling timeout.
+     * Default value: 5 minutes.
+     * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + * + * @return Whether the totalPollTimeout field is set. + */ + boolean hasTotalPollTimeout(); + /** + * + * + *
+     * Total polling timeout.
+     * Default value: 5 minutes.
+     * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + * + * @return The totalPollTimeout. + */ + com.google.protobuf.Duration getTotalPollTimeout(); + /** + * + * + *
+     * Total polling timeout.
+     * Default value: 5 minutes.
+     * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + */ + com.google.protobuf.DurationOrBuilder getTotalPollTimeoutOrBuilder(); + } + /** + * + * + *
+   * Describes settings to use when generating API methods that use the
+   * long-running operation pattern.
+   * All default values below are from those used in the client library
+   * generators (e.g.
+   * [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
+   * 
+ * + * Protobuf type {@code google.api.MethodSettings.LongRunning} + */ + public static final class LongRunning extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.MethodSettings.LongRunning) + LongRunningOrBuilder { + private static final long serialVersionUID = 0L; + // Use LongRunning.newBuilder() to construct. + private LongRunning(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LongRunning() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LongRunning(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto + .internal_static_google_api_MethodSettings_LongRunning_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto + .internal_static_google_api_MethodSettings_LongRunning_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MethodSettings.LongRunning.class, + com.google.api.MethodSettings.LongRunning.Builder.class); + } + + public static final int INITIAL_POLL_DELAY_FIELD_NUMBER = 1; + private com.google.protobuf.Duration initialPollDelay_; + /** + * + * + *
+     * Initial delay after which the first poll request will be made.
+     * Default value: 5 seconds.
+     * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + * + * @return Whether the initialPollDelay field is set. + */ + @java.lang.Override + public boolean hasInitialPollDelay() { + return initialPollDelay_ != null; + } + /** + * + * + *
+     * Initial delay after which the first poll request will be made.
+     * Default value: 5 seconds.
+     * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + * + * @return The initialPollDelay. + */ + @java.lang.Override + public com.google.protobuf.Duration getInitialPollDelay() { + return initialPollDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : initialPollDelay_; + } + /** + * + * + *
+     * Initial delay after which the first poll request will be made.
+     * Default value: 5 seconds.
+     * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getInitialPollDelayOrBuilder() { + return initialPollDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : initialPollDelay_; + } + + public static final int POLL_DELAY_MULTIPLIER_FIELD_NUMBER = 2; + private float pollDelayMultiplier_ = 0F; + /** + * + * + *
+     * Multiplier to gradually increase delay between subsequent polls until it
+     * reaches max_poll_delay.
+     * Default value: 1.5.
+     * 
+ * + * float poll_delay_multiplier = 2; + * + * @return The pollDelayMultiplier. + */ + @java.lang.Override + public float getPollDelayMultiplier() { + return pollDelayMultiplier_; + } + + public static final int MAX_POLL_DELAY_FIELD_NUMBER = 3; + private com.google.protobuf.Duration maxPollDelay_; + /** + * + * + *
+     * Maximum time between two subsequent poll requests.
+     * Default value: 45 seconds.
+     * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + * + * @return Whether the maxPollDelay field is set. + */ + @java.lang.Override + public boolean hasMaxPollDelay() { + return maxPollDelay_ != null; + } + /** + * + * + *
+     * Maximum time between two subsequent poll requests.
+     * Default value: 45 seconds.
+     * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + * + * @return The maxPollDelay. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxPollDelay() { + return maxPollDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxPollDelay_; + } + /** + * + * + *
+     * Maximum time between two subsequent poll requests.
+     * Default value: 45 seconds.
+     * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaxPollDelayOrBuilder() { + return maxPollDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxPollDelay_; + } + + public static final int TOTAL_POLL_TIMEOUT_FIELD_NUMBER = 4; + private com.google.protobuf.Duration totalPollTimeout_; + /** + * + * + *
+     * Total polling timeout.
+     * Default value: 5 minutes.
+     * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + * + * @return Whether the totalPollTimeout field is set. + */ + @java.lang.Override + public boolean hasTotalPollTimeout() { + return totalPollTimeout_ != null; + } + /** + * + * + *
+     * Total polling timeout.
+     * Default value: 5 minutes.
+     * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + * + * @return The totalPollTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getTotalPollTimeout() { + return totalPollTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalPollTimeout_; + } + /** + * + * + *
+     * Total polling timeout.
+     * Default value: 5 minutes.
+     * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTotalPollTimeoutOrBuilder() { + return totalPollTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalPollTimeout_; + } + + 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 (initialPollDelay_ != null) { + output.writeMessage(1, getInitialPollDelay()); + } + if (java.lang.Float.floatToRawIntBits(pollDelayMultiplier_) != 0) { + output.writeFloat(2, pollDelayMultiplier_); + } + if (maxPollDelay_ != null) { + output.writeMessage(3, getMaxPollDelay()); + } + if (totalPollTimeout_ != null) { + output.writeMessage(4, getTotalPollTimeout()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (initialPollDelay_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInitialPollDelay()); + } + if (java.lang.Float.floatToRawIntBits(pollDelayMultiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, pollDelayMultiplier_); + } + if (maxPollDelay_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMaxPollDelay()); + } + if (totalPollTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTotalPollTimeout()); + } + 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.api.MethodSettings.LongRunning)) { + return super.equals(obj); + } + com.google.api.MethodSettings.LongRunning other = + (com.google.api.MethodSettings.LongRunning) obj; + + if (hasInitialPollDelay() != other.hasInitialPollDelay()) return false; + if (hasInitialPollDelay()) { + if (!getInitialPollDelay().equals(other.getInitialPollDelay())) return false; + } + if (java.lang.Float.floatToIntBits(getPollDelayMultiplier()) + != java.lang.Float.floatToIntBits(other.getPollDelayMultiplier())) return false; + if (hasMaxPollDelay() != other.hasMaxPollDelay()) return false; + if (hasMaxPollDelay()) { + if (!getMaxPollDelay().equals(other.getMaxPollDelay())) return false; + } + if (hasTotalPollTimeout() != other.hasTotalPollTimeout()) return false; + if (hasTotalPollTimeout()) { + if (!getTotalPollTimeout().equals(other.getTotalPollTimeout())) 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 (hasInitialPollDelay()) { + hash = (37 * hash) + INITIAL_POLL_DELAY_FIELD_NUMBER; + hash = (53 * hash) + getInitialPollDelay().hashCode(); + } + hash = (37 * hash) + POLL_DELAY_MULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getPollDelayMultiplier()); + if (hasMaxPollDelay()) { + hash = (37 * hash) + MAX_POLL_DELAY_FIELD_NUMBER; + hash = (53 * hash) + getMaxPollDelay().hashCode(); + } + if (hasTotalPollTimeout()) { + hash = (37 * hash) + TOTAL_POLL_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTotalPollTimeout().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.MethodSettings.LongRunning parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MethodSettings.LongRunning parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MethodSettings.LongRunning parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MethodSettings.LongRunning 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.api.MethodSettings.LongRunning parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MethodSettings.LongRunning parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MethodSettings.LongRunning parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MethodSettings.LongRunning 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.api.MethodSettings.LongRunning parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.MethodSettings.LongRunning 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.api.MethodSettings.LongRunning parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MethodSettings.LongRunning 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.api.MethodSettings.LongRunning 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; + } + /** + * + * + *
+     * Describes settings to use when generating API methods that use the
+     * long-running operation pattern.
+     * All default values below are from those used in the client library
+     * generators (e.g.
+     * [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
+     * 
+ * + * Protobuf type {@code google.api.MethodSettings.LongRunning} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.MethodSettings.LongRunning) + com.google.api.MethodSettings.LongRunningOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto + .internal_static_google_api_MethodSettings_LongRunning_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto + .internal_static_google_api_MethodSettings_LongRunning_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MethodSettings.LongRunning.class, + com.google.api.MethodSettings.LongRunning.Builder.class); + } + + // Construct using com.google.api.MethodSettings.LongRunning.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + initialPollDelay_ = null; + if (initialPollDelayBuilder_ != null) { + initialPollDelayBuilder_.dispose(); + initialPollDelayBuilder_ = null; + } + pollDelayMultiplier_ = 0F; + maxPollDelay_ = null; + if (maxPollDelayBuilder_ != null) { + maxPollDelayBuilder_.dispose(); + maxPollDelayBuilder_ = null; + } + totalPollTimeout_ = null; + if (totalPollTimeoutBuilder_ != null) { + totalPollTimeoutBuilder_.dispose(); + totalPollTimeoutBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto + .internal_static_google_api_MethodSettings_LongRunning_descriptor; + } + + @java.lang.Override + public com.google.api.MethodSettings.LongRunning getDefaultInstanceForType() { + return com.google.api.MethodSettings.LongRunning.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.MethodSettings.LongRunning build() { + com.google.api.MethodSettings.LongRunning result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.MethodSettings.LongRunning buildPartial() { + com.google.api.MethodSettings.LongRunning result = + new com.google.api.MethodSettings.LongRunning(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.MethodSettings.LongRunning result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.initialPollDelay_ = + initialPollDelayBuilder_ == null + ? initialPollDelay_ + : initialPollDelayBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pollDelayMultiplier_ = pollDelayMultiplier_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxPollDelay_ = + maxPollDelayBuilder_ == null ? maxPollDelay_ : maxPollDelayBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.totalPollTimeout_ = + totalPollTimeoutBuilder_ == null + ? totalPollTimeout_ + : totalPollTimeoutBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MethodSettings.LongRunning) { + return mergeFrom((com.google.api.MethodSettings.LongRunning) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MethodSettings.LongRunning other) { + if (other == com.google.api.MethodSettings.LongRunning.getDefaultInstance()) return this; + if (other.hasInitialPollDelay()) { + mergeInitialPollDelay(other.getInitialPollDelay()); + } + if (other.getPollDelayMultiplier() != 0F) { + setPollDelayMultiplier(other.getPollDelayMultiplier()); + } + if (other.hasMaxPollDelay()) { + mergeMaxPollDelay(other.getMaxPollDelay()); + } + if (other.hasTotalPollTimeout()) { + mergeTotalPollTimeout(other.getTotalPollTimeout()); + } + 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( + getInitialPollDelayFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + pollDelayMultiplier_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 26: + { + input.readMessage(getMaxPollDelayFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getTotalPollTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Duration initialPollDelay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + initialPollDelayBuilder_; + /** + * + * + *
+       * Initial delay after which the first poll request will be made.
+       * Default value: 5 seconds.
+       * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + * + * @return Whether the initialPollDelay field is set. + */ + public boolean hasInitialPollDelay() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Initial delay after which the first poll request will be made.
+       * Default value: 5 seconds.
+       * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + * + * @return The initialPollDelay. + */ + public com.google.protobuf.Duration getInitialPollDelay() { + if (initialPollDelayBuilder_ == null) { + return initialPollDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : initialPollDelay_; + } else { + return initialPollDelayBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Initial delay after which the first poll request will be made.
+       * Default value: 5 seconds.
+       * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + */ + public Builder setInitialPollDelay(com.google.protobuf.Duration value) { + if (initialPollDelayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + initialPollDelay_ = value; + } else { + initialPollDelayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Initial delay after which the first poll request will be made.
+       * Default value: 5 seconds.
+       * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + */ + public Builder setInitialPollDelay(com.google.protobuf.Duration.Builder builderForValue) { + if (initialPollDelayBuilder_ == null) { + initialPollDelay_ = builderForValue.build(); + } else { + initialPollDelayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Initial delay after which the first poll request will be made.
+       * Default value: 5 seconds.
+       * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + */ + public Builder mergeInitialPollDelay(com.google.protobuf.Duration value) { + if (initialPollDelayBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && initialPollDelay_ != null + && initialPollDelay_ != com.google.protobuf.Duration.getDefaultInstance()) { + getInitialPollDelayBuilder().mergeFrom(value); + } else { + initialPollDelay_ = value; + } + } else { + initialPollDelayBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Initial delay after which the first poll request will be made.
+       * Default value: 5 seconds.
+       * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + */ + public Builder clearInitialPollDelay() { + bitField0_ = (bitField0_ & ~0x00000001); + initialPollDelay_ = null; + if (initialPollDelayBuilder_ != null) { + initialPollDelayBuilder_.dispose(); + initialPollDelayBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Initial delay after which the first poll request will be made.
+       * Default value: 5 seconds.
+       * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + */ + public com.google.protobuf.Duration.Builder getInitialPollDelayBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInitialPollDelayFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Initial delay after which the first poll request will be made.
+       * Default value: 5 seconds.
+       * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + */ + public com.google.protobuf.DurationOrBuilder getInitialPollDelayOrBuilder() { + if (initialPollDelayBuilder_ != null) { + return initialPollDelayBuilder_.getMessageOrBuilder(); + } else { + return initialPollDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : initialPollDelay_; + } + } + /** + * + * + *
+       * Initial delay after which the first poll request will be made.
+       * Default value: 5 seconds.
+       * 
+ * + * .google.protobuf.Duration initial_poll_delay = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getInitialPollDelayFieldBuilder() { + if (initialPollDelayBuilder_ == null) { + initialPollDelayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getInitialPollDelay(), getParentForChildren(), isClean()); + initialPollDelay_ = null; + } + return initialPollDelayBuilder_; + } + + private float pollDelayMultiplier_; + /** + * + * + *
+       * Multiplier to gradually increase delay between subsequent polls until it
+       * reaches max_poll_delay.
+       * Default value: 1.5.
+       * 
+ * + * float poll_delay_multiplier = 2; + * + * @return The pollDelayMultiplier. + */ + @java.lang.Override + public float getPollDelayMultiplier() { + return pollDelayMultiplier_; + } + /** + * + * + *
+       * Multiplier to gradually increase delay between subsequent polls until it
+       * reaches max_poll_delay.
+       * Default value: 1.5.
+       * 
+ * + * float poll_delay_multiplier = 2; + * + * @param value The pollDelayMultiplier to set. + * @return This builder for chaining. + */ + public Builder setPollDelayMultiplier(float value) { + + pollDelayMultiplier_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Multiplier to gradually increase delay between subsequent polls until it
+       * reaches max_poll_delay.
+       * Default value: 1.5.
+       * 
+ * + * float poll_delay_multiplier = 2; + * + * @return This builder for chaining. + */ + public Builder clearPollDelayMultiplier() { + bitField0_ = (bitField0_ & ~0x00000002); + pollDelayMultiplier_ = 0F; + onChanged(); + return this; + } + + private com.google.protobuf.Duration maxPollDelay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maxPollDelayBuilder_; + /** + * + * + *
+       * Maximum time between two subsequent poll requests.
+       * Default value: 45 seconds.
+       * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + * + * @return Whether the maxPollDelay field is set. + */ + public boolean hasMaxPollDelay() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Maximum time between two subsequent poll requests.
+       * Default value: 45 seconds.
+       * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + * + * @return The maxPollDelay. + */ + public com.google.protobuf.Duration getMaxPollDelay() { + if (maxPollDelayBuilder_ == null) { + return maxPollDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxPollDelay_; + } else { + return maxPollDelayBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Maximum time between two subsequent poll requests.
+       * Default value: 45 seconds.
+       * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + */ + public Builder setMaxPollDelay(com.google.protobuf.Duration value) { + if (maxPollDelayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxPollDelay_ = value; + } else { + maxPollDelayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Maximum time between two subsequent poll requests.
+       * Default value: 45 seconds.
+       * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + */ + public Builder setMaxPollDelay(com.google.protobuf.Duration.Builder builderForValue) { + if (maxPollDelayBuilder_ == null) { + maxPollDelay_ = builderForValue.build(); + } else { + maxPollDelayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Maximum time between two subsequent poll requests.
+       * Default value: 45 seconds.
+       * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + */ + public Builder mergeMaxPollDelay(com.google.protobuf.Duration value) { + if (maxPollDelayBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && maxPollDelay_ != null + && maxPollDelay_ != com.google.protobuf.Duration.getDefaultInstance()) { + getMaxPollDelayBuilder().mergeFrom(value); + } else { + maxPollDelay_ = value; + } + } else { + maxPollDelayBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Maximum time between two subsequent poll requests.
+       * Default value: 45 seconds.
+       * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + */ + public Builder clearMaxPollDelay() { + bitField0_ = (bitField0_ & ~0x00000004); + maxPollDelay_ = null; + if (maxPollDelayBuilder_ != null) { + maxPollDelayBuilder_.dispose(); + maxPollDelayBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Maximum time between two subsequent poll requests.
+       * Default value: 45 seconds.
+       * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + */ + public com.google.protobuf.Duration.Builder getMaxPollDelayBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMaxPollDelayFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Maximum time between two subsequent poll requests.
+       * Default value: 45 seconds.
+       * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + */ + public com.google.protobuf.DurationOrBuilder getMaxPollDelayOrBuilder() { + if (maxPollDelayBuilder_ != null) { + return maxPollDelayBuilder_.getMessageOrBuilder(); + } else { + return maxPollDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxPollDelay_; + } + } + /** + * + * + *
+       * Maximum time between two subsequent poll requests.
+       * Default value: 45 seconds.
+       * 
+ * + * .google.protobuf.Duration max_poll_delay = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaxPollDelayFieldBuilder() { + if (maxPollDelayBuilder_ == null) { + maxPollDelayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMaxPollDelay(), getParentForChildren(), isClean()); + maxPollDelay_ = null; + } + return maxPollDelayBuilder_; + } + + private com.google.protobuf.Duration totalPollTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + totalPollTimeoutBuilder_; + /** + * + * + *
+       * Total polling timeout.
+       * Default value: 5 minutes.
+       * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + * + * @return Whether the totalPollTimeout field is set. + */ + public boolean hasTotalPollTimeout() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Total polling timeout.
+       * Default value: 5 minutes.
+       * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + * + * @return The totalPollTimeout. + */ + public com.google.protobuf.Duration getTotalPollTimeout() { + if (totalPollTimeoutBuilder_ == null) { + return totalPollTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalPollTimeout_; + } else { + return totalPollTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Total polling timeout.
+       * Default value: 5 minutes.
+       * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + */ + public Builder setTotalPollTimeout(com.google.protobuf.Duration value) { + if (totalPollTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + totalPollTimeout_ = value; + } else { + totalPollTimeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Total polling timeout.
+       * Default value: 5 minutes.
+       * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + */ + public Builder setTotalPollTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (totalPollTimeoutBuilder_ == null) { + totalPollTimeout_ = builderForValue.build(); + } else { + totalPollTimeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Total polling timeout.
+       * Default value: 5 minutes.
+       * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + */ + public Builder mergeTotalPollTimeout(com.google.protobuf.Duration value) { + if (totalPollTimeoutBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && totalPollTimeout_ != null + && totalPollTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTotalPollTimeoutBuilder().mergeFrom(value); + } else { + totalPollTimeout_ = value; + } + } else { + totalPollTimeoutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Total polling timeout.
+       * Default value: 5 minutes.
+       * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + */ + public Builder clearTotalPollTimeout() { + bitField0_ = (bitField0_ & ~0x00000008); + totalPollTimeout_ = null; + if (totalPollTimeoutBuilder_ != null) { + totalPollTimeoutBuilder_.dispose(); + totalPollTimeoutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Total polling timeout.
+       * Default value: 5 minutes.
+       * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + */ + public com.google.protobuf.Duration.Builder getTotalPollTimeoutBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTotalPollTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Total polling timeout.
+       * Default value: 5 minutes.
+       * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + */ + public com.google.protobuf.DurationOrBuilder getTotalPollTimeoutOrBuilder() { + if (totalPollTimeoutBuilder_ != null) { + return totalPollTimeoutBuilder_.getMessageOrBuilder(); + } else { + return totalPollTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalPollTimeout_; + } + } + /** + * + * + *
+       * Total polling timeout.
+       * Default value: 5 minutes.
+       * 
+ * + * .google.protobuf.Duration total_poll_timeout = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTotalPollTimeoutFieldBuilder() { + if (totalPollTimeoutBuilder_ == null) { + totalPollTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTotalPollTimeout(), getParentForChildren(), isClean()); + totalPollTimeout_ = null; + } + return totalPollTimeoutBuilder_; + } + + @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.api.MethodSettings.LongRunning) + } + + // @@protoc_insertion_point(class_scope:google.api.MethodSettings.LongRunning) + private static final com.google.api.MethodSettings.LongRunning DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.MethodSettings.LongRunning(); + } + + public static com.google.api.MethodSettings.LongRunning getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LongRunning 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.api.MethodSettings.LongRunning getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object selector_ = ""; + /** + * + * + *
+   * The fully qualified name of the method, for which the options below apply.
+   * This is used to find the method to apply the options.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + @java.lang.Override + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * + * + *
+   * The fully qualified name of the method, for which the options below apply.
+   * This is used to find the method to apply the options.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LONG_RUNNING_FIELD_NUMBER = 2; + private com.google.api.MethodSettings.LongRunning longRunning_; + /** + * + * + *
+   * Describes settings to use for long-running operations when generating
+   * API methods for RPCs. Complements RPCs that use the annotations in
+   * google/longrunning/operations.proto.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    method_settings:
+   *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+   *        long_running:
+   *          initial_poll_delay:
+   *            seconds: 60 # 1 minute
+   *          poll_delay_multiplier: 1.5
+   *          max_poll_delay:
+   *            seconds: 360 # 6 minutes
+   *          total_poll_timeout:
+   *             seconds: 54000 # 90 minutes
+   * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + * + * @return Whether the longRunning field is set. + */ + @java.lang.Override + public boolean hasLongRunning() { + return longRunning_ != null; + } + /** + * + * + *
+   * Describes settings to use for long-running operations when generating
+   * API methods for RPCs. Complements RPCs that use the annotations in
+   * google/longrunning/operations.proto.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    method_settings:
+   *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+   *        long_running:
+   *          initial_poll_delay:
+   *            seconds: 60 # 1 minute
+   *          poll_delay_multiplier: 1.5
+   *          max_poll_delay:
+   *            seconds: 360 # 6 minutes
+   *          total_poll_timeout:
+   *             seconds: 54000 # 90 minutes
+   * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + * + * @return The longRunning. + */ + @java.lang.Override + public com.google.api.MethodSettings.LongRunning getLongRunning() { + return longRunning_ == null + ? com.google.api.MethodSettings.LongRunning.getDefaultInstance() + : longRunning_; + } + /** + * + * + *
+   * Describes settings to use for long-running operations when generating
+   * API methods for RPCs. Complements RPCs that use the annotations in
+   * google/longrunning/operations.proto.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    method_settings:
+   *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+   *        long_running:
+   *          initial_poll_delay:
+   *            seconds: 60 # 1 minute
+   *          poll_delay_multiplier: 1.5
+   *          max_poll_delay:
+   *            seconds: 360 # 6 minutes
+   *          total_poll_timeout:
+   *             seconds: 54000 # 90 minutes
+   * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + */ + @java.lang.Override + public com.google.api.MethodSettings.LongRunningOrBuilder getLongRunningOrBuilder() { + return longRunning_ == null + ? com.google.api.MethodSettings.LongRunning.getDefaultInstance() + : longRunning_; + } + + 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(selector_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_); + } + if (longRunning_ != null) { + output.writeMessage(2, getLongRunning()); + } + 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(selector_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_); + } + if (longRunning_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLongRunning()); + } + 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.api.MethodSettings)) { + return super.equals(obj); + } + com.google.api.MethodSettings other = (com.google.api.MethodSettings) obj; + + if (!getSelector().equals(other.getSelector())) return false; + if (hasLongRunning() != other.hasLongRunning()) return false; + if (hasLongRunning()) { + if (!getLongRunning().equals(other.getLongRunning())) 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) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + if (hasLongRunning()) { + hash = (37 * hash) + LONG_RUNNING_FIELD_NUMBER; + hash = (53 * hash) + getLongRunning().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.MethodSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MethodSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MethodSettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MethodSettings 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.api.MethodSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MethodSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MethodSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MethodSettings 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.api.MethodSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.MethodSettings 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.api.MethodSettings parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MethodSettings 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.api.MethodSettings 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; + } + /** + * + * + *
+   * Describes the generator configuration for a method.
+   * 
+ * + * Protobuf type {@code google.api.MethodSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.MethodSettings) + com.google.api.MethodSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_MethodSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_MethodSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MethodSettings.class, com.google.api.MethodSettings.Builder.class); + } + + // Construct using com.google.api.MethodSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selector_ = ""; + longRunning_ = null; + if (longRunningBuilder_ != null) { + longRunningBuilder_.dispose(); + longRunningBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto.internal_static_google_api_MethodSettings_descriptor; + } + + @java.lang.Override + public com.google.api.MethodSettings getDefaultInstanceForType() { + return com.google.api.MethodSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.MethodSettings build() { + com.google.api.MethodSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.MethodSettings buildPartial() { + com.google.api.MethodSettings result = new com.google.api.MethodSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.MethodSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selector_ = selector_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.longRunning_ = + longRunningBuilder_ == null ? longRunning_ : longRunningBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MethodSettings) { + return mergeFrom((com.google.api.MethodSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MethodSettings other) { + if (other == com.google.api.MethodSettings.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLongRunning()) { + mergeLongRunning(other.getLongRunning()); + } + 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: + { + selector_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getLongRunningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * + * + *
+     * The fully qualified name of the method, for which the options below apply.
+     * This is used to find the method to apply the options.
+     * 
+ * + * string selector = 1; + * + * @return The selector. + */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The fully qualified name of the method, for which the options below apply.
+     * This is used to find the method to apply the options.
+     * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The fully qualified name of the method, for which the options below apply.
+     * This is used to find the method to apply the options.
+     * 
+ * + * string selector = 1; + * + * @param value The selector to set. + * @return This builder for chaining. + */ + public Builder setSelector(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The fully qualified name of the method, for which the options below apply.
+     * This is used to find the method to apply the options.
+     * 
+ * + * string selector = 1; + * + * @return This builder for chaining. + */ + public Builder clearSelector() { + selector_ = getDefaultInstance().getSelector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The fully qualified name of the method, for which the options below apply.
+     * This is used to find the method to apply the options.
+     * 
+ * + * string selector = 1; + * + * @param value The bytes for selector to set. + * @return This builder for chaining. + */ + public Builder setSelectorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.api.MethodSettings.LongRunning longRunning_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.MethodSettings.LongRunning, + com.google.api.MethodSettings.LongRunning.Builder, + com.google.api.MethodSettings.LongRunningOrBuilder> + longRunningBuilder_; + /** + * + * + *
+     * Describes settings to use for long-running operations when generating
+     * API methods for RPCs. Complements RPCs that use the annotations in
+     * google/longrunning/operations.proto.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    method_settings:
+     *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+     *        long_running:
+     *          initial_poll_delay:
+     *            seconds: 60 # 1 minute
+     *          poll_delay_multiplier: 1.5
+     *          max_poll_delay:
+     *            seconds: 360 # 6 minutes
+     *          total_poll_timeout:
+     *             seconds: 54000 # 90 minutes
+     * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + * + * @return Whether the longRunning field is set. + */ + public boolean hasLongRunning() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Describes settings to use for long-running operations when generating
+     * API methods for RPCs. Complements RPCs that use the annotations in
+     * google/longrunning/operations.proto.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    method_settings:
+     *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+     *        long_running:
+     *          initial_poll_delay:
+     *            seconds: 60 # 1 minute
+     *          poll_delay_multiplier: 1.5
+     *          max_poll_delay:
+     *            seconds: 360 # 6 minutes
+     *          total_poll_timeout:
+     *             seconds: 54000 # 90 minutes
+     * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + * + * @return The longRunning. + */ + public com.google.api.MethodSettings.LongRunning getLongRunning() { + if (longRunningBuilder_ == null) { + return longRunning_ == null + ? com.google.api.MethodSettings.LongRunning.getDefaultInstance() + : longRunning_; + } else { + return longRunningBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Describes settings to use for long-running operations when generating
+     * API methods for RPCs. Complements RPCs that use the annotations in
+     * google/longrunning/operations.proto.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    method_settings:
+     *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+     *        long_running:
+     *          initial_poll_delay:
+     *            seconds: 60 # 1 minute
+     *          poll_delay_multiplier: 1.5
+     *          max_poll_delay:
+     *            seconds: 360 # 6 minutes
+     *          total_poll_timeout:
+     *             seconds: 54000 # 90 minutes
+     * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + */ + public Builder setLongRunning(com.google.api.MethodSettings.LongRunning value) { + if (longRunningBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + longRunning_ = value; + } else { + longRunningBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Describes settings to use for long-running operations when generating
+     * API methods for RPCs. Complements RPCs that use the annotations in
+     * google/longrunning/operations.proto.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    method_settings:
+     *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+     *        long_running:
+     *          initial_poll_delay:
+     *            seconds: 60 # 1 minute
+     *          poll_delay_multiplier: 1.5
+     *          max_poll_delay:
+     *            seconds: 360 # 6 minutes
+     *          total_poll_timeout:
+     *             seconds: 54000 # 90 minutes
+     * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + */ + public Builder setLongRunning( + com.google.api.MethodSettings.LongRunning.Builder builderForValue) { + if (longRunningBuilder_ == null) { + longRunning_ = builderForValue.build(); + } else { + longRunningBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Describes settings to use for long-running operations when generating
+     * API methods for RPCs. Complements RPCs that use the annotations in
+     * google/longrunning/operations.proto.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    method_settings:
+     *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+     *        long_running:
+     *          initial_poll_delay:
+     *            seconds: 60 # 1 minute
+     *          poll_delay_multiplier: 1.5
+     *          max_poll_delay:
+     *            seconds: 360 # 6 minutes
+     *          total_poll_timeout:
+     *             seconds: 54000 # 90 minutes
+     * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + */ + public Builder mergeLongRunning(com.google.api.MethodSettings.LongRunning value) { + if (longRunningBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && longRunning_ != null + && longRunning_ != com.google.api.MethodSettings.LongRunning.getDefaultInstance()) { + getLongRunningBuilder().mergeFrom(value); + } else { + longRunning_ = value; + } + } else { + longRunningBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Describes settings to use for long-running operations when generating
+     * API methods for RPCs. Complements RPCs that use the annotations in
+     * google/longrunning/operations.proto.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    method_settings:
+     *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+     *        long_running:
+     *          initial_poll_delay:
+     *            seconds: 60 # 1 minute
+     *          poll_delay_multiplier: 1.5
+     *          max_poll_delay:
+     *            seconds: 360 # 6 minutes
+     *          total_poll_timeout:
+     *             seconds: 54000 # 90 minutes
+     * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + */ + public Builder clearLongRunning() { + bitField0_ = (bitField0_ & ~0x00000002); + longRunning_ = null; + if (longRunningBuilder_ != null) { + longRunningBuilder_.dispose(); + longRunningBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Describes settings to use for long-running operations when generating
+     * API methods for RPCs. Complements RPCs that use the annotations in
+     * google/longrunning/operations.proto.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    method_settings:
+     *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+     *        long_running:
+     *          initial_poll_delay:
+     *            seconds: 60 # 1 minute
+     *          poll_delay_multiplier: 1.5
+     *          max_poll_delay:
+     *            seconds: 360 # 6 minutes
+     *          total_poll_timeout:
+     *             seconds: 54000 # 90 minutes
+     * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + */ + public com.google.api.MethodSettings.LongRunning.Builder getLongRunningBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLongRunningFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describes settings to use for long-running operations when generating
+     * API methods for RPCs. Complements RPCs that use the annotations in
+     * google/longrunning/operations.proto.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    method_settings:
+     *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+     *        long_running:
+     *          initial_poll_delay:
+     *            seconds: 60 # 1 minute
+     *          poll_delay_multiplier: 1.5
+     *          max_poll_delay:
+     *            seconds: 360 # 6 minutes
+     *          total_poll_timeout:
+     *             seconds: 54000 # 90 minutes
+     * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + */ + public com.google.api.MethodSettings.LongRunningOrBuilder getLongRunningOrBuilder() { + if (longRunningBuilder_ != null) { + return longRunningBuilder_.getMessageOrBuilder(); + } else { + return longRunning_ == null + ? com.google.api.MethodSettings.LongRunning.getDefaultInstance() + : longRunning_; + } + } + /** + * + * + *
+     * Describes settings to use for long-running operations when generating
+     * API methods for RPCs. Complements RPCs that use the annotations in
+     * google/longrunning/operations.proto.
+     *
+     * Example of a YAML configuration::
+     *
+     *  publishing:
+     *    method_settings:
+     *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+     *        long_running:
+     *          initial_poll_delay:
+     *            seconds: 60 # 1 minute
+     *          poll_delay_multiplier: 1.5
+     *          max_poll_delay:
+     *            seconds: 360 # 6 minutes
+     *          total_poll_timeout:
+     *             seconds: 54000 # 90 minutes
+     * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.MethodSettings.LongRunning, + com.google.api.MethodSettings.LongRunning.Builder, + com.google.api.MethodSettings.LongRunningOrBuilder> + getLongRunningFieldBuilder() { + if (longRunningBuilder_ == null) { + longRunningBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.MethodSettings.LongRunning, + com.google.api.MethodSettings.LongRunning.Builder, + com.google.api.MethodSettings.LongRunningOrBuilder>( + getLongRunning(), getParentForChildren(), isClean()); + longRunning_ = null; + } + return longRunningBuilder_; + } + + @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.api.MethodSettings) + } + + // @@protoc_insertion_point(class_scope:google.api.MethodSettings) + private static final com.google.api.MethodSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.MethodSettings(); + } + + public static com.google.api.MethodSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MethodSettings 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.api.MethodSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodSettingsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodSettingsOrBuilder.java new file mode 100644 index 000000000000..b433c750c894 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MethodSettingsOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface MethodSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.MethodSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The fully qualified name of the method, for which the options below apply.
+   * This is used to find the method to apply the options.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + java.lang.String getSelector(); + /** + * + * + *
+   * The fully qualified name of the method, for which the options below apply.
+   * This is used to find the method to apply the options.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + com.google.protobuf.ByteString getSelectorBytes(); + + /** + * + * + *
+   * Describes settings to use for long-running operations when generating
+   * API methods for RPCs. Complements RPCs that use the annotations in
+   * google/longrunning/operations.proto.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    method_settings:
+   *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+   *        long_running:
+   *          initial_poll_delay:
+   *            seconds: 60 # 1 minute
+   *          poll_delay_multiplier: 1.5
+   *          max_poll_delay:
+   *            seconds: 360 # 6 minutes
+   *          total_poll_timeout:
+   *             seconds: 54000 # 90 minutes
+   * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + * + * @return Whether the longRunning field is set. + */ + boolean hasLongRunning(); + /** + * + * + *
+   * Describes settings to use for long-running operations when generating
+   * API methods for RPCs. Complements RPCs that use the annotations in
+   * google/longrunning/operations.proto.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    method_settings:
+   *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+   *        long_running:
+   *          initial_poll_delay:
+   *            seconds: 60 # 1 minute
+   *          poll_delay_multiplier: 1.5
+   *          max_poll_delay:
+   *            seconds: 360 # 6 minutes
+   *          total_poll_timeout:
+   *             seconds: 54000 # 90 minutes
+   * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + * + * @return The longRunning. + */ + com.google.api.MethodSettings.LongRunning getLongRunning(); + /** + * + * + *
+   * Describes settings to use for long-running operations when generating
+   * API methods for RPCs. Complements RPCs that use the annotations in
+   * google/longrunning/operations.proto.
+   *
+   * Example of a YAML configuration::
+   *
+   *  publishing:
+   *    method_settings:
+   *      - selector: google.cloud.speech.v2.Speech.BatchRecognize
+   *        long_running:
+   *          initial_poll_delay:
+   *            seconds: 60 # 1 minute
+   *          poll_delay_multiplier: 1.5
+   *          max_poll_delay:
+   *            seconds: 360 # 6 minutes
+   *          total_poll_timeout:
+   *             seconds: 54000 # 90 minutes
+   * 
+ * + * .google.api.MethodSettings.LongRunning long_running = 2; + */ + com.google.api.MethodSettings.LongRunningOrBuilder getLongRunningOrBuilder(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Metric.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Metric.java new file mode 100644 index 000000000000..ef373cf2f5cd --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Metric.java @@ -0,0 +1,971 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/metric.proto + +package com.google.api; + +/** + * + * + *
+ * A specific metric, identified by specifying values for all of the
+ * labels of a [`MetricDescriptor`][google.api.MetricDescriptor].
+ * 
+ * + * Protobuf type {@code google.api.Metric} + */ +public final class Metric extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Metric) + MetricOrBuilder { + private static final long serialVersionUID = 0L; + // Use Metric.newBuilder() to construct. + private Metric(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Metric() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Metric(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MetricProto.internal_static_google_api_Metric_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MetricProto.internal_static_google_api_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Metric.class, com.google.api.Metric.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+   * An existing metric type, see
+   * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+   * `custom.googleapis.com/invoice/paid/amount`.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * An existing metric type, see
+   * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+   * `custom.googleapis.com/invoice/paid/amount`.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 2; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.MetricProto.internal_static_google_api_Metric_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(); + } + /** + * + * + *
+   * The set of label values that uniquely identify this metric. All
+   * labels listed in the `MetricDescriptor` must be assigned values.
+   * 
+ * + * map<string, string> labels = 2; + */ + @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(); + } + /** + * + * + *
+   * The set of label values that uniquely identify this metric. All
+   * labels listed in the `MetricDescriptor` must be assigned values.
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The set of label values that uniquely identify this metric. All
+   * labels listed in the `MetricDescriptor` must be assigned values.
+   * 
+ * + * map<string, string> labels = 2; + */ + @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; + } + /** + * + * + *
+   * The set of label values that uniquely identify this metric. All
+   * labels listed in the `MetricDescriptor` must be assigned values.
+   * 
+ * + * map<string, string> labels = 2; + */ + @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); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.Metric)) { + return super.equals(obj); + } + com.google.api.Metric other = (com.google.api.Metric) obj; + + if (!getType().equals(other.getType())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Metric parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Metric parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Metric parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Metric parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Metric parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Metric parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Metric parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Metric 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.api.Metric parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Metric 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.api.Metric parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Metric 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.api.Metric prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A specific metric, identified by specifying values for all of the
+   * labels of a [`MetricDescriptor`][google.api.MetricDescriptor].
+   * 
+ * + * Protobuf type {@code google.api.Metric} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Metric) + com.google.api.MetricOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MetricProto.internal_static_google_api_Metric_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MetricProto.internal_static_google_api_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Metric.class, com.google.api.Metric.Builder.class); + } + + // Construct using com.google.api.Metric.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.MetricProto.internal_static_google_api_Metric_descriptor; + } + + @java.lang.Override + public com.google.api.Metric getDefaultInstanceForType() { + return com.google.api.Metric.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Metric build() { + com.google.api.Metric result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Metric buildPartial() { + com.google.api.Metric result = new com.google.api.Metric(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Metric result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Metric) { + return mergeFrom((com.google.api.Metric) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Metric other) { + if (other == com.google.api.Metric.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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 type_ = ""; + /** + * + * + *
+     * An existing metric type, see
+     * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+     * `custom.googleapis.com/invoice/paid/amount`.
+     * 
+ * + * string type = 3; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An existing metric type, see
+     * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+     * `custom.googleapis.com/invoice/paid/amount`.
+     * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An existing metric type, see
+     * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+     * `custom.googleapis.com/invoice/paid/amount`.
+     * 
+ * + * string type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * An existing metric type, see
+     * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+     * `custom.googleapis.com/invoice/paid/amount`.
+     * 
+ * + * string type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * An existing metric type, see
+     * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+     * `custom.googleapis.com/invoice/paid/amount`.
+     * 
+ * + * string type = 3; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + 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_ |= 0x00000002; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The set of label values that uniquely identify this metric. All
+     * labels listed in the `MetricDescriptor` must be assigned values.
+     * 
+ * + * map<string, string> labels = 2; + */ + @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(); + } + /** + * + * + *
+     * The set of label values that uniquely identify this metric. All
+     * labels listed in the `MetricDescriptor` must be assigned values.
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The set of label values that uniquely identify this metric. All
+     * labels listed in the `MetricDescriptor` must be assigned values.
+     * 
+ * + * map<string, string> labels = 2; + */ + @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; + } + /** + * + * + *
+     * The set of label values that uniquely identify this metric. All
+     * labels listed in the `MetricDescriptor` must be assigned values.
+     * 
+ * + * map<string, string> labels = 2; + */ + @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_ & ~0x00000002); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The set of label values that uniquely identify this metric. All
+     * labels listed in the `MetricDescriptor` must be assigned values.
+     * 
+ * + * map<string, string> labels = 2; + */ + 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_ |= 0x00000002; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The set of label values that uniquely identify this metric. All
+     * labels listed in the `MetricDescriptor` must be assigned values.
+     * 
+ * + * map<string, string> labels = 2; + */ + 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_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * The set of label values that uniquely identify this metric. All
+     * labels listed in the `MetricDescriptor` must be assigned values.
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.Metric) + } + + // @@protoc_insertion_point(class_scope:google.api.Metric) + private static final com.google.api.Metric DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Metric(); + } + + public static com.google.api.Metric getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metric parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.Metric getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricDescriptor.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricDescriptor.java new file mode 100644 index 000000000000..f976c84695a5 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricDescriptor.java @@ -0,0 +1,5562 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/metric.proto + +package com.google.api; + +/** + * + * + *
+ * Defines a metric type and its schema. Once a metric descriptor is created,
+ * deleting or altering it stops data collection and makes the metric type's
+ * existing data unusable.
+ * 
+ * + * Protobuf type {@code google.api.MetricDescriptor} + */ +public final class MetricDescriptor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.MetricDescriptor) + MetricDescriptorOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetricDescriptor.newBuilder() to construct. + private MetricDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MetricDescriptor() { + name_ = ""; + type_ = ""; + labels_ = java.util.Collections.emptyList(); + metricKind_ = 0; + valueType_ = 0; + unit_ = ""; + description_ = ""; + displayName_ = ""; + launchStage_ = 0; + monitoredResourceTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MetricDescriptor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MetricDescriptor.class, com.google.api.MetricDescriptor.Builder.class); + } + + /** + * + * + *
+   * The kind of measurement. It describes how the data is reported.
+   * For information on setting the start time and end time based on
+   * the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval].
+   * 
+ * + * Protobuf enum {@code google.api.MetricDescriptor.MetricKind} + */ + public enum MetricKind implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Do not use this default value.
+     * 
+ * + * METRIC_KIND_UNSPECIFIED = 0; + */ + METRIC_KIND_UNSPECIFIED(0), + /** + * + * + *
+     * An instantaneous measurement of a value.
+     * 
+ * + * GAUGE = 1; + */ + GAUGE(1), + /** + * + * + *
+     * The change in a value during a time interval.
+     * 
+ * + * DELTA = 2; + */ + DELTA(2), + /** + * + * + *
+     * A value accumulated over a time interval.  Cumulative
+     * measurements in a time series should have the same start time
+     * and increasing end times, until an event resets the cumulative
+     * value to zero and sets a new start time for the following
+     * points.
+     * 
+ * + * CUMULATIVE = 3; + */ + CUMULATIVE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Do not use this default value.
+     * 
+ * + * METRIC_KIND_UNSPECIFIED = 0; + */ + public static final int METRIC_KIND_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * An instantaneous measurement of a value.
+     * 
+ * + * GAUGE = 1; + */ + public static final int GAUGE_VALUE = 1; + /** + * + * + *
+     * The change in a value during a time interval.
+     * 
+ * + * DELTA = 2; + */ + public static final int DELTA_VALUE = 2; + /** + * + * + *
+     * A value accumulated over a time interval.  Cumulative
+     * measurements in a time series should have the same start time
+     * and increasing end times, until an event resets the cumulative
+     * value to zero and sets a new start time for the following
+     * points.
+     * 
+ * + * CUMULATIVE = 3; + */ + public static final int CUMULATIVE_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 MetricKind 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 MetricKind forNumber(int value) { + switch (value) { + case 0: + return METRIC_KIND_UNSPECIFIED; + case 1: + return GAUGE; + case 2: + return DELTA; + case 3: + return CUMULATIVE; + 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 MetricKind findValueByNumber(int number) { + return MetricKind.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.api.MetricDescriptor.getDescriptor().getEnumTypes().get(0); + } + + private static final MetricKind[] VALUES = values(); + + public static MetricKind 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 MetricKind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.MetricDescriptor.MetricKind) + } + + /** + * + * + *
+   * The value type of a metric.
+   * 
+ * + * Protobuf enum {@code google.api.MetricDescriptor.ValueType} + */ + public enum ValueType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Do not use this default value.
+     * 
+ * + * VALUE_TYPE_UNSPECIFIED = 0; + */ + VALUE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The value is a boolean.
+     * This value type can be used only if the metric kind is `GAUGE`.
+     * 
+ * + * BOOL = 1; + */ + BOOL(1), + /** + * + * + *
+     * The value is a signed 64-bit integer.
+     * 
+ * + * INT64 = 2; + */ + INT64(2), + /** + * + * + *
+     * The value is a double precision floating point number.
+     * 
+ * + * DOUBLE = 3; + */ + DOUBLE(3), + /** + * + * + *
+     * The value is a text string.
+     * This value type can be used only if the metric kind is `GAUGE`.
+     * 
+ * + * STRING = 4; + */ + STRING(4), + /** + * + * + *
+     * The value is a [`Distribution`][google.api.Distribution].
+     * 
+ * + * DISTRIBUTION = 5; + */ + DISTRIBUTION(5), + /** + * + * + *
+     * The value is money.
+     * 
+ * + * MONEY = 6; + */ + MONEY(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Do not use this default value.
+     * 
+ * + * VALUE_TYPE_UNSPECIFIED = 0; + */ + public static final int VALUE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The value is a boolean.
+     * This value type can be used only if the metric kind is `GAUGE`.
+     * 
+ * + * BOOL = 1; + */ + public static final int BOOL_VALUE = 1; + /** + * + * + *
+     * The value is a signed 64-bit integer.
+     * 
+ * + * INT64 = 2; + */ + public static final int INT64_VALUE = 2; + /** + * + * + *
+     * The value is a double precision floating point number.
+     * 
+ * + * DOUBLE = 3; + */ + public static final int DOUBLE_VALUE = 3; + /** + * + * + *
+     * The value is a text string.
+     * This value type can be used only if the metric kind is `GAUGE`.
+     * 
+ * + * STRING = 4; + */ + public static final int STRING_VALUE = 4; + /** + * + * + *
+     * The value is a [`Distribution`][google.api.Distribution].
+     * 
+ * + * DISTRIBUTION = 5; + */ + public static final int DISTRIBUTION_VALUE = 5; + /** + * + * + *
+     * The value is money.
+     * 
+ * + * MONEY = 6; + */ + public static final int MONEY_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 ValueType 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 ValueType forNumber(int value) { + switch (value) { + case 0: + return VALUE_TYPE_UNSPECIFIED; + case 1: + return BOOL; + case 2: + return INT64; + case 3: + return DOUBLE; + case 4: + return STRING; + case 5: + return DISTRIBUTION; + case 6: + return MONEY; + 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 ValueType findValueByNumber(int number) { + return ValueType.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.api.MetricDescriptor.getDescriptor().getEnumTypes().get(1); + } + + private static final ValueType[] VALUES = values(); + + public static ValueType 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 ValueType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.MetricDescriptor.ValueType) + } + + public interface MetricDescriptorMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.MetricDescriptor.MetricDescriptorMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Deprecated. Must use the
+     * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+     * instead.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; + * + * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is deprecated. + * See google/api/metric.proto;l=85 + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Deprecated + int getLaunchStageValue(); + /** + * + * + *
+     * Deprecated. Must use the
+     * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+     * instead.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; + * + * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is deprecated. + * See google/api/metric.proto;l=85 + * @return The launchStage. + */ + @java.lang.Deprecated + com.google.api.LaunchStage getLaunchStage(); + + /** + * + * + *
+     * The sampling period of metric data points. For metrics which are written
+     * periodically, consecutive data points are stored at this time interval,
+     * excluding data loss due to errors. Metrics with a higher granularity have
+     * a smaller sampling period.
+     * 
+ * + * .google.protobuf.Duration sample_period = 2; + * + * @return Whether the samplePeriod field is set. + */ + boolean hasSamplePeriod(); + /** + * + * + *
+     * The sampling period of metric data points. For metrics which are written
+     * periodically, consecutive data points are stored at this time interval,
+     * excluding data loss due to errors. Metrics with a higher granularity have
+     * a smaller sampling period.
+     * 
+ * + * .google.protobuf.Duration sample_period = 2; + * + * @return The samplePeriod. + */ + com.google.protobuf.Duration getSamplePeriod(); + /** + * + * + *
+     * The sampling period of metric data points. For metrics which are written
+     * periodically, consecutive data points are stored at this time interval,
+     * excluding data loss due to errors. Metrics with a higher granularity have
+     * a smaller sampling period.
+     * 
+ * + * .google.protobuf.Duration sample_period = 2; + */ + com.google.protobuf.DurationOrBuilder getSamplePeriodOrBuilder(); + + /** + * + * + *
+     * The delay of data points caused by ingestion. Data points older than this
+     * age are guaranteed to be ingested and available to be read, excluding
+     * data loss due to errors.
+     * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + * + * @return Whether the ingestDelay field is set. + */ + boolean hasIngestDelay(); + /** + * + * + *
+     * The delay of data points caused by ingestion. Data points older than this
+     * age are guaranteed to be ingested and available to be read, excluding
+     * data loss due to errors.
+     * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + * + * @return The ingestDelay. + */ + com.google.protobuf.Duration getIngestDelay(); + /** + * + * + *
+     * The delay of data points caused by ingestion. Data points older than this
+     * age are guaranteed to be ingested and available to be read, excluding
+     * data loss due to errors.
+     * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + */ + com.google.protobuf.DurationOrBuilder getIngestDelayOrBuilder(); + } + /** + * + * + *
+   * Additional annotations that can be used to guide the usage of a metric.
+   * 
+ * + * Protobuf type {@code google.api.MetricDescriptor.MetricDescriptorMetadata} + */ + public static final class MetricDescriptorMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.MetricDescriptor.MetricDescriptorMetadata) + MetricDescriptorMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetricDescriptorMetadata.newBuilder() to construct. + private MetricDescriptorMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MetricDescriptorMetadata() { + launchStage_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MetricDescriptorMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MetricProto + .internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MetricProto + .internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MetricDescriptor.MetricDescriptorMetadata.class, + com.google.api.MetricDescriptor.MetricDescriptorMetadata.Builder.class); + } + + public static final int LAUNCH_STAGE_FIELD_NUMBER = 1; + private int launchStage_ = 0; + /** + * + * + *
+     * Deprecated. Must use the
+     * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+     * instead.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; + * + * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is deprecated. + * See google/api/metric.proto;l=85 + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Override + @java.lang.Deprecated + public int getLaunchStageValue() { + return launchStage_; + } + /** + * + * + *
+     * Deprecated. Must use the
+     * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+     * instead.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; + * + * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is deprecated. + * See google/api/metric.proto;l=85 + * @return The launchStage. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.api.LaunchStage getLaunchStage() { + com.google.api.LaunchStage result = com.google.api.LaunchStage.forNumber(launchStage_); + return result == null ? com.google.api.LaunchStage.UNRECOGNIZED : result; + } + + public static final int SAMPLE_PERIOD_FIELD_NUMBER = 2; + private com.google.protobuf.Duration samplePeriod_; + /** + * + * + *
+     * The sampling period of metric data points. For metrics which are written
+     * periodically, consecutive data points are stored at this time interval,
+     * excluding data loss due to errors. Metrics with a higher granularity have
+     * a smaller sampling period.
+     * 
+ * + * .google.protobuf.Duration sample_period = 2; + * + * @return Whether the samplePeriod field is set. + */ + @java.lang.Override + public boolean hasSamplePeriod() { + return samplePeriod_ != null; + } + /** + * + * + *
+     * The sampling period of metric data points. For metrics which are written
+     * periodically, consecutive data points are stored at this time interval,
+     * excluding data loss due to errors. Metrics with a higher granularity have
+     * a smaller sampling period.
+     * 
+ * + * .google.protobuf.Duration sample_period = 2; + * + * @return The samplePeriod. + */ + @java.lang.Override + public com.google.protobuf.Duration getSamplePeriod() { + return samplePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : samplePeriod_; + } + /** + * + * + *
+     * The sampling period of metric data points. For metrics which are written
+     * periodically, consecutive data points are stored at this time interval,
+     * excluding data loss due to errors. Metrics with a higher granularity have
+     * a smaller sampling period.
+     * 
+ * + * .google.protobuf.Duration sample_period = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getSamplePeriodOrBuilder() { + return samplePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : samplePeriod_; + } + + public static final int INGEST_DELAY_FIELD_NUMBER = 3; + private com.google.protobuf.Duration ingestDelay_; + /** + * + * + *
+     * The delay of data points caused by ingestion. Data points older than this
+     * age are guaranteed to be ingested and available to be read, excluding
+     * data loss due to errors.
+     * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + * + * @return Whether the ingestDelay field is set. + */ + @java.lang.Override + public boolean hasIngestDelay() { + return ingestDelay_ != null; + } + /** + * + * + *
+     * The delay of data points caused by ingestion. Data points older than this
+     * age are guaranteed to be ingested and available to be read, excluding
+     * data loss due to errors.
+     * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + * + * @return The ingestDelay. + */ + @java.lang.Override + public com.google.protobuf.Duration getIngestDelay() { + return ingestDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : ingestDelay_; + } + /** + * + * + *
+     * The delay of data points caused by ingestion. Data points older than this
+     * age are guaranteed to be ingested and available to be read, excluding
+     * data loss due to errors.
+     * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getIngestDelayOrBuilder() { + return ingestDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : ingestDelay_; + } + + 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 (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, launchStage_); + } + if (samplePeriod_ != null) { + output.writeMessage(2, getSamplePeriod()); + } + if (ingestDelay_ != null) { + output.writeMessage(3, getIngestDelay()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, launchStage_); + } + if (samplePeriod_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSamplePeriod()); + } + if (ingestDelay_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIngestDelay()); + } + 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.api.MetricDescriptor.MetricDescriptorMetadata)) { + return super.equals(obj); + } + com.google.api.MetricDescriptor.MetricDescriptorMetadata other = + (com.google.api.MetricDescriptor.MetricDescriptorMetadata) obj; + + if (launchStage_ != other.launchStage_) return false; + if (hasSamplePeriod() != other.hasSamplePeriod()) return false; + if (hasSamplePeriod()) { + if (!getSamplePeriod().equals(other.getSamplePeriod())) return false; + } + if (hasIngestDelay() != other.hasIngestDelay()) return false; + if (hasIngestDelay()) { + if (!getIngestDelay().equals(other.getIngestDelay())) 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) + LAUNCH_STAGE_FIELD_NUMBER; + hash = (53 * hash) + launchStage_; + if (hasSamplePeriod()) { + hash = (37 * hash) + SAMPLE_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getSamplePeriod().hashCode(); + } + if (hasIngestDelay()) { + hash = (37 * hash) + INGEST_DELAY_FIELD_NUMBER; + hash = (53 * hash) + getIngestDelay().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.MetricDescriptor.MetricDescriptorMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MetricDescriptor.MetricDescriptorMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MetricDescriptor.MetricDescriptorMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MetricDescriptor.MetricDescriptorMetadata 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.api.MetricDescriptor.MetricDescriptorMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MetricDescriptor.MetricDescriptorMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MetricDescriptor.MetricDescriptorMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MetricDescriptor.MetricDescriptorMetadata 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.api.MetricDescriptor.MetricDescriptorMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.MetricDescriptor.MetricDescriptorMetadata 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.api.MetricDescriptor.MetricDescriptorMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MetricDescriptor.MetricDescriptorMetadata 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.api.MetricDescriptor.MetricDescriptorMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Additional annotations that can be used to guide the usage of a metric.
+     * 
+ * + * Protobuf type {@code google.api.MetricDescriptor.MetricDescriptorMetadata} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.MetricDescriptor.MetricDescriptorMetadata) + com.google.api.MetricDescriptor.MetricDescriptorMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MetricProto + .internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MetricProto + .internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MetricDescriptor.MetricDescriptorMetadata.class, + com.google.api.MetricDescriptor.MetricDescriptorMetadata.Builder.class); + } + + // Construct using com.google.api.MetricDescriptor.MetricDescriptorMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + launchStage_ = 0; + samplePeriod_ = null; + if (samplePeriodBuilder_ != null) { + samplePeriodBuilder_.dispose(); + samplePeriodBuilder_ = null; + } + ingestDelay_ = null; + if (ingestDelayBuilder_ != null) { + ingestDelayBuilder_.dispose(); + ingestDelayBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.MetricProto + .internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_descriptor; + } + + @java.lang.Override + public com.google.api.MetricDescriptor.MetricDescriptorMetadata getDefaultInstanceForType() { + return com.google.api.MetricDescriptor.MetricDescriptorMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.MetricDescriptor.MetricDescriptorMetadata build() { + com.google.api.MetricDescriptor.MetricDescriptorMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.MetricDescriptor.MetricDescriptorMetadata buildPartial() { + com.google.api.MetricDescriptor.MetricDescriptorMetadata result = + new com.google.api.MetricDescriptor.MetricDescriptorMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.MetricDescriptor.MetricDescriptorMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.launchStage_ = launchStage_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.samplePeriod_ = + samplePeriodBuilder_ == null ? samplePeriod_ : samplePeriodBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ingestDelay_ = + ingestDelayBuilder_ == null ? ingestDelay_ : ingestDelayBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MetricDescriptor.MetricDescriptorMetadata) { + return mergeFrom((com.google.api.MetricDescriptor.MetricDescriptorMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MetricDescriptor.MetricDescriptorMetadata other) { + if (other == com.google.api.MetricDescriptor.MetricDescriptorMetadata.getDefaultInstance()) + return this; + if (other.launchStage_ != 0) { + setLaunchStageValue(other.getLaunchStageValue()); + } + if (other.hasSamplePeriod()) { + mergeSamplePeriod(other.getSamplePeriod()); + } + if (other.hasIngestDelay()) { + mergeIngestDelay(other.getIngestDelay()); + } + 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: + { + launchStage_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getSamplePeriodFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getIngestDelayFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int launchStage_ = 0; + /** + * + * + *
+       * Deprecated. Must use the
+       * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+       * instead.
+       * 
+ * + * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; + * + * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is + * deprecated. See google/api/metric.proto;l=85 + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Override + @java.lang.Deprecated + public int getLaunchStageValue() { + return launchStage_; + } + /** + * + * + *
+       * Deprecated. Must use the
+       * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+       * instead.
+       * 
+ * + * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; + * + * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is + * deprecated. See google/api/metric.proto;l=85 + * @param value The enum numeric value on the wire for launchStage to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setLaunchStageValue(int value) { + launchStage_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Deprecated. Must use the
+       * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+       * instead.
+       * 
+ * + * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; + * + * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is + * deprecated. See google/api/metric.proto;l=85 + * @return The launchStage. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.api.LaunchStage getLaunchStage() { + com.google.api.LaunchStage result = com.google.api.LaunchStage.forNumber(launchStage_); + return result == null ? com.google.api.LaunchStage.UNRECOGNIZED : result; + } + /** + * + * + *
+       * Deprecated. Must use the
+       * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+       * instead.
+       * 
+ * + * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; + * + * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is + * deprecated. See google/api/metric.proto;l=85 + * @param value The launchStage to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setLaunchStage(com.google.api.LaunchStage value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + launchStage_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Deprecated. Must use the
+       * [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage]
+       * instead.
+       * 
+ * + * .google.api.LaunchStage launch_stage = 1 [deprecated = true]; + * + * @deprecated google.api.MetricDescriptor.MetricDescriptorMetadata.launch_stage is + * deprecated. See google/api/metric.proto;l=85 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearLaunchStage() { + bitField0_ = (bitField0_ & ~0x00000001); + launchStage_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration samplePeriod_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + samplePeriodBuilder_; + /** + * + * + *
+       * The sampling period of metric data points. For metrics which are written
+       * periodically, consecutive data points are stored at this time interval,
+       * excluding data loss due to errors. Metrics with a higher granularity have
+       * a smaller sampling period.
+       * 
+ * + * .google.protobuf.Duration sample_period = 2; + * + * @return Whether the samplePeriod field is set. + */ + public boolean hasSamplePeriod() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The sampling period of metric data points. For metrics which are written
+       * periodically, consecutive data points are stored at this time interval,
+       * excluding data loss due to errors. Metrics with a higher granularity have
+       * a smaller sampling period.
+       * 
+ * + * .google.protobuf.Duration sample_period = 2; + * + * @return The samplePeriod. + */ + public com.google.protobuf.Duration getSamplePeriod() { + if (samplePeriodBuilder_ == null) { + return samplePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : samplePeriod_; + } else { + return samplePeriodBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The sampling period of metric data points. For metrics which are written
+       * periodically, consecutive data points are stored at this time interval,
+       * excluding data loss due to errors. Metrics with a higher granularity have
+       * a smaller sampling period.
+       * 
+ * + * .google.protobuf.Duration sample_period = 2; + */ + public Builder setSamplePeriod(com.google.protobuf.Duration value) { + if (samplePeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + samplePeriod_ = value; + } else { + samplePeriodBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The sampling period of metric data points. For metrics which are written
+       * periodically, consecutive data points are stored at this time interval,
+       * excluding data loss due to errors. Metrics with a higher granularity have
+       * a smaller sampling period.
+       * 
+ * + * .google.protobuf.Duration sample_period = 2; + */ + public Builder setSamplePeriod(com.google.protobuf.Duration.Builder builderForValue) { + if (samplePeriodBuilder_ == null) { + samplePeriod_ = builderForValue.build(); + } else { + samplePeriodBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The sampling period of metric data points. For metrics which are written
+       * periodically, consecutive data points are stored at this time interval,
+       * excluding data loss due to errors. Metrics with a higher granularity have
+       * a smaller sampling period.
+       * 
+ * + * .google.protobuf.Duration sample_period = 2; + */ + public Builder mergeSamplePeriod(com.google.protobuf.Duration value) { + if (samplePeriodBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && samplePeriod_ != null + && samplePeriod_ != com.google.protobuf.Duration.getDefaultInstance()) { + getSamplePeriodBuilder().mergeFrom(value); + } else { + samplePeriod_ = value; + } + } else { + samplePeriodBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The sampling period of metric data points. For metrics which are written
+       * periodically, consecutive data points are stored at this time interval,
+       * excluding data loss due to errors. Metrics with a higher granularity have
+       * a smaller sampling period.
+       * 
+ * + * .google.protobuf.Duration sample_period = 2; + */ + public Builder clearSamplePeriod() { + bitField0_ = (bitField0_ & ~0x00000002); + samplePeriod_ = null; + if (samplePeriodBuilder_ != null) { + samplePeriodBuilder_.dispose(); + samplePeriodBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The sampling period of metric data points. For metrics which are written
+       * periodically, consecutive data points are stored at this time interval,
+       * excluding data loss due to errors. Metrics with a higher granularity have
+       * a smaller sampling period.
+       * 
+ * + * .google.protobuf.Duration sample_period = 2; + */ + public com.google.protobuf.Duration.Builder getSamplePeriodBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSamplePeriodFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The sampling period of metric data points. For metrics which are written
+       * periodically, consecutive data points are stored at this time interval,
+       * excluding data loss due to errors. Metrics with a higher granularity have
+       * a smaller sampling period.
+       * 
+ * + * .google.protobuf.Duration sample_period = 2; + */ + public com.google.protobuf.DurationOrBuilder getSamplePeriodOrBuilder() { + if (samplePeriodBuilder_ != null) { + return samplePeriodBuilder_.getMessageOrBuilder(); + } else { + return samplePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : samplePeriod_; + } + } + /** + * + * + *
+       * The sampling period of metric data points. For metrics which are written
+       * periodically, consecutive data points are stored at this time interval,
+       * excluding data loss due to errors. Metrics with a higher granularity have
+       * a smaller sampling period.
+       * 
+ * + * .google.protobuf.Duration sample_period = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getSamplePeriodFieldBuilder() { + if (samplePeriodBuilder_ == null) { + samplePeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getSamplePeriod(), getParentForChildren(), isClean()); + samplePeriod_ = null; + } + return samplePeriodBuilder_; + } + + private com.google.protobuf.Duration ingestDelay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + ingestDelayBuilder_; + /** + * + * + *
+       * The delay of data points caused by ingestion. Data points older than this
+       * age are guaranteed to be ingested and available to be read, excluding
+       * data loss due to errors.
+       * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + * + * @return Whether the ingestDelay field is set. + */ + public boolean hasIngestDelay() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * The delay of data points caused by ingestion. Data points older than this
+       * age are guaranteed to be ingested and available to be read, excluding
+       * data loss due to errors.
+       * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + * + * @return The ingestDelay. + */ + public com.google.protobuf.Duration getIngestDelay() { + if (ingestDelayBuilder_ == null) { + return ingestDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : ingestDelay_; + } else { + return ingestDelayBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The delay of data points caused by ingestion. Data points older than this
+       * age are guaranteed to be ingested and available to be read, excluding
+       * data loss due to errors.
+       * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + */ + public Builder setIngestDelay(com.google.protobuf.Duration value) { + if (ingestDelayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ingestDelay_ = value; + } else { + ingestDelayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The delay of data points caused by ingestion. Data points older than this
+       * age are guaranteed to be ingested and available to be read, excluding
+       * data loss due to errors.
+       * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + */ + public Builder setIngestDelay(com.google.protobuf.Duration.Builder builderForValue) { + if (ingestDelayBuilder_ == null) { + ingestDelay_ = builderForValue.build(); + } else { + ingestDelayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The delay of data points caused by ingestion. Data points older than this
+       * age are guaranteed to be ingested and available to be read, excluding
+       * data loss due to errors.
+       * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + */ + public Builder mergeIngestDelay(com.google.protobuf.Duration value) { + if (ingestDelayBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && ingestDelay_ != null + && ingestDelay_ != com.google.protobuf.Duration.getDefaultInstance()) { + getIngestDelayBuilder().mergeFrom(value); + } else { + ingestDelay_ = value; + } + } else { + ingestDelayBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The delay of data points caused by ingestion. Data points older than this
+       * age are guaranteed to be ingested and available to be read, excluding
+       * data loss due to errors.
+       * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + */ + public Builder clearIngestDelay() { + bitField0_ = (bitField0_ & ~0x00000004); + ingestDelay_ = null; + if (ingestDelayBuilder_ != null) { + ingestDelayBuilder_.dispose(); + ingestDelayBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The delay of data points caused by ingestion. Data points older than this
+       * age are guaranteed to be ingested and available to be read, excluding
+       * data loss due to errors.
+       * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + */ + public com.google.protobuf.Duration.Builder getIngestDelayBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getIngestDelayFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The delay of data points caused by ingestion. Data points older than this
+       * age are guaranteed to be ingested and available to be read, excluding
+       * data loss due to errors.
+       * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + */ + public com.google.protobuf.DurationOrBuilder getIngestDelayOrBuilder() { + if (ingestDelayBuilder_ != null) { + return ingestDelayBuilder_.getMessageOrBuilder(); + } else { + return ingestDelay_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : ingestDelay_; + } + } + /** + * + * + *
+       * The delay of data points caused by ingestion. Data points older than this
+       * age are guaranteed to be ingested and available to be read, excluding
+       * data loss due to errors.
+       * 
+ * + * .google.protobuf.Duration ingest_delay = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getIngestDelayFieldBuilder() { + if (ingestDelayBuilder_ == null) { + ingestDelayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getIngestDelay(), getParentForChildren(), isClean()); + ingestDelay_ = null; + } + return ingestDelayBuilder_; + } + + @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.api.MetricDescriptor.MetricDescriptorMetadata) + } + + // @@protoc_insertion_point(class_scope:google.api.MetricDescriptor.MetricDescriptorMetadata) + private static final com.google.api.MetricDescriptor.MetricDescriptorMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.MetricDescriptor.MetricDescriptorMetadata(); + } + + public static com.google.api.MetricDescriptor.MetricDescriptorMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricDescriptorMetadata 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.api.MetricDescriptor.MetricDescriptorMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The resource name of the metric descriptor.
+   * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+   * The resource name of the metric descriptor.
+   * 
+ * + * string name = 1; + * + * @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 TYPE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+   * The metric type, including its DNS name prefix. The type is not
+   * URL-encoded. All user-defined metric types have the DNS name
+   * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+   * use a natural hierarchical grouping. For example:
+   *
+   *     "custom.googleapis.com/invoice/paid/amount"
+   *     "external.googleapis.com/prometheus/up"
+   *     "appengine.googleapis.com/http/server/response_latencies"
+   * 
+ * + * string type = 8; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * The metric type, including its DNS name prefix. The type is not
+   * URL-encoded. All user-defined metric types have the DNS name
+   * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+   * use a natural hierarchical grouping. For example:
+   *
+   *     "custom.googleapis.com/invoice/paid/amount"
+   *     "external.googleapis.com/prometheus/up"
+   *     "appengine.googleapis.com/http/server/response_latencies"
+   * 
+ * + * string type = 8; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List labels_; + /** + * + * + *
+   * The set of labels that can be used to describe a specific
+   * instance of this metric type. For example, the
+   * `appengine.googleapis.com/http/server/response_latencies` metric
+   * type has a label for the HTTP response code, `response_code`, so
+   * you can look at latencies for successful responses or just
+   * for responses that failed.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + @java.lang.Override + public java.util.List getLabelsList() { + return labels_; + } + /** + * + * + *
+   * The set of labels that can be used to describe a specific
+   * instance of this metric type. For example, the
+   * `appengine.googleapis.com/http/server/response_latencies` metric
+   * type has a label for the HTTP response code, `response_code`, so
+   * you can look at latencies for successful responses or just
+   * for responses that failed.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + @java.lang.Override + public java.util.List + getLabelsOrBuilderList() { + return labels_; + } + /** + * + * + *
+   * The set of labels that can be used to describe a specific
+   * instance of this metric type. For example, the
+   * `appengine.googleapis.com/http/server/response_latencies` metric
+   * type has a label for the HTTP response code, `response_code`, so
+   * you can look at latencies for successful responses or just
+   * for responses that failed.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + @java.lang.Override + public int getLabelsCount() { + return labels_.size(); + } + /** + * + * + *
+   * The set of labels that can be used to describe a specific
+   * instance of this metric type. For example, the
+   * `appengine.googleapis.com/http/server/response_latencies` metric
+   * type has a label for the HTTP response code, `response_code`, so
+   * you can look at latencies for successful responses or just
+   * for responses that failed.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + @java.lang.Override + public com.google.api.LabelDescriptor getLabels(int index) { + return labels_.get(index); + } + /** + * + * + *
+   * The set of labels that can be used to describe a specific
+   * instance of this metric type. For example, the
+   * `appengine.googleapis.com/http/server/response_latencies` metric
+   * type has a label for the HTTP response code, `response_code`, so
+   * you can look at latencies for successful responses or just
+   * for responses that failed.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + @java.lang.Override + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder(int index) { + return labels_.get(index); + } + + public static final int METRIC_KIND_FIELD_NUMBER = 3; + private int metricKind_ = 0; + /** + * + * + *
+   * Whether the metric records instantaneous values, changes to a value, etc.
+   * Some combinations of `metric_kind` and `value_type` might not be supported.
+   * 
+ * + * .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + * @return The enum numeric value on the wire for metricKind. + */ + @java.lang.Override + public int getMetricKindValue() { + return metricKind_; + } + /** + * + * + *
+   * Whether the metric records instantaneous values, changes to a value, etc.
+   * Some combinations of `metric_kind` and `value_type` might not be supported.
+   * 
+ * + * .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + * @return The metricKind. + */ + @java.lang.Override + public com.google.api.MetricDescriptor.MetricKind getMetricKind() { + com.google.api.MetricDescriptor.MetricKind result = + com.google.api.MetricDescriptor.MetricKind.forNumber(metricKind_); + return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; + } + + public static final int VALUE_TYPE_FIELD_NUMBER = 4; + private int valueType_ = 0; + /** + * + * + *
+   * Whether the measurement is an integer, a floating-point number, etc.
+   * Some combinations of `metric_kind` and `value_type` might not be supported.
+   * 
+ * + * .google.api.MetricDescriptor.ValueType value_type = 4; + * + * @return The enum numeric value on the wire for valueType. + */ + @java.lang.Override + public int getValueTypeValue() { + return valueType_; + } + /** + * + * + *
+   * Whether the measurement is an integer, a floating-point number, etc.
+   * Some combinations of `metric_kind` and `value_type` might not be supported.
+   * 
+ * + * .google.api.MetricDescriptor.ValueType value_type = 4; + * + * @return The valueType. + */ + @java.lang.Override + public com.google.api.MetricDescriptor.ValueType getValueType() { + com.google.api.MetricDescriptor.ValueType result = + com.google.api.MetricDescriptor.ValueType.forNumber(valueType_); + return result == null ? com.google.api.MetricDescriptor.ValueType.UNRECOGNIZED : result; + } + + public static final int UNIT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object unit_ = ""; + /** + * + * + *
+   * The units in which the metric value is reported. It is only applicable
+   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+   * defines the representation of the stored metric values.
+   *
+   * Different systems might scale the values to be more easily displayed (so a
+   * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+   * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+   * `kBy`, then the value of the metric is always in thousands of bytes, no
+   * matter how it might be displayed.
+   *
+   * If you want a custom metric to record the exact number of CPU-seconds used
+   * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+   * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+   * CPU-seconds, then the value is written as `12005`.
+   *
+   * Alternatively, if you want a custom metric to record data in a more
+   * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+   * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+   * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+   *
+   * The supported units are a subset of [The Unified Code for Units of
+   * Measure](https://unitsofmeasure.org/ucum.html) standard:
+   *
+   * **Basic units (UNIT)**
+   *
+   * * `bit`   bit
+   * * `By`    byte
+   * * `s`     second
+   * * `min`   minute
+   * * `h`     hour
+   * * `d`     day
+   * * `1`     dimensionless
+   *
+   * **Prefixes (PREFIX)**
+   *
+   * * `k`     kilo    (10^3)
+   * * `M`     mega    (10^6)
+   * * `G`     giga    (10^9)
+   * * `T`     tera    (10^12)
+   * * `P`     peta    (10^15)
+   * * `E`     exa     (10^18)
+   * * `Z`     zetta   (10^21)
+   * * `Y`     yotta   (10^24)
+   *
+   * * `m`     milli   (10^-3)
+   * * `u`     micro   (10^-6)
+   * * `n`     nano    (10^-9)
+   * * `p`     pico    (10^-12)
+   * * `f`     femto   (10^-15)
+   * * `a`     atto    (10^-18)
+   * * `z`     zepto   (10^-21)
+   * * `y`     yocto   (10^-24)
+   *
+   * * `Ki`    kibi    (2^10)
+   * * `Mi`    mebi    (2^20)
+   * * `Gi`    gibi    (2^30)
+   * * `Ti`    tebi    (2^40)
+   * * `Pi`    pebi    (2^50)
+   *
+   * **Grammar**
+   *
+   * The grammar also includes these connectors:
+   *
+   * * `/`    division or ratio (as an infix operator). For examples,
+   *          `kBy/{email}` or `MiBy/10ms` (although you should almost never
+   *          have `/s` in a metric `unit`; rates should always be computed at
+   *          query time from the underlying cumulative or delta value).
+   * * `.`    multiplication or composition (as an infix operator). For
+   *          examples, `GBy.d` or `k{watt}.h`.
+   *
+   * The grammar for a unit is as follows:
+   *
+   *     Expression = Component { "." Component } { "/" Component } ;
+   *
+   *     Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+   *               | Annotation
+   *               | "1"
+   *               ;
+   *
+   *     Annotation = "{" NAME "}" ;
+   *
+   * Notes:
+   *
+   * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+   *    is used alone, then the unit is equivalent to `1`. For examples,
+   *    `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+   * * `NAME` is a sequence of non-blank printable ASCII characters not
+   *    containing `{` or `}`.
+   * * `1` represents a unitary [dimensionless
+   *    unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+   *    as in `1/s`. It is typically used when none of the basic units are
+   *    appropriate. For example, "new users per day" can be represented as
+   *    `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+   *    users). Alternatively, "thousands of page views per day" would be
+   *    represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+   *    value of `5.3` would mean "5300 page views per day").
+   * * `%` represents dimensionless value of 1/100, and annotates values giving
+   *    a percentage (so the metric values are typically in the range of 0..100,
+   *    and a metric value `3` means "3 percent").
+   * * `10^2.%` indicates a metric contains a ratio, typically in the range
+   *    0..1, that will be multiplied by 100 and displayed as a percentage
+   *    (so a metric value `0.03` means "3 percent").
+   * 
+ * + * string unit = 5; + * + * @return The unit. + */ + @java.lang.Override + public java.lang.String getUnit() { + java.lang.Object ref = unit_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + unit_ = s; + return s; + } + } + /** + * + * + *
+   * The units in which the metric value is reported. It is only applicable
+   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+   * defines the representation of the stored metric values.
+   *
+   * Different systems might scale the values to be more easily displayed (so a
+   * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+   * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+   * `kBy`, then the value of the metric is always in thousands of bytes, no
+   * matter how it might be displayed.
+   *
+   * If you want a custom metric to record the exact number of CPU-seconds used
+   * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+   * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+   * CPU-seconds, then the value is written as `12005`.
+   *
+   * Alternatively, if you want a custom metric to record data in a more
+   * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+   * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+   * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+   *
+   * The supported units are a subset of [The Unified Code for Units of
+   * Measure](https://unitsofmeasure.org/ucum.html) standard:
+   *
+   * **Basic units (UNIT)**
+   *
+   * * `bit`   bit
+   * * `By`    byte
+   * * `s`     second
+   * * `min`   minute
+   * * `h`     hour
+   * * `d`     day
+   * * `1`     dimensionless
+   *
+   * **Prefixes (PREFIX)**
+   *
+   * * `k`     kilo    (10^3)
+   * * `M`     mega    (10^6)
+   * * `G`     giga    (10^9)
+   * * `T`     tera    (10^12)
+   * * `P`     peta    (10^15)
+   * * `E`     exa     (10^18)
+   * * `Z`     zetta   (10^21)
+   * * `Y`     yotta   (10^24)
+   *
+   * * `m`     milli   (10^-3)
+   * * `u`     micro   (10^-6)
+   * * `n`     nano    (10^-9)
+   * * `p`     pico    (10^-12)
+   * * `f`     femto   (10^-15)
+   * * `a`     atto    (10^-18)
+   * * `z`     zepto   (10^-21)
+   * * `y`     yocto   (10^-24)
+   *
+   * * `Ki`    kibi    (2^10)
+   * * `Mi`    mebi    (2^20)
+   * * `Gi`    gibi    (2^30)
+   * * `Ti`    tebi    (2^40)
+   * * `Pi`    pebi    (2^50)
+   *
+   * **Grammar**
+   *
+   * The grammar also includes these connectors:
+   *
+   * * `/`    division or ratio (as an infix operator). For examples,
+   *          `kBy/{email}` or `MiBy/10ms` (although you should almost never
+   *          have `/s` in a metric `unit`; rates should always be computed at
+   *          query time from the underlying cumulative or delta value).
+   * * `.`    multiplication or composition (as an infix operator). For
+   *          examples, `GBy.d` or `k{watt}.h`.
+   *
+   * The grammar for a unit is as follows:
+   *
+   *     Expression = Component { "." Component } { "/" Component } ;
+   *
+   *     Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+   *               | Annotation
+   *               | "1"
+   *               ;
+   *
+   *     Annotation = "{" NAME "}" ;
+   *
+   * Notes:
+   *
+   * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+   *    is used alone, then the unit is equivalent to `1`. For examples,
+   *    `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+   * * `NAME` is a sequence of non-blank printable ASCII characters not
+   *    containing `{` or `}`.
+   * * `1` represents a unitary [dimensionless
+   *    unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+   *    as in `1/s`. It is typically used when none of the basic units are
+   *    appropriate. For example, "new users per day" can be represented as
+   *    `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+   *    users). Alternatively, "thousands of page views per day" would be
+   *    represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+   *    value of `5.3` would mean "5300 page views per day").
+   * * `%` represents dimensionless value of 1/100, and annotates values giving
+   *    a percentage (so the metric values are typically in the range of 0..100,
+   *    and a metric value `3` means "3 percent").
+   * * `10^2.%` indicates a metric contains a ratio, typically in the range
+   *    0..1, that will be multiplied by 100 and displayed as a percentage
+   *    (so a metric value `0.03` means "3 percent").
+   * 
+ * + * string unit = 5; + * + * @return The bytes for unit. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUnitBytes() { + java.lang.Object ref = unit_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + unit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A detailed description of the metric, which can be used in documentation.
+   * 
+ * + * string description = 6; + * + * @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; + } + } + /** + * + * + *
+   * A detailed description of the metric, which can be used in documentation.
+   * 
+ * + * string description = 6; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * A concise name for the metric, which can be displayed in user interfaces.
+   * Use sentence case without an ending period, for example "Request count".
+   * This field is optional but it is recommended to be set for any metrics
+   * associated with user-visible concepts, such as Quota.
+   * 
+ * + * string display_name = 7; + * + * @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; + } + } + /** + * + * + *
+   * A concise name for the metric, which can be displayed in user interfaces.
+   * Use sentence case without an ending period, for example "Request count".
+   * This field is optional but it is recommended to be set for any metrics
+   * associated with user-visible concepts, such as Quota.
+   * 
+ * + * string display_name = 7; + * + * @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 METADATA_FIELD_NUMBER = 10; + private com.google.api.MetricDescriptor.MetricDescriptorMetadata metadata_; + /** + * + * + *
+   * Optional. Metadata which can be used to guide usage of the metric.
+   * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Optional. Metadata which can be used to guide usage of the metric.
+   * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.api.MetricDescriptor.MetricDescriptorMetadata getMetadata() { + return metadata_ == null + ? com.google.api.MetricDescriptor.MetricDescriptorMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * Optional. Metadata which can be used to guide usage of the metric.
+   * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + */ + @java.lang.Override + public com.google.api.MetricDescriptor.MetricDescriptorMetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null + ? com.google.api.MetricDescriptor.MetricDescriptorMetadata.getDefaultInstance() + : metadata_; + } + + public static final int LAUNCH_STAGE_FIELD_NUMBER = 12; + private int launchStage_ = 0; + /** + * + * + *
+   * Optional. The launch stage of the metric definition.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 12; + * + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Override + public int getLaunchStageValue() { + return launchStage_; + } + /** + * + * + *
+   * Optional. The launch stage of the metric definition.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 12; + * + * @return The launchStage. + */ + @java.lang.Override + public com.google.api.LaunchStage getLaunchStage() { + com.google.api.LaunchStage result = com.google.api.LaunchStage.forNumber(launchStage_); + return result == null ? com.google.api.LaunchStage.UNRECOGNIZED : result; + } + + public static final int MONITORED_RESOURCE_TYPES_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList monitoredResourceTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Read-only. If present, then a [time
+   * series][google.monitoring.v3.TimeSeries], which is identified partially by
+   * a metric type and a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+   * is associated with this metric type can only be associated with one of the
+   * monitored resource types listed here.
+   * 
+ * + * repeated string monitored_resource_types = 13; + * + * @return A list containing the monitoredResourceTypes. + */ + public com.google.protobuf.ProtocolStringList getMonitoredResourceTypesList() { + return monitoredResourceTypes_; + } + /** + * + * + *
+   * Read-only. If present, then a [time
+   * series][google.monitoring.v3.TimeSeries], which is identified partially by
+   * a metric type and a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+   * is associated with this metric type can only be associated with one of the
+   * monitored resource types listed here.
+   * 
+ * + * repeated string monitored_resource_types = 13; + * + * @return The count of monitoredResourceTypes. + */ + public int getMonitoredResourceTypesCount() { + return monitoredResourceTypes_.size(); + } + /** + * + * + *
+   * Read-only. If present, then a [time
+   * series][google.monitoring.v3.TimeSeries], which is identified partially by
+   * a metric type and a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+   * is associated with this metric type can only be associated with one of the
+   * monitored resource types listed here.
+   * 
+ * + * repeated string monitored_resource_types = 13; + * + * @param index The index of the element to return. + * @return The monitoredResourceTypes at the given index. + */ + public java.lang.String getMonitoredResourceTypes(int index) { + return monitoredResourceTypes_.get(index); + } + /** + * + * + *
+   * Read-only. If present, then a [time
+   * series][google.monitoring.v3.TimeSeries], which is identified partially by
+   * a metric type and a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+   * is associated with this metric type can only be associated with one of the
+   * monitored resource types listed here.
+   * 
+ * + * repeated string monitored_resource_types = 13; + * + * @param index The index of the value to return. + * @return The bytes of the monitoredResourceTypes at the given index. + */ + public com.google.protobuf.ByteString getMonitoredResourceTypesBytes(int index) { + return monitoredResourceTypes_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < labels_.size(); i++) { + output.writeMessage(2, labels_.get(i)); + } + if (metricKind_ + != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { + output.writeEnum(3, metricKind_); + } + if (valueType_ + != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, valueType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, unit_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, type_); + } + if (metadata_ != null) { + output.writeMessage(10, getMetadata()); + } + if (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { + output.writeEnum(12, launchStage_); + } + for (int i = 0; i < monitoredResourceTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 13, monitoredResourceTypes_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < labels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labels_.get(i)); + } + if (metricKind_ + != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, metricKind_); + } + if (valueType_ + != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, valueType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, unit_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, type_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getMetadata()); + } + if (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, launchStage_); + } + { + int dataSize = 0; + for (int i = 0; i < monitoredResourceTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(monitoredResourceTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getMonitoredResourceTypesList().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.api.MetricDescriptor)) { + return super.equals(obj); + } + com.google.api.MetricDescriptor other = (com.google.api.MetricDescriptor) obj; + + if (!getName().equals(other.getName())) return false; + if (!getType().equals(other.getType())) return false; + if (!getLabelsList().equals(other.getLabelsList())) return false; + if (metricKind_ != other.metricKind_) return false; + if (valueType_ != other.valueType_) return false; + if (!getUnit().equals(other.getUnit())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (launchStage_ != other.launchStage_) return false; + if (!getMonitoredResourceTypesList().equals(other.getMonitoredResourceTypesList())) + 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (getLabelsCount() > 0) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + getLabelsList().hashCode(); + } + hash = (37 * hash) + METRIC_KIND_FIELD_NUMBER; + hash = (53 * hash) + metricKind_; + hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + valueType_; + hash = (37 * hash) + UNIT_FIELD_NUMBER; + hash = (53 * hash) + getUnit().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + LAUNCH_STAGE_FIELD_NUMBER; + hash = (53 * hash) + launchStage_; + if (getMonitoredResourceTypesCount() > 0) { + hash = (37 * hash) + MONITORED_RESOURCE_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getMonitoredResourceTypesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.MetricDescriptor parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MetricDescriptor parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MetricDescriptor parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MetricDescriptor 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.api.MetricDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MetricDescriptor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MetricDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MetricDescriptor 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.api.MetricDescriptor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.MetricDescriptor 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.api.MetricDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MetricDescriptor 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.api.MetricDescriptor 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; + } + /** + * + * + *
+   * Defines a metric type and its schema. Once a metric descriptor is created,
+   * deleting or altering it stops data collection and makes the metric type's
+   * existing data unusable.
+   * 
+ * + * Protobuf type {@code google.api.MetricDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.MetricDescriptor) + com.google.api.MetricDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MetricProto + .internal_static_google_api_MetricDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MetricDescriptor.class, com.google.api.MetricDescriptor.Builder.class); + } + + // Construct using com.google.api.MetricDescriptor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = ""; + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + } else { + labels_ = null; + labelsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + metricKind_ = 0; + valueType_ = 0; + unit_ = ""; + description_ = ""; + displayName_ = ""; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + launchStage_ = 0; + monitoredResourceTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.MetricProto.internal_static_google_api_MetricDescriptor_descriptor; + } + + @java.lang.Override + public com.google.api.MetricDescriptor getDefaultInstanceForType() { + return com.google.api.MetricDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.MetricDescriptor build() { + com.google.api.MetricDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.MetricDescriptor buildPartial() { + com.google.api.MetricDescriptor result = new com.google.api.MetricDescriptor(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.MetricDescriptor result) { + if (labelsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.labels_ = labels_; + } else { + result.labels_ = labelsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.MetricDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metricKind_ = metricKind_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.valueType_ = valueType_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.unit_ = unit_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.launchStage_ = launchStage_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + monitoredResourceTypes_.makeImmutable(); + result.monitoredResourceTypes_ = monitoredResourceTypes_; + } + } + + @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.api.MetricDescriptor) { + return mergeFrom((com.google.api.MetricDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MetricDescriptor other) { + if (other == com.google.api.MetricDescriptor.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (labelsBuilder_ == null) { + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } + } else { + if (!other.labels_.isEmpty()) { + if (labelsBuilder_.isEmpty()) { + labelsBuilder_.dispose(); + labelsBuilder_ = null; + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000004); + labelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLabelsFieldBuilder() + : null; + } else { + labelsBuilder_.addAllMessages(other.labels_); + } + } + } + if (other.metricKind_ != 0) { + setMetricKindValue(other.getMetricKindValue()); + } + if (other.valueType_ != 0) { + setValueTypeValue(other.getValueTypeValue()); + } + if (!other.getUnit().isEmpty()) { + unit_ = other.unit_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.launchStage_ != 0) { + setLaunchStageValue(other.getLaunchStageValue()); + } + if (!other.monitoredResourceTypes_.isEmpty()) { + if (monitoredResourceTypes_.isEmpty()) { + monitoredResourceTypes_ = other.monitoredResourceTypes_; + bitField0_ |= 0x00000400; + } else { + ensureMonitoredResourceTypesIsMutable(); + monitoredResourceTypes_.addAll(other.monitoredResourceTypes_); + } + 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: + { + com.google.api.LabelDescriptor m = + input.readMessage(com.google.api.LabelDescriptor.parser(), extensionRegistry); + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(m); + } else { + labelsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + metricKind_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 32: + { + valueType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 42: + { + unit_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 66 + case 82: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 96: + { + launchStage_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 96 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMonitoredResourceTypesIsMutable(); + monitoredResourceTypes_.add(s); + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the metric descriptor.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The resource name of the metric descriptor.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The resource name of the metric descriptor.
+     * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+     * The resource name of the metric descriptor.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the metric descriptor.
+     * 
+ * + * string name = 1; + * + * @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 type_ = ""; + /** + * + * + *
+     * The metric type, including its DNS name prefix. The type is not
+     * URL-encoded. All user-defined metric types have the DNS name
+     * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+     * use a natural hierarchical grouping. For example:
+     *
+     *     "custom.googleapis.com/invoice/paid/amount"
+     *     "external.googleapis.com/prometheus/up"
+     *     "appengine.googleapis.com/http/server/response_latencies"
+     * 
+ * + * string type = 8; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The metric type, including its DNS name prefix. The type is not
+     * URL-encoded. All user-defined metric types have the DNS name
+     * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+     * use a natural hierarchical grouping. For example:
+     *
+     *     "custom.googleapis.com/invoice/paid/amount"
+     *     "external.googleapis.com/prometheus/up"
+     *     "appengine.googleapis.com/http/server/response_latencies"
+     * 
+ * + * string type = 8; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The metric type, including its DNS name prefix. The type is not
+     * URL-encoded. All user-defined metric types have the DNS name
+     * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+     * use a natural hierarchical grouping. For example:
+     *
+     *     "custom.googleapis.com/invoice/paid/amount"
+     *     "external.googleapis.com/prometheus/up"
+     *     "appengine.googleapis.com/http/server/response_latencies"
+     * 
+ * + * string type = 8; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The metric type, including its DNS name prefix. The type is not
+     * URL-encoded. All user-defined metric types have the DNS name
+     * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+     * use a natural hierarchical grouping. For example:
+     *
+     *     "custom.googleapis.com/invoice/paid/amount"
+     *     "external.googleapis.com/prometheus/up"
+     *     "appengine.googleapis.com/http/server/response_latencies"
+     * 
+ * + * string type = 8; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The metric type, including its DNS name prefix. The type is not
+     * URL-encoded. All user-defined metric types have the DNS name
+     * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+     * use a natural hierarchical grouping. For example:
+     *
+     *     "custom.googleapis.com/invoice/paid/amount"
+     *     "external.googleapis.com/prometheus/up"
+     *     "appengine.googleapis.com/http/server/response_latencies"
+     * 
+ * + * string type = 8; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List labels_ = + java.util.Collections.emptyList(); + + private void ensureLabelsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + labels_ = new java.util.ArrayList(labels_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.LabelDescriptor, + com.google.api.LabelDescriptor.Builder, + com.google.api.LabelDescriptorOrBuilder> + labelsBuilder_; + + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public java.util.List getLabelsList() { + if (labelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labels_); + } else { + return labelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public int getLabelsCount() { + if (labelsBuilder_ == null) { + return labels_.size(); + } else { + return labelsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public com.google.api.LabelDescriptor getLabels(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder setLabels(int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + onChanged(); + } else { + labelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder setLabels(int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.set(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder addLabels(com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + onChanged(); + } else { + labelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder addLabels(int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(index, value); + onChanged(); + } else { + labelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder addLabels(com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder addLabels(int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder addAllLabels( + java.lang.Iterable values) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labels_); + onChanged(); + } else { + labelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder clearLabels() { + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + labelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public Builder removeLabels(int index) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.remove(index); + onChanged(); + } else { + labelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public com.google.api.LabelDescriptor.Builder getLabelsBuilder(int index) { + return getLabelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public java.util.List + getLabelsOrBuilderList() { + if (labelsBuilder_ != null) { + return labelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labels_); + } + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder() { + return getLabelsFieldBuilder() + .addBuilder(com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder(int index) { + return getLabelsFieldBuilder() + .addBuilder(index, com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * + * + *
+     * The set of labels that can be used to describe a specific
+     * instance of this metric type. For example, the
+     * `appengine.googleapis.com/http/server/response_latencies` metric
+     * type has a label for the HTTP response code, `response_code`, so
+     * you can look at latencies for successful responses or just
+     * for responses that failed.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + public java.util.List getLabelsBuilderList() { + return getLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.LabelDescriptor, + com.google.api.LabelDescriptor.Builder, + com.google.api.LabelDescriptorOrBuilder> + getLabelsFieldBuilder() { + if (labelsBuilder_ == null) { + labelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.LabelDescriptor, + com.google.api.LabelDescriptor.Builder, + com.google.api.LabelDescriptorOrBuilder>( + labels_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + labels_ = null; + } + return labelsBuilder_; + } + + private int metricKind_ = 0; + /** + * + * + *
+     * Whether the metric records instantaneous values, changes to a value, etc.
+     * Some combinations of `metric_kind` and `value_type` might not be supported.
+     * 
+ * + * .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + * @return The enum numeric value on the wire for metricKind. + */ + @java.lang.Override + public int getMetricKindValue() { + return metricKind_; + } + /** + * + * + *
+     * Whether the metric records instantaneous values, changes to a value, etc.
+     * Some combinations of `metric_kind` and `value_type` might not be supported.
+     * 
+ * + * .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + * @param value The enum numeric value on the wire for metricKind to set. + * @return This builder for chaining. + */ + public Builder setMetricKindValue(int value) { + metricKind_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the metric records instantaneous values, changes to a value, etc.
+     * Some combinations of `metric_kind` and `value_type` might not be supported.
+     * 
+ * + * .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + * @return The metricKind. + */ + @java.lang.Override + public com.google.api.MetricDescriptor.MetricKind getMetricKind() { + com.google.api.MetricDescriptor.MetricKind result = + com.google.api.MetricDescriptor.MetricKind.forNumber(metricKind_); + return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Whether the metric records instantaneous values, changes to a value, etc.
+     * Some combinations of `metric_kind` and `value_type` might not be supported.
+     * 
+ * + * .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + * @param value The metricKind to set. + * @return This builder for chaining. + */ + public Builder setMetricKind(com.google.api.MetricDescriptor.MetricKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + metricKind_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the metric records instantaneous values, changes to a value, etc.
+     * Some combinations of `metric_kind` and `value_type` might not be supported.
+     * 
+ * + * .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + * @return This builder for chaining. + */ + public Builder clearMetricKind() { + bitField0_ = (bitField0_ & ~0x00000008); + metricKind_ = 0; + onChanged(); + return this; + } + + private int valueType_ = 0; + /** + * + * + *
+     * Whether the measurement is an integer, a floating-point number, etc.
+     * Some combinations of `metric_kind` and `value_type` might not be supported.
+     * 
+ * + * .google.api.MetricDescriptor.ValueType value_type = 4; + * + * @return The enum numeric value on the wire for valueType. + */ + @java.lang.Override + public int getValueTypeValue() { + return valueType_; + } + /** + * + * + *
+     * Whether the measurement is an integer, a floating-point number, etc.
+     * Some combinations of `metric_kind` and `value_type` might not be supported.
+     * 
+ * + * .google.api.MetricDescriptor.ValueType value_type = 4; + * + * @param value The enum numeric value on the wire for valueType to set. + * @return This builder for chaining. + */ + public Builder setValueTypeValue(int value) { + valueType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the measurement is an integer, a floating-point number, etc.
+     * Some combinations of `metric_kind` and `value_type` might not be supported.
+     * 
+ * + * .google.api.MetricDescriptor.ValueType value_type = 4; + * + * @return The valueType. + */ + @java.lang.Override + public com.google.api.MetricDescriptor.ValueType getValueType() { + com.google.api.MetricDescriptor.ValueType result = + com.google.api.MetricDescriptor.ValueType.forNumber(valueType_); + return result == null ? com.google.api.MetricDescriptor.ValueType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Whether the measurement is an integer, a floating-point number, etc.
+     * Some combinations of `metric_kind` and `value_type` might not be supported.
+     * 
+ * + * .google.api.MetricDescriptor.ValueType value_type = 4; + * + * @param value The valueType to set. + * @return This builder for chaining. + */ + public Builder setValueType(com.google.api.MetricDescriptor.ValueType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + valueType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the measurement is an integer, a floating-point number, etc.
+     * Some combinations of `metric_kind` and `value_type` might not be supported.
+     * 
+ * + * .google.api.MetricDescriptor.ValueType value_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearValueType() { + bitField0_ = (bitField0_ & ~0x00000010); + valueType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object unit_ = ""; + /** + * + * + *
+     * The units in which the metric value is reported. It is only applicable
+     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+     * defines the representation of the stored metric values.
+     *
+     * Different systems might scale the values to be more easily displayed (so a
+     * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+     * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+     * `kBy`, then the value of the metric is always in thousands of bytes, no
+     * matter how it might be displayed.
+     *
+     * If you want a custom metric to record the exact number of CPU-seconds used
+     * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+     * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+     * CPU-seconds, then the value is written as `12005`.
+     *
+     * Alternatively, if you want a custom metric to record data in a more
+     * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+     * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+     * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+     *
+     * The supported units are a subset of [The Unified Code for Units of
+     * Measure](https://unitsofmeasure.org/ucum.html) standard:
+     *
+     * **Basic units (UNIT)**
+     *
+     * * `bit`   bit
+     * * `By`    byte
+     * * `s`     second
+     * * `min`   minute
+     * * `h`     hour
+     * * `d`     day
+     * * `1`     dimensionless
+     *
+     * **Prefixes (PREFIX)**
+     *
+     * * `k`     kilo    (10^3)
+     * * `M`     mega    (10^6)
+     * * `G`     giga    (10^9)
+     * * `T`     tera    (10^12)
+     * * `P`     peta    (10^15)
+     * * `E`     exa     (10^18)
+     * * `Z`     zetta   (10^21)
+     * * `Y`     yotta   (10^24)
+     *
+     * * `m`     milli   (10^-3)
+     * * `u`     micro   (10^-6)
+     * * `n`     nano    (10^-9)
+     * * `p`     pico    (10^-12)
+     * * `f`     femto   (10^-15)
+     * * `a`     atto    (10^-18)
+     * * `z`     zepto   (10^-21)
+     * * `y`     yocto   (10^-24)
+     *
+     * * `Ki`    kibi    (2^10)
+     * * `Mi`    mebi    (2^20)
+     * * `Gi`    gibi    (2^30)
+     * * `Ti`    tebi    (2^40)
+     * * `Pi`    pebi    (2^50)
+     *
+     * **Grammar**
+     *
+     * The grammar also includes these connectors:
+     *
+     * * `/`    division or ratio (as an infix operator). For examples,
+     *          `kBy/{email}` or `MiBy/10ms` (although you should almost never
+     *          have `/s` in a metric `unit`; rates should always be computed at
+     *          query time from the underlying cumulative or delta value).
+     * * `.`    multiplication or composition (as an infix operator). For
+     *          examples, `GBy.d` or `k{watt}.h`.
+     *
+     * The grammar for a unit is as follows:
+     *
+     *     Expression = Component { "." Component } { "/" Component } ;
+     *
+     *     Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+     *               | Annotation
+     *               | "1"
+     *               ;
+     *
+     *     Annotation = "{" NAME "}" ;
+     *
+     * Notes:
+     *
+     * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+     *    is used alone, then the unit is equivalent to `1`. For examples,
+     *    `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+     * * `NAME` is a sequence of non-blank printable ASCII characters not
+     *    containing `{` or `}`.
+     * * `1` represents a unitary [dimensionless
+     *    unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+     *    as in `1/s`. It is typically used when none of the basic units are
+     *    appropriate. For example, "new users per day" can be represented as
+     *    `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+     *    users). Alternatively, "thousands of page views per day" would be
+     *    represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+     *    value of `5.3` would mean "5300 page views per day").
+     * * `%` represents dimensionless value of 1/100, and annotates values giving
+     *    a percentage (so the metric values are typically in the range of 0..100,
+     *    and a metric value `3` means "3 percent").
+     * * `10^2.%` indicates a metric contains a ratio, typically in the range
+     *    0..1, that will be multiplied by 100 and displayed as a percentage
+     *    (so a metric value `0.03` means "3 percent").
+     * 
+ * + * string unit = 5; + * + * @return The unit. + */ + public java.lang.String getUnit() { + java.lang.Object ref = unit_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + unit_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The units in which the metric value is reported. It is only applicable
+     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+     * defines the representation of the stored metric values.
+     *
+     * Different systems might scale the values to be more easily displayed (so a
+     * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+     * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+     * `kBy`, then the value of the metric is always in thousands of bytes, no
+     * matter how it might be displayed.
+     *
+     * If you want a custom metric to record the exact number of CPU-seconds used
+     * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+     * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+     * CPU-seconds, then the value is written as `12005`.
+     *
+     * Alternatively, if you want a custom metric to record data in a more
+     * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+     * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+     * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+     *
+     * The supported units are a subset of [The Unified Code for Units of
+     * Measure](https://unitsofmeasure.org/ucum.html) standard:
+     *
+     * **Basic units (UNIT)**
+     *
+     * * `bit`   bit
+     * * `By`    byte
+     * * `s`     second
+     * * `min`   minute
+     * * `h`     hour
+     * * `d`     day
+     * * `1`     dimensionless
+     *
+     * **Prefixes (PREFIX)**
+     *
+     * * `k`     kilo    (10^3)
+     * * `M`     mega    (10^6)
+     * * `G`     giga    (10^9)
+     * * `T`     tera    (10^12)
+     * * `P`     peta    (10^15)
+     * * `E`     exa     (10^18)
+     * * `Z`     zetta   (10^21)
+     * * `Y`     yotta   (10^24)
+     *
+     * * `m`     milli   (10^-3)
+     * * `u`     micro   (10^-6)
+     * * `n`     nano    (10^-9)
+     * * `p`     pico    (10^-12)
+     * * `f`     femto   (10^-15)
+     * * `a`     atto    (10^-18)
+     * * `z`     zepto   (10^-21)
+     * * `y`     yocto   (10^-24)
+     *
+     * * `Ki`    kibi    (2^10)
+     * * `Mi`    mebi    (2^20)
+     * * `Gi`    gibi    (2^30)
+     * * `Ti`    tebi    (2^40)
+     * * `Pi`    pebi    (2^50)
+     *
+     * **Grammar**
+     *
+     * The grammar also includes these connectors:
+     *
+     * * `/`    division or ratio (as an infix operator). For examples,
+     *          `kBy/{email}` or `MiBy/10ms` (although you should almost never
+     *          have `/s` in a metric `unit`; rates should always be computed at
+     *          query time from the underlying cumulative or delta value).
+     * * `.`    multiplication or composition (as an infix operator). For
+     *          examples, `GBy.d` or `k{watt}.h`.
+     *
+     * The grammar for a unit is as follows:
+     *
+     *     Expression = Component { "." Component } { "/" Component } ;
+     *
+     *     Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+     *               | Annotation
+     *               | "1"
+     *               ;
+     *
+     *     Annotation = "{" NAME "}" ;
+     *
+     * Notes:
+     *
+     * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+     *    is used alone, then the unit is equivalent to `1`. For examples,
+     *    `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+     * * `NAME` is a sequence of non-blank printable ASCII characters not
+     *    containing `{` or `}`.
+     * * `1` represents a unitary [dimensionless
+     *    unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+     *    as in `1/s`. It is typically used when none of the basic units are
+     *    appropriate. For example, "new users per day" can be represented as
+     *    `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+     *    users). Alternatively, "thousands of page views per day" would be
+     *    represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+     *    value of `5.3` would mean "5300 page views per day").
+     * * `%` represents dimensionless value of 1/100, and annotates values giving
+     *    a percentage (so the metric values are typically in the range of 0..100,
+     *    and a metric value `3` means "3 percent").
+     * * `10^2.%` indicates a metric contains a ratio, typically in the range
+     *    0..1, that will be multiplied by 100 and displayed as a percentage
+     *    (so a metric value `0.03` means "3 percent").
+     * 
+ * + * string unit = 5; + * + * @return The bytes for unit. + */ + public com.google.protobuf.ByteString getUnitBytes() { + java.lang.Object ref = unit_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + unit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The units in which the metric value is reported. It is only applicable
+     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+     * defines the representation of the stored metric values.
+     *
+     * Different systems might scale the values to be more easily displayed (so a
+     * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+     * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+     * `kBy`, then the value of the metric is always in thousands of bytes, no
+     * matter how it might be displayed.
+     *
+     * If you want a custom metric to record the exact number of CPU-seconds used
+     * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+     * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+     * CPU-seconds, then the value is written as `12005`.
+     *
+     * Alternatively, if you want a custom metric to record data in a more
+     * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+     * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+     * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+     *
+     * The supported units are a subset of [The Unified Code for Units of
+     * Measure](https://unitsofmeasure.org/ucum.html) standard:
+     *
+     * **Basic units (UNIT)**
+     *
+     * * `bit`   bit
+     * * `By`    byte
+     * * `s`     second
+     * * `min`   minute
+     * * `h`     hour
+     * * `d`     day
+     * * `1`     dimensionless
+     *
+     * **Prefixes (PREFIX)**
+     *
+     * * `k`     kilo    (10^3)
+     * * `M`     mega    (10^6)
+     * * `G`     giga    (10^9)
+     * * `T`     tera    (10^12)
+     * * `P`     peta    (10^15)
+     * * `E`     exa     (10^18)
+     * * `Z`     zetta   (10^21)
+     * * `Y`     yotta   (10^24)
+     *
+     * * `m`     milli   (10^-3)
+     * * `u`     micro   (10^-6)
+     * * `n`     nano    (10^-9)
+     * * `p`     pico    (10^-12)
+     * * `f`     femto   (10^-15)
+     * * `a`     atto    (10^-18)
+     * * `z`     zepto   (10^-21)
+     * * `y`     yocto   (10^-24)
+     *
+     * * `Ki`    kibi    (2^10)
+     * * `Mi`    mebi    (2^20)
+     * * `Gi`    gibi    (2^30)
+     * * `Ti`    tebi    (2^40)
+     * * `Pi`    pebi    (2^50)
+     *
+     * **Grammar**
+     *
+     * The grammar also includes these connectors:
+     *
+     * * `/`    division or ratio (as an infix operator). For examples,
+     *          `kBy/{email}` or `MiBy/10ms` (although you should almost never
+     *          have `/s` in a metric `unit`; rates should always be computed at
+     *          query time from the underlying cumulative or delta value).
+     * * `.`    multiplication or composition (as an infix operator). For
+     *          examples, `GBy.d` or `k{watt}.h`.
+     *
+     * The grammar for a unit is as follows:
+     *
+     *     Expression = Component { "." Component } { "/" Component } ;
+     *
+     *     Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+     *               | Annotation
+     *               | "1"
+     *               ;
+     *
+     *     Annotation = "{" NAME "}" ;
+     *
+     * Notes:
+     *
+     * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+     *    is used alone, then the unit is equivalent to `1`. For examples,
+     *    `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+     * * `NAME` is a sequence of non-blank printable ASCII characters not
+     *    containing `{` or `}`.
+     * * `1` represents a unitary [dimensionless
+     *    unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+     *    as in `1/s`. It is typically used when none of the basic units are
+     *    appropriate. For example, "new users per day" can be represented as
+     *    `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+     *    users). Alternatively, "thousands of page views per day" would be
+     *    represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+     *    value of `5.3` would mean "5300 page views per day").
+     * * `%` represents dimensionless value of 1/100, and annotates values giving
+     *    a percentage (so the metric values are typically in the range of 0..100,
+     *    and a metric value `3` means "3 percent").
+     * * `10^2.%` indicates a metric contains a ratio, typically in the range
+     *    0..1, that will be multiplied by 100 and displayed as a percentage
+     *    (so a metric value `0.03` means "3 percent").
+     * 
+ * + * string unit = 5; + * + * @param value The unit to set. + * @return This builder for chaining. + */ + public Builder setUnit(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + unit_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The units in which the metric value is reported. It is only applicable
+     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+     * defines the representation of the stored metric values.
+     *
+     * Different systems might scale the values to be more easily displayed (so a
+     * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+     * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+     * `kBy`, then the value of the metric is always in thousands of bytes, no
+     * matter how it might be displayed.
+     *
+     * If you want a custom metric to record the exact number of CPU-seconds used
+     * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+     * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+     * CPU-seconds, then the value is written as `12005`.
+     *
+     * Alternatively, if you want a custom metric to record data in a more
+     * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+     * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+     * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+     *
+     * The supported units are a subset of [The Unified Code for Units of
+     * Measure](https://unitsofmeasure.org/ucum.html) standard:
+     *
+     * **Basic units (UNIT)**
+     *
+     * * `bit`   bit
+     * * `By`    byte
+     * * `s`     second
+     * * `min`   minute
+     * * `h`     hour
+     * * `d`     day
+     * * `1`     dimensionless
+     *
+     * **Prefixes (PREFIX)**
+     *
+     * * `k`     kilo    (10^3)
+     * * `M`     mega    (10^6)
+     * * `G`     giga    (10^9)
+     * * `T`     tera    (10^12)
+     * * `P`     peta    (10^15)
+     * * `E`     exa     (10^18)
+     * * `Z`     zetta   (10^21)
+     * * `Y`     yotta   (10^24)
+     *
+     * * `m`     milli   (10^-3)
+     * * `u`     micro   (10^-6)
+     * * `n`     nano    (10^-9)
+     * * `p`     pico    (10^-12)
+     * * `f`     femto   (10^-15)
+     * * `a`     atto    (10^-18)
+     * * `z`     zepto   (10^-21)
+     * * `y`     yocto   (10^-24)
+     *
+     * * `Ki`    kibi    (2^10)
+     * * `Mi`    mebi    (2^20)
+     * * `Gi`    gibi    (2^30)
+     * * `Ti`    tebi    (2^40)
+     * * `Pi`    pebi    (2^50)
+     *
+     * **Grammar**
+     *
+     * The grammar also includes these connectors:
+     *
+     * * `/`    division or ratio (as an infix operator). For examples,
+     *          `kBy/{email}` or `MiBy/10ms` (although you should almost never
+     *          have `/s` in a metric `unit`; rates should always be computed at
+     *          query time from the underlying cumulative or delta value).
+     * * `.`    multiplication or composition (as an infix operator). For
+     *          examples, `GBy.d` or `k{watt}.h`.
+     *
+     * The grammar for a unit is as follows:
+     *
+     *     Expression = Component { "." Component } { "/" Component } ;
+     *
+     *     Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+     *               | Annotation
+     *               | "1"
+     *               ;
+     *
+     *     Annotation = "{" NAME "}" ;
+     *
+     * Notes:
+     *
+     * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+     *    is used alone, then the unit is equivalent to `1`. For examples,
+     *    `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+     * * `NAME` is a sequence of non-blank printable ASCII characters not
+     *    containing `{` or `}`.
+     * * `1` represents a unitary [dimensionless
+     *    unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+     *    as in `1/s`. It is typically used when none of the basic units are
+     *    appropriate. For example, "new users per day" can be represented as
+     *    `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+     *    users). Alternatively, "thousands of page views per day" would be
+     *    represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+     *    value of `5.3` would mean "5300 page views per day").
+     * * `%` represents dimensionless value of 1/100, and annotates values giving
+     *    a percentage (so the metric values are typically in the range of 0..100,
+     *    and a metric value `3` means "3 percent").
+     * * `10^2.%` indicates a metric contains a ratio, typically in the range
+     *    0..1, that will be multiplied by 100 and displayed as a percentage
+     *    (so a metric value `0.03` means "3 percent").
+     * 
+ * + * string unit = 5; + * + * @return This builder for chaining. + */ + public Builder clearUnit() { + unit_ = getDefaultInstance().getUnit(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The units in which the metric value is reported. It is only applicable
+     * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+     * defines the representation of the stored metric values.
+     *
+     * Different systems might scale the values to be more easily displayed (so a
+     * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+     * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+     * `kBy`, then the value of the metric is always in thousands of bytes, no
+     * matter how it might be displayed.
+     *
+     * If you want a custom metric to record the exact number of CPU-seconds used
+     * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+     * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+     * CPU-seconds, then the value is written as `12005`.
+     *
+     * Alternatively, if you want a custom metric to record data in a more
+     * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+     * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+     * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+     *
+     * The supported units are a subset of [The Unified Code for Units of
+     * Measure](https://unitsofmeasure.org/ucum.html) standard:
+     *
+     * **Basic units (UNIT)**
+     *
+     * * `bit`   bit
+     * * `By`    byte
+     * * `s`     second
+     * * `min`   minute
+     * * `h`     hour
+     * * `d`     day
+     * * `1`     dimensionless
+     *
+     * **Prefixes (PREFIX)**
+     *
+     * * `k`     kilo    (10^3)
+     * * `M`     mega    (10^6)
+     * * `G`     giga    (10^9)
+     * * `T`     tera    (10^12)
+     * * `P`     peta    (10^15)
+     * * `E`     exa     (10^18)
+     * * `Z`     zetta   (10^21)
+     * * `Y`     yotta   (10^24)
+     *
+     * * `m`     milli   (10^-3)
+     * * `u`     micro   (10^-6)
+     * * `n`     nano    (10^-9)
+     * * `p`     pico    (10^-12)
+     * * `f`     femto   (10^-15)
+     * * `a`     atto    (10^-18)
+     * * `z`     zepto   (10^-21)
+     * * `y`     yocto   (10^-24)
+     *
+     * * `Ki`    kibi    (2^10)
+     * * `Mi`    mebi    (2^20)
+     * * `Gi`    gibi    (2^30)
+     * * `Ti`    tebi    (2^40)
+     * * `Pi`    pebi    (2^50)
+     *
+     * **Grammar**
+     *
+     * The grammar also includes these connectors:
+     *
+     * * `/`    division or ratio (as an infix operator). For examples,
+     *          `kBy/{email}` or `MiBy/10ms` (although you should almost never
+     *          have `/s` in a metric `unit`; rates should always be computed at
+     *          query time from the underlying cumulative or delta value).
+     * * `.`    multiplication or composition (as an infix operator). For
+     *          examples, `GBy.d` or `k{watt}.h`.
+     *
+     * The grammar for a unit is as follows:
+     *
+     *     Expression = Component { "." Component } { "/" Component } ;
+     *
+     *     Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+     *               | Annotation
+     *               | "1"
+     *               ;
+     *
+     *     Annotation = "{" NAME "}" ;
+     *
+     * Notes:
+     *
+     * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+     *    is used alone, then the unit is equivalent to `1`. For examples,
+     *    `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+     * * `NAME` is a sequence of non-blank printable ASCII characters not
+     *    containing `{` or `}`.
+     * * `1` represents a unitary [dimensionless
+     *    unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+     *    as in `1/s`. It is typically used when none of the basic units are
+     *    appropriate. For example, "new users per day" can be represented as
+     *    `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+     *    users). Alternatively, "thousands of page views per day" would be
+     *    represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+     *    value of `5.3` would mean "5300 page views per day").
+     * * `%` represents dimensionless value of 1/100, and annotates values giving
+     *    a percentage (so the metric values are typically in the range of 0..100,
+     *    and a metric value `3` means "3 percent").
+     * * `10^2.%` indicates a metric contains a ratio, typically in the range
+     *    0..1, that will be multiplied by 100 and displayed as a percentage
+     *    (so a metric value `0.03` means "3 percent").
+     * 
+ * + * string unit = 5; + * + * @param value The bytes for unit to set. + * @return This builder for chaining. + */ + public Builder setUnitBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + unit_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A detailed description of the metric, which can be used in documentation.
+     * 
+ * + * string description = 6; + * + * @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; + } + } + /** + * + * + *
+     * A detailed description of the metric, which can be used in documentation.
+     * 
+ * + * string description = 6; + * + * @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; + } + } + /** + * + * + *
+     * A detailed description of the metric, which can be used in documentation.
+     * 
+ * + * string description = 6; + * + * @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; + } + /** + * + * + *
+     * A detailed description of the metric, which can be used in documentation.
+     * 
+ * + * string description = 6; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * A detailed description of the metric, which can be used in documentation.
+     * 
+ * + * string description = 6; + * + * @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 displayName_ = ""; + /** + * + * + *
+     * A concise name for the metric, which can be displayed in user interfaces.
+     * Use sentence case without an ending period, for example "Request count".
+     * This field is optional but it is recommended to be set for any metrics
+     * associated with user-visible concepts, such as Quota.
+     * 
+ * + * string display_name = 7; + * + * @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; + } + } + /** + * + * + *
+     * A concise name for the metric, which can be displayed in user interfaces.
+     * Use sentence case without an ending period, for example "Request count".
+     * This field is optional but it is recommended to be set for any metrics
+     * associated with user-visible concepts, such as Quota.
+     * 
+ * + * string display_name = 7; + * + * @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; + } + } + /** + * + * + *
+     * A concise name for the metric, which can be displayed in user interfaces.
+     * Use sentence case without an ending period, for example "Request count".
+     * This field is optional but it is recommended to be set for any metrics
+     * associated with user-visible concepts, such as Quota.
+     * 
+ * + * string display_name = 7; + * + * @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_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * A concise name for the metric, which can be displayed in user interfaces.
+     * Use sentence case without an ending period, for example "Request count".
+     * This field is optional but it is recommended to be set for any metrics
+     * associated with user-visible concepts, such as Quota.
+     * 
+ * + * string display_name = 7; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * A concise name for the metric, which can be displayed in user interfaces.
+     * Use sentence case without an ending period, for example "Request count".
+     * This field is optional but it is recommended to be set for any metrics
+     * associated with user-visible concepts, such as Quota.
+     * 
+ * + * string display_name = 7; + * + * @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_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.api.MetricDescriptor.MetricDescriptorMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.MetricDescriptor.MetricDescriptorMetadata, + com.google.api.MetricDescriptor.MetricDescriptorMetadata.Builder, + com.google.api.MetricDescriptor.MetricDescriptorMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Optional. Metadata which can be used to guide usage of the metric.
+     * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Optional. Metadata which can be used to guide usage of the metric.
+     * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + * + * @return The metadata. + */ + public com.google.api.MetricDescriptor.MetricDescriptorMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.api.MetricDescriptor.MetricDescriptorMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Metadata which can be used to guide usage of the metric.
+     * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + */ + public Builder setMetadata(com.google.api.MetricDescriptor.MetricDescriptorMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Metadata which can be used to guide usage of the metric.
+     * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + */ + public Builder setMetadata( + com.google.api.MetricDescriptor.MetricDescriptorMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Metadata which can be used to guide usage of the metric.
+     * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + */ + public Builder mergeMetadata(com.google.api.MetricDescriptor.MetricDescriptorMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && metadata_ != null + && metadata_ + != com.google.api.MetricDescriptor.MetricDescriptorMetadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Metadata which can be used to guide usage of the metric.
+     * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000100); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Metadata which can be used to guide usage of the metric.
+     * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + */ + public com.google.api.MetricDescriptor.MetricDescriptorMetadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Metadata which can be used to guide usage of the metric.
+     * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + */ + public com.google.api.MetricDescriptor.MetricDescriptorMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.api.MetricDescriptor.MetricDescriptorMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Optional. Metadata which can be used to guide usage of the metric.
+     * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.MetricDescriptor.MetricDescriptorMetadata, + com.google.api.MetricDescriptor.MetricDescriptorMetadata.Builder, + com.google.api.MetricDescriptor.MetricDescriptorMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.MetricDescriptor.MetricDescriptorMetadata, + com.google.api.MetricDescriptor.MetricDescriptorMetadata.Builder, + com.google.api.MetricDescriptor.MetricDescriptorMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private int launchStage_ = 0; + /** + * + * + *
+     * Optional. The launch stage of the metric definition.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 12; + * + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Override + public int getLaunchStageValue() { + return launchStage_; + } + /** + * + * + *
+     * Optional. The launch stage of the metric definition.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 12; + * + * @param value The enum numeric value on the wire for launchStage to set. + * @return This builder for chaining. + */ + public Builder setLaunchStageValue(int value) { + launchStage_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The launch stage of the metric definition.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 12; + * + * @return The launchStage. + */ + @java.lang.Override + public com.google.api.LaunchStage getLaunchStage() { + com.google.api.LaunchStage result = com.google.api.LaunchStage.forNumber(launchStage_); + return result == null ? com.google.api.LaunchStage.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. The launch stage of the metric definition.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 12; + * + * @param value The launchStage to set. + * @return This builder for chaining. + */ + public Builder setLaunchStage(com.google.api.LaunchStage value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + launchStage_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The launch stage of the metric definition.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 12; + * + * @return This builder for chaining. + */ + public Builder clearLaunchStage() { + bitField0_ = (bitField0_ & ~0x00000200); + launchStage_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList monitoredResourceTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureMonitoredResourceTypesIsMutable() { + if (!monitoredResourceTypes_.isModifiable()) { + monitoredResourceTypes_ = + new com.google.protobuf.LazyStringArrayList(monitoredResourceTypes_); + } + bitField0_ |= 0x00000400; + } + /** + * + * + *
+     * Read-only. If present, then a [time
+     * series][google.monitoring.v3.TimeSeries], which is identified partially by
+     * a metric type and a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+     * is associated with this metric type can only be associated with one of the
+     * monitored resource types listed here.
+     * 
+ * + * repeated string monitored_resource_types = 13; + * + * @return A list containing the monitoredResourceTypes. + */ + public com.google.protobuf.ProtocolStringList getMonitoredResourceTypesList() { + monitoredResourceTypes_.makeImmutable(); + return monitoredResourceTypes_; + } + /** + * + * + *
+     * Read-only. If present, then a [time
+     * series][google.monitoring.v3.TimeSeries], which is identified partially by
+     * a metric type and a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+     * is associated with this metric type can only be associated with one of the
+     * monitored resource types listed here.
+     * 
+ * + * repeated string monitored_resource_types = 13; + * + * @return The count of monitoredResourceTypes. + */ + public int getMonitoredResourceTypesCount() { + return monitoredResourceTypes_.size(); + } + /** + * + * + *
+     * Read-only. If present, then a [time
+     * series][google.monitoring.v3.TimeSeries], which is identified partially by
+     * a metric type and a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+     * is associated with this metric type can only be associated with one of the
+     * monitored resource types listed here.
+     * 
+ * + * repeated string monitored_resource_types = 13; + * + * @param index The index of the element to return. + * @return The monitoredResourceTypes at the given index. + */ + public java.lang.String getMonitoredResourceTypes(int index) { + return monitoredResourceTypes_.get(index); + } + /** + * + * + *
+     * Read-only. If present, then a [time
+     * series][google.monitoring.v3.TimeSeries], which is identified partially by
+     * a metric type and a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+     * is associated with this metric type can only be associated with one of the
+     * monitored resource types listed here.
+     * 
+ * + * repeated string monitored_resource_types = 13; + * + * @param index The index of the value to return. + * @return The bytes of the monitoredResourceTypes at the given index. + */ + public com.google.protobuf.ByteString getMonitoredResourceTypesBytes(int index) { + return monitoredResourceTypes_.getByteString(index); + } + /** + * + * + *
+     * Read-only. If present, then a [time
+     * series][google.monitoring.v3.TimeSeries], which is identified partially by
+     * a metric type and a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+     * is associated with this metric type can only be associated with one of the
+     * monitored resource types listed here.
+     * 
+ * + * repeated string monitored_resource_types = 13; + * + * @param index The index to set the value at. + * @param value The monitoredResourceTypes to set. + * @return This builder for chaining. + */ + public Builder setMonitoredResourceTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMonitoredResourceTypesIsMutable(); + monitoredResourceTypes_.set(index, value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Read-only. If present, then a [time
+     * series][google.monitoring.v3.TimeSeries], which is identified partially by
+     * a metric type and a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+     * is associated with this metric type can only be associated with one of the
+     * monitored resource types listed here.
+     * 
+ * + * repeated string monitored_resource_types = 13; + * + * @param value The monitoredResourceTypes to add. + * @return This builder for chaining. + */ + public Builder addMonitoredResourceTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMonitoredResourceTypesIsMutable(); + monitoredResourceTypes_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Read-only. If present, then a [time
+     * series][google.monitoring.v3.TimeSeries], which is identified partially by
+     * a metric type and a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+     * is associated with this metric type can only be associated with one of the
+     * monitored resource types listed here.
+     * 
+ * + * repeated string monitored_resource_types = 13; + * + * @param values The monitoredResourceTypes to add. + * @return This builder for chaining. + */ + public Builder addAllMonitoredResourceTypes(java.lang.Iterable values) { + ensureMonitoredResourceTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, monitoredResourceTypes_); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Read-only. If present, then a [time
+     * series][google.monitoring.v3.TimeSeries], which is identified partially by
+     * a metric type and a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+     * is associated with this metric type can only be associated with one of the
+     * monitored resource types listed here.
+     * 
+ * + * repeated string monitored_resource_types = 13; + * + * @return This builder for chaining. + */ + public Builder clearMonitoredResourceTypes() { + monitoredResourceTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Read-only. If present, then a [time
+     * series][google.monitoring.v3.TimeSeries], which is identified partially by
+     * a metric type and a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+     * is associated with this metric type can only be associated with one of the
+     * monitored resource types listed here.
+     * 
+ * + * repeated string monitored_resource_types = 13; + * + * @param value The bytes of the monitoredResourceTypes to add. + * @return This builder for chaining. + */ + public Builder addMonitoredResourceTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMonitoredResourceTypesIsMutable(); + monitoredResourceTypes_.add(value); + bitField0_ |= 0x00000400; + 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.api.MetricDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.api.MetricDescriptor) + private static final com.google.api.MetricDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.MetricDescriptor(); + } + + public static com.google.api.MetricDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricDescriptor 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.api.MetricDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricDescriptorOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricDescriptorOrBuilder.java new file mode 100644 index 000000000000..e0ec1ffb3916 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricDescriptorOrBuilder.java @@ -0,0 +1,633 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/metric.proto + +package com.google.api; + +public interface MetricDescriptorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.MetricDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the metric descriptor.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the metric descriptor.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The metric type, including its DNS name prefix. The type is not
+   * URL-encoded. All user-defined metric types have the DNS name
+   * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+   * use a natural hierarchical grouping. For example:
+   *
+   *     "custom.googleapis.com/invoice/paid/amount"
+   *     "external.googleapis.com/prometheus/up"
+   *     "appengine.googleapis.com/http/server/response_latencies"
+   * 
+ * + * string type = 8; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * The metric type, including its DNS name prefix. The type is not
+   * URL-encoded. All user-defined metric types have the DNS name
+   * `custom.googleapis.com` or `external.googleapis.com`. Metric types should
+   * use a natural hierarchical grouping. For example:
+   *
+   *     "custom.googleapis.com/invoice/paid/amount"
+   *     "external.googleapis.com/prometheus/up"
+   *     "appengine.googleapis.com/http/server/response_latencies"
+   * 
+ * + * string type = 8; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * The set of labels that can be used to describe a specific
+   * instance of this metric type. For example, the
+   * `appengine.googleapis.com/http/server/response_latencies` metric
+   * type has a label for the HTTP response code, `response_code`, so
+   * you can look at latencies for successful responses or just
+   * for responses that failed.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + java.util.List getLabelsList(); + /** + * + * + *
+   * The set of labels that can be used to describe a specific
+   * instance of this metric type. For example, the
+   * `appengine.googleapis.com/http/server/response_latencies` metric
+   * type has a label for the HTTP response code, `response_code`, so
+   * you can look at latencies for successful responses or just
+   * for responses that failed.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + com.google.api.LabelDescriptor getLabels(int index); + /** + * + * + *
+   * The set of labels that can be used to describe a specific
+   * instance of this metric type. For example, the
+   * `appengine.googleapis.com/http/server/response_latencies` metric
+   * type has a label for the HTTP response code, `response_code`, so
+   * you can look at latencies for successful responses or just
+   * for responses that failed.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + int getLabelsCount(); + /** + * + * + *
+   * The set of labels that can be used to describe a specific
+   * instance of this metric type. For example, the
+   * `appengine.googleapis.com/http/server/response_latencies` metric
+   * type has a label for the HTTP response code, `response_code`, so
+   * you can look at latencies for successful responses or just
+   * for responses that failed.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + java.util.List getLabelsOrBuilderList(); + /** + * + * + *
+   * The set of labels that can be used to describe a specific
+   * instance of this metric type. For example, the
+   * `appengine.googleapis.com/http/server/response_latencies` metric
+   * type has a label for the HTTP response code, `response_code`, so
+   * you can look at latencies for successful responses or just
+   * for responses that failed.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 2; + */ + com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder(int index); + + /** + * + * + *
+   * Whether the metric records instantaneous values, changes to a value, etc.
+   * Some combinations of `metric_kind` and `value_type` might not be supported.
+   * 
+ * + * .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + * @return The enum numeric value on the wire for metricKind. + */ + int getMetricKindValue(); + /** + * + * + *
+   * Whether the metric records instantaneous values, changes to a value, etc.
+   * Some combinations of `metric_kind` and `value_type` might not be supported.
+   * 
+ * + * .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * + * @return The metricKind. + */ + com.google.api.MetricDescriptor.MetricKind getMetricKind(); + + /** + * + * + *
+   * Whether the measurement is an integer, a floating-point number, etc.
+   * Some combinations of `metric_kind` and `value_type` might not be supported.
+   * 
+ * + * .google.api.MetricDescriptor.ValueType value_type = 4; + * + * @return The enum numeric value on the wire for valueType. + */ + int getValueTypeValue(); + /** + * + * + *
+   * Whether the measurement is an integer, a floating-point number, etc.
+   * Some combinations of `metric_kind` and `value_type` might not be supported.
+   * 
+ * + * .google.api.MetricDescriptor.ValueType value_type = 4; + * + * @return The valueType. + */ + com.google.api.MetricDescriptor.ValueType getValueType(); + + /** + * + * + *
+   * The units in which the metric value is reported. It is only applicable
+   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+   * defines the representation of the stored metric values.
+   *
+   * Different systems might scale the values to be more easily displayed (so a
+   * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+   * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+   * `kBy`, then the value of the metric is always in thousands of bytes, no
+   * matter how it might be displayed.
+   *
+   * If you want a custom metric to record the exact number of CPU-seconds used
+   * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+   * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+   * CPU-seconds, then the value is written as `12005`.
+   *
+   * Alternatively, if you want a custom metric to record data in a more
+   * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+   * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+   * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+   *
+   * The supported units are a subset of [The Unified Code for Units of
+   * Measure](https://unitsofmeasure.org/ucum.html) standard:
+   *
+   * **Basic units (UNIT)**
+   *
+   * * `bit`   bit
+   * * `By`    byte
+   * * `s`     second
+   * * `min`   minute
+   * * `h`     hour
+   * * `d`     day
+   * * `1`     dimensionless
+   *
+   * **Prefixes (PREFIX)**
+   *
+   * * `k`     kilo    (10^3)
+   * * `M`     mega    (10^6)
+   * * `G`     giga    (10^9)
+   * * `T`     tera    (10^12)
+   * * `P`     peta    (10^15)
+   * * `E`     exa     (10^18)
+   * * `Z`     zetta   (10^21)
+   * * `Y`     yotta   (10^24)
+   *
+   * * `m`     milli   (10^-3)
+   * * `u`     micro   (10^-6)
+   * * `n`     nano    (10^-9)
+   * * `p`     pico    (10^-12)
+   * * `f`     femto   (10^-15)
+   * * `a`     atto    (10^-18)
+   * * `z`     zepto   (10^-21)
+   * * `y`     yocto   (10^-24)
+   *
+   * * `Ki`    kibi    (2^10)
+   * * `Mi`    mebi    (2^20)
+   * * `Gi`    gibi    (2^30)
+   * * `Ti`    tebi    (2^40)
+   * * `Pi`    pebi    (2^50)
+   *
+   * **Grammar**
+   *
+   * The grammar also includes these connectors:
+   *
+   * * `/`    division or ratio (as an infix operator). For examples,
+   *          `kBy/{email}` or `MiBy/10ms` (although you should almost never
+   *          have `/s` in a metric `unit`; rates should always be computed at
+   *          query time from the underlying cumulative or delta value).
+   * * `.`    multiplication or composition (as an infix operator). For
+   *          examples, `GBy.d` or `k{watt}.h`.
+   *
+   * The grammar for a unit is as follows:
+   *
+   *     Expression = Component { "." Component } { "/" Component } ;
+   *
+   *     Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+   *               | Annotation
+   *               | "1"
+   *               ;
+   *
+   *     Annotation = "{" NAME "}" ;
+   *
+   * Notes:
+   *
+   * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+   *    is used alone, then the unit is equivalent to `1`. For examples,
+   *    `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+   * * `NAME` is a sequence of non-blank printable ASCII characters not
+   *    containing `{` or `}`.
+   * * `1` represents a unitary [dimensionless
+   *    unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+   *    as in `1/s`. It is typically used when none of the basic units are
+   *    appropriate. For example, "new users per day" can be represented as
+   *    `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+   *    users). Alternatively, "thousands of page views per day" would be
+   *    represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+   *    value of `5.3` would mean "5300 page views per day").
+   * * `%` represents dimensionless value of 1/100, and annotates values giving
+   *    a percentage (so the metric values are typically in the range of 0..100,
+   *    and a metric value `3` means "3 percent").
+   * * `10^2.%` indicates a metric contains a ratio, typically in the range
+   *    0..1, that will be multiplied by 100 and displayed as a percentage
+   *    (so a metric value `0.03` means "3 percent").
+   * 
+ * + * string unit = 5; + * + * @return The unit. + */ + java.lang.String getUnit(); + /** + * + * + *
+   * The units in which the metric value is reported. It is only applicable
+   * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit`
+   * defines the representation of the stored metric values.
+   *
+   * Different systems might scale the values to be more easily displayed (so a
+   * value of `0.02kBy` _might_ be displayed as `20By`, and a value of
+   * `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is
+   * `kBy`, then the value of the metric is always in thousands of bytes, no
+   * matter how it might be displayed.
+   *
+   * If you want a custom metric to record the exact number of CPU-seconds used
+   * by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is
+   * `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
+   * CPU-seconds, then the value is written as `12005`.
+   *
+   * Alternatively, if you want a custom metric to record data in a more
+   * granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is
+   * `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
+   * or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
+   *
+   * The supported units are a subset of [The Unified Code for Units of
+   * Measure](https://unitsofmeasure.org/ucum.html) standard:
+   *
+   * **Basic units (UNIT)**
+   *
+   * * `bit`   bit
+   * * `By`    byte
+   * * `s`     second
+   * * `min`   minute
+   * * `h`     hour
+   * * `d`     day
+   * * `1`     dimensionless
+   *
+   * **Prefixes (PREFIX)**
+   *
+   * * `k`     kilo    (10^3)
+   * * `M`     mega    (10^6)
+   * * `G`     giga    (10^9)
+   * * `T`     tera    (10^12)
+   * * `P`     peta    (10^15)
+   * * `E`     exa     (10^18)
+   * * `Z`     zetta   (10^21)
+   * * `Y`     yotta   (10^24)
+   *
+   * * `m`     milli   (10^-3)
+   * * `u`     micro   (10^-6)
+   * * `n`     nano    (10^-9)
+   * * `p`     pico    (10^-12)
+   * * `f`     femto   (10^-15)
+   * * `a`     atto    (10^-18)
+   * * `z`     zepto   (10^-21)
+   * * `y`     yocto   (10^-24)
+   *
+   * * `Ki`    kibi    (2^10)
+   * * `Mi`    mebi    (2^20)
+   * * `Gi`    gibi    (2^30)
+   * * `Ti`    tebi    (2^40)
+   * * `Pi`    pebi    (2^50)
+   *
+   * **Grammar**
+   *
+   * The grammar also includes these connectors:
+   *
+   * * `/`    division or ratio (as an infix operator). For examples,
+   *          `kBy/{email}` or `MiBy/10ms` (although you should almost never
+   *          have `/s` in a metric `unit`; rates should always be computed at
+   *          query time from the underlying cumulative or delta value).
+   * * `.`    multiplication or composition (as an infix operator). For
+   *          examples, `GBy.d` or `k{watt}.h`.
+   *
+   * The grammar for a unit is as follows:
+   *
+   *     Expression = Component { "." Component } { "/" Component } ;
+   *
+   *     Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
+   *               | Annotation
+   *               | "1"
+   *               ;
+   *
+   *     Annotation = "{" NAME "}" ;
+   *
+   * Notes:
+   *
+   * * `Annotation` is just a comment if it follows a `UNIT`. If the annotation
+   *    is used alone, then the unit is equivalent to `1`. For examples,
+   *    `{request}/s == 1/s`, `By{transmitted}/s == By/s`.
+   * * `NAME` is a sequence of non-blank printable ASCII characters not
+   *    containing `{` or `}`.
+   * * `1` represents a unitary [dimensionless
+   *    unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such
+   *    as in `1/s`. It is typically used when none of the basic units are
+   *    appropriate. For example, "new users per day" can be represented as
+   *    `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new
+   *    users). Alternatively, "thousands of page views per day" would be
+   *    represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric
+   *    value of `5.3` would mean "5300 page views per day").
+   * * `%` represents dimensionless value of 1/100, and annotates values giving
+   *    a percentage (so the metric values are typically in the range of 0..100,
+   *    and a metric value `3` means "3 percent").
+   * * `10^2.%` indicates a metric contains a ratio, typically in the range
+   *    0..1, that will be multiplied by 100 and displayed as a percentage
+   *    (so a metric value `0.03` means "3 percent").
+   * 
+ * + * string unit = 5; + * + * @return The bytes for unit. + */ + com.google.protobuf.ByteString getUnitBytes(); + + /** + * + * + *
+   * A detailed description of the metric, which can be used in documentation.
+   * 
+ * + * string description = 6; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A detailed description of the metric, which can be used in documentation.
+   * 
+ * + * string description = 6; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * A concise name for the metric, which can be displayed in user interfaces.
+   * Use sentence case without an ending period, for example "Request count".
+   * This field is optional but it is recommended to be set for any metrics
+   * associated with user-visible concepts, such as Quota.
+   * 
+ * + * string display_name = 7; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * A concise name for the metric, which can be displayed in user interfaces.
+   * Use sentence case without an ending period, for example "Request count".
+   * This field is optional but it is recommended to be set for any metrics
+   * associated with user-visible concepts, such as Quota.
+   * 
+ * + * string display_name = 7; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Metadata which can be used to guide usage of the metric.
+   * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Optional. Metadata which can be used to guide usage of the metric.
+   * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + * + * @return The metadata. + */ + com.google.api.MetricDescriptor.MetricDescriptorMetadata getMetadata(); + /** + * + * + *
+   * Optional. Metadata which can be used to guide usage of the metric.
+   * 
+ * + * .google.api.MetricDescriptor.MetricDescriptorMetadata metadata = 10; + */ + com.google.api.MetricDescriptor.MetricDescriptorMetadataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * Optional. The launch stage of the metric definition.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 12; + * + * @return The enum numeric value on the wire for launchStage. + */ + int getLaunchStageValue(); + /** + * + * + *
+   * Optional. The launch stage of the metric definition.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 12; + * + * @return The launchStage. + */ + com.google.api.LaunchStage getLaunchStage(); + + /** + * + * + *
+   * Read-only. If present, then a [time
+   * series][google.monitoring.v3.TimeSeries], which is identified partially by
+   * a metric type and a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+   * is associated with this metric type can only be associated with one of the
+   * monitored resource types listed here.
+   * 
+ * + * repeated string monitored_resource_types = 13; + * + * @return A list containing the monitoredResourceTypes. + */ + java.util.List getMonitoredResourceTypesList(); + /** + * + * + *
+   * Read-only. If present, then a [time
+   * series][google.monitoring.v3.TimeSeries], which is identified partially by
+   * a metric type and a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+   * is associated with this metric type can only be associated with one of the
+   * monitored resource types listed here.
+   * 
+ * + * repeated string monitored_resource_types = 13; + * + * @return The count of monitoredResourceTypes. + */ + int getMonitoredResourceTypesCount(); + /** + * + * + *
+   * Read-only. If present, then a [time
+   * series][google.monitoring.v3.TimeSeries], which is identified partially by
+   * a metric type and a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+   * is associated with this metric type can only be associated with one of the
+   * monitored resource types listed here.
+   * 
+ * + * repeated string monitored_resource_types = 13; + * + * @param index The index of the element to return. + * @return The monitoredResourceTypes at the given index. + */ + java.lang.String getMonitoredResourceTypes(int index); + /** + * + * + *
+   * Read-only. If present, then a [time
+   * series][google.monitoring.v3.TimeSeries], which is identified partially by
+   * a metric type and a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that
+   * is associated with this metric type can only be associated with one of the
+   * monitored resource types listed here.
+   * 
+ * + * repeated string monitored_resource_types = 13; + * + * @param index The index of the value to return. + * @return The bytes of the monitoredResourceTypes at the given index. + */ + com.google.protobuf.ByteString getMonitoredResourceTypesBytes(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricOrBuilder.java new file mode 100644 index 000000000000..02fc1b7df1ed --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/metric.proto + +package com.google.api; + +public interface MetricOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Metric) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An existing metric type, see
+   * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+   * `custom.googleapis.com/invoice/paid/amount`.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * An existing metric type, see
+   * [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example,
+   * `custom.googleapis.com/invoice/paid/amount`.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * The set of label values that uniquely identify this metric. All
+   * labels listed in the `MetricDescriptor` must be assigned values.
+   * 
+ * + * map<string, string> labels = 2; + */ + int getLabelsCount(); + /** + * + * + *
+   * The set of label values that uniquely identify this metric. All
+   * labels listed in the `MetricDescriptor` must be assigned values.
+   * 
+ * + * map<string, string> labels = 2; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * The set of label values that uniquely identify this metric. All
+   * labels listed in the `MetricDescriptor` must be assigned values.
+   * 
+ * + * map<string, string> labels = 2; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The set of label values that uniquely identify this metric. All
+   * labels listed in the `MetricDescriptor` must be assigned values.
+   * 
+ * + * map<string, string> labels = 2; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The set of label values that uniquely identify this metric. All
+   * labels listed in the `MetricDescriptor` must be assigned values.
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricProto.java new file mode 100644 index 000000000000..ee0378580a89 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricProto.java @@ -0,0 +1,140 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/metric.proto + +package com.google.api; + +public final class MetricProto { + private MetricProto() {} + + 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_api_MetricDescriptor_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MetricDescriptor_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Metric_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Metric_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Metric_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Metric_LabelsEntry_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\027google/api/metric.proto\022\ngoogle.api\032\026g" + + "oogle/api/label.proto\032\035google/api/launch" + + "_stage.proto\032\036google/protobuf/duration.p" + + "roto\"\237\006\n\020MetricDescriptor\022\014\n\004name\030\001 \001(\t\022" + + "\014\n\004type\030\010 \001(\t\022+\n\006labels\030\002 \003(\0132\033.google.a" + + "pi.LabelDescriptor\022<\n\013metric_kind\030\003 \001(\0162" + + "\'.google.api.MetricDescriptor.MetricKind" + + "\022:\n\nvalue_type\030\004 \001(\0162&.google.api.Metric" + + "Descriptor.ValueType\022\014\n\004unit\030\005 \001(\t\022\023\n\013de" + + "scription\030\006 \001(\t\022\024\n\014display_name\030\007 \001(\t\022G\n" + + "\010metadata\030\n \001(\01325.google.api.MetricDescr" + + "iptor.MetricDescriptorMetadata\022-\n\014launch" + + "_stage\030\014 \001(\0162\027.google.api.LaunchStage\022 \n" + + "\030monitored_resource_types\030\r \003(\t\032\260\001\n\030Metr" + + "icDescriptorMetadata\0221\n\014launch_stage\030\001 \001" + + "(\0162\027.google.api.LaunchStageB\002\030\001\0220\n\rsampl" + + "e_period\030\002 \001(\0132\031.google.protobuf.Duratio" + + "n\022/\n\014ingest_delay\030\003 \001(\0132\031.google.protobu" + + "f.Duration\"O\n\nMetricKind\022\033\n\027METRIC_KIND_" + + "UNSPECIFIED\020\000\022\t\n\005GAUGE\020\001\022\t\n\005DELTA\020\002\022\016\n\nC" + + "UMULATIVE\020\003\"q\n\tValueType\022\032\n\026VALUE_TYPE_U" + + "NSPECIFIED\020\000\022\010\n\004BOOL\020\001\022\t\n\005INT64\020\002\022\n\n\006DOU" + + "BLE\020\003\022\n\n\006STRING\020\004\022\020\n\014DISTRIBUTION\020\005\022\t\n\005M" + + "ONEY\020\006\"u\n\006Metric\022\014\n\004type\030\003 \001(\t\022.\n\006labels" + + "\030\002 \003(\0132\036.google.api.Metric.LabelsEntry\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001B_\n\016com.google.apiB\013MetricProtoP\001Z7" + + "google.golang.org/genproto/googleapis/ap" + + "i/metric;metric\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.LabelProto.getDescriptor(), + com.google.api.LaunchStageProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + }); + internal_static_google_api_MetricDescriptor_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_MetricDescriptor_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MetricDescriptor_descriptor, + new java.lang.String[] { + "Name", + "Type", + "Labels", + "MetricKind", + "ValueType", + "Unit", + "Description", + "DisplayName", + "Metadata", + "LaunchStage", + "MonitoredResourceTypes", + }); + internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_descriptor = + internal_static_google_api_MetricDescriptor_descriptor.getNestedTypes().get(0); + internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MetricDescriptor_MetricDescriptorMetadata_descriptor, + new java.lang.String[] { + "LaunchStage", "SamplePeriod", "IngestDelay", + }); + internal_static_google_api_Metric_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_api_Metric_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Metric_descriptor, + new java.lang.String[] { + "Type", "Labels", + }); + internal_static_google_api_Metric_LabelsEntry_descriptor = + internal_static_google_api_Metric_descriptor.getNestedTypes().get(0); + internal_static_google_api_Metric_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Metric_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.api.LabelProto.getDescriptor(); + com.google.api.LaunchStageProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricRule.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricRule.java new file mode 100644 index 000000000000..64a95dba231e --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricRule.java @@ -0,0 +1,1018 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/quota.proto + +package com.google.api; + +/** + * + * + *
+ * Bind API methods to metrics. Binding a method to a metric causes that
+ * metric's configured quota behaviors to apply to the method call.
+ * 
+ * + * Protobuf type {@code google.api.MetricRule} + */ +public final class MetricRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.MetricRule) + MetricRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetricRule.newBuilder() to construct. + private MetricRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MetricRule() { + selector_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MetricRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.QuotaProto.internal_static_google_api_MetricRule_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetMetricCosts(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.QuotaProto.internal_static_google_api_MetricRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MetricRule.class, com.google.api.MetricRule.Builder.class); + } + + public static final int SELECTOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object selector_ = ""; + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + @java.lang.Override + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } + } + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRIC_COSTS_FIELD_NUMBER = 2; + + private static final class MetricCostsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.QuotaProto + .internal_static_google_api_MetricRule_MetricCostsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField metricCosts_; + + private com.google.protobuf.MapField internalGetMetricCosts() { + if (metricCosts_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetricCostsDefaultEntryHolder.defaultEntry); + } + return metricCosts_; + } + + public int getMetricCostsCount() { + return internalGetMetricCosts().getMap().size(); + } + /** + * + * + *
+   * Metrics to update when the selected methods are called, and the associated
+   * cost applied to each metric.
+   *
+   * The key of the map is the metric name, and the values are the amount
+   * increased for the metric against which the quota limits are defined.
+   * The value must not be negative.
+   * 
+ * + * map<string, int64> metric_costs = 2; + */ + @java.lang.Override + public boolean containsMetricCosts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetMetricCosts().getMap().containsKey(key); + } + /** Use {@link #getMetricCostsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetricCosts() { + return getMetricCostsMap(); + } + /** + * + * + *
+   * Metrics to update when the selected methods are called, and the associated
+   * cost applied to each metric.
+   *
+   * The key of the map is the metric name, and the values are the amount
+   * increased for the metric against which the quota limits are defined.
+   * The value must not be negative.
+   * 
+ * + * map<string, int64> metric_costs = 2; + */ + @java.lang.Override + public java.util.Map getMetricCostsMap() { + return internalGetMetricCosts().getMap(); + } + /** + * + * + *
+   * Metrics to update when the selected methods are called, and the associated
+   * cost applied to each metric.
+   *
+   * The key of the map is the metric name, and the values are the amount
+   * increased for the metric against which the quota limits are defined.
+   * The value must not be negative.
+   * 
+ * + * map<string, int64> metric_costs = 2; + */ + @java.lang.Override + public long getMetricCostsOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetricCosts().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Metrics to update when the selected methods are called, and the associated
+   * cost applied to each metric.
+   *
+   * The key of the map is the metric name, and the values are the amount
+   * increased for the metric against which the quota limits are defined.
+   * The value must not be negative.
+   * 
+ * + * map<string, int64> metric_costs = 2; + */ + @java.lang.Override + public long getMetricCostsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetricCosts().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetMetricCosts(), MetricCostsDefaultEntryHolder.defaultEntry, 2); + 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(selector_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_); + } + for (java.util.Map.Entry entry : + internalGetMetricCosts().getMap().entrySet()) { + com.google.protobuf.MapEntry metricCosts__ = + MetricCostsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metricCosts__); + } + 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.api.MetricRule)) { + return super.equals(obj); + } + com.google.api.MetricRule other = (com.google.api.MetricRule) obj; + + if (!getSelector().equals(other.getSelector())) return false; + if (!internalGetMetricCosts().equals(other.internalGetMetricCosts())) 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) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + if (!internalGetMetricCosts().getMap().isEmpty()) { + hash = (37 * hash) + METRIC_COSTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetricCosts().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.MetricRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MetricRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MetricRule parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MetricRule 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.api.MetricRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MetricRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MetricRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MetricRule 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.api.MetricRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.MetricRule 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.api.MetricRule parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MetricRule 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.api.MetricRule 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; + } + /** + * + * + *
+   * Bind API methods to metrics. Binding a method to a metric causes that
+   * metric's configured quota behaviors to apply to the method call.
+   * 
+ * + * Protobuf type {@code google.api.MetricRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.MetricRule) + com.google.api.MetricRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.QuotaProto.internal_static_google_api_MetricRule_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetMetricCosts(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableMetricCosts(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.QuotaProto.internal_static_google_api_MetricRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MetricRule.class, com.google.api.MetricRule.Builder.class); + } + + // Construct using com.google.api.MetricRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + selector_ = ""; + internalGetMutableMetricCosts().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.QuotaProto.internal_static_google_api_MetricRule_descriptor; + } + + @java.lang.Override + public com.google.api.MetricRule getDefaultInstanceForType() { + return com.google.api.MetricRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.MetricRule build() { + com.google.api.MetricRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.MetricRule buildPartial() { + com.google.api.MetricRule result = new com.google.api.MetricRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.MetricRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.selector_ = selector_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metricCosts_ = internalGetMetricCosts(); + result.metricCosts_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MetricRule) { + return mergeFrom((com.google.api.MetricRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MetricRule other) { + if (other == com.google.api.MetricRule.getDefaultInstance()) return this; + if (!other.getSelector().isEmpty()) { + selector_ = other.selector_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableMetricCosts().mergeFrom(other.internalGetMetricCosts()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + selector_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry metricCosts__ = + input.readMessage( + MetricCostsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMetricCosts() + .getMutableMap() + .put(metricCosts__.getKey(), metricCosts__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object selector_ = ""; + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return The selector. + */ + public java.lang.String getSelector() { + java.lang.Object ref = selector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + public com.google.protobuf.ByteString getSelectorBytes() { + java.lang.Object ref = selector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @param value The selector to set. + * @return This builder for chaining. + */ + public Builder setSelector(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @return This builder for chaining. + */ + public Builder clearSelector() { + selector_ = getDefaultInstance().getSelector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Selects the methods to which this rule applies.
+     *
+     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+     * details.
+     * 
+ * + * string selector = 1; + * + * @param value The bytes for selector to set. + * @return This builder for chaining. + */ + public Builder setSelectorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField metricCosts_; + + private com.google.protobuf.MapField + internalGetMetricCosts() { + if (metricCosts_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetricCostsDefaultEntryHolder.defaultEntry); + } + return metricCosts_; + } + + private com.google.protobuf.MapField + internalGetMutableMetricCosts() { + if (metricCosts_ == null) { + metricCosts_ = + com.google.protobuf.MapField.newMapField(MetricCostsDefaultEntryHolder.defaultEntry); + } + if (!metricCosts_.isMutable()) { + metricCosts_ = metricCosts_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return metricCosts_; + } + + public int getMetricCostsCount() { + return internalGetMetricCosts().getMap().size(); + } + /** + * + * + *
+     * Metrics to update when the selected methods are called, and the associated
+     * cost applied to each metric.
+     *
+     * The key of the map is the metric name, and the values are the amount
+     * increased for the metric against which the quota limits are defined.
+     * The value must not be negative.
+     * 
+ * + * map<string, int64> metric_costs = 2; + */ + @java.lang.Override + public boolean containsMetricCosts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetMetricCosts().getMap().containsKey(key); + } + /** Use {@link #getMetricCostsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetricCosts() { + return getMetricCostsMap(); + } + /** + * + * + *
+     * Metrics to update when the selected methods are called, and the associated
+     * cost applied to each metric.
+     *
+     * The key of the map is the metric name, and the values are the amount
+     * increased for the metric against which the quota limits are defined.
+     * The value must not be negative.
+     * 
+ * + * map<string, int64> metric_costs = 2; + */ + @java.lang.Override + public java.util.Map getMetricCostsMap() { + return internalGetMetricCosts().getMap(); + } + /** + * + * + *
+     * Metrics to update when the selected methods are called, and the associated
+     * cost applied to each metric.
+     *
+     * The key of the map is the metric name, and the values are the amount
+     * increased for the metric against which the quota limits are defined.
+     * The value must not be negative.
+     * 
+ * + * map<string, int64> metric_costs = 2; + */ + @java.lang.Override + public long getMetricCostsOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetricCosts().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Metrics to update when the selected methods are called, and the associated
+     * cost applied to each metric.
+     *
+     * The key of the map is the metric name, and the values are the amount
+     * increased for the metric against which the quota limits are defined.
+     * The value must not be negative.
+     * 
+ * + * map<string, int64> metric_costs = 2; + */ + @java.lang.Override + public long getMetricCostsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetMetricCosts().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetricCosts() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableMetricCosts().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Metrics to update when the selected methods are called, and the associated
+     * cost applied to each metric.
+     *
+     * The key of the map is the metric name, and the values are the amount
+     * increased for the metric against which the quota limits are defined.
+     * The value must not be negative.
+     * 
+ * + * map<string, int64> metric_costs = 2; + */ + public Builder removeMetricCosts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableMetricCosts().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableMetricCosts() { + bitField0_ |= 0x00000002; + return internalGetMutableMetricCosts().getMutableMap(); + } + /** + * + * + *
+     * Metrics to update when the selected methods are called, and the associated
+     * cost applied to each metric.
+     *
+     * The key of the map is the metric name, and the values are the amount
+     * increased for the metric against which the quota limits are defined.
+     * The value must not be negative.
+     * 
+ * + * map<string, int64> metric_costs = 2; + */ + public Builder putMetricCosts(java.lang.String key, long value) { + if (key == null) { + throw new NullPointerException("map key"); + } + + internalGetMutableMetricCosts().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * Metrics to update when the selected methods are called, and the associated
+     * cost applied to each metric.
+     *
+     * The key of the map is the metric name, and the values are the amount
+     * increased for the metric against which the quota limits are defined.
+     * The value must not be negative.
+     * 
+ * + * map<string, int64> metric_costs = 2; + */ + public Builder putAllMetricCosts(java.util.Map values) { + internalGetMutableMetricCosts().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.MetricRule) + } + + // @@protoc_insertion_point(class_scope:google.api.MetricRule) + private static final com.google.api.MetricRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.MetricRule(); + } + + public static com.google.api.MetricRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricRule 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.api.MetricRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricRuleOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricRuleOrBuilder.java new file mode 100644 index 000000000000..880a1bf5cdae --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MetricRuleOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/quota.proto + +package com.google.api; + +public interface MetricRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.MetricRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The selector. + */ + java.lang.String getSelector(); + /** + * + * + *
+   * Selects the methods to which this rule applies.
+   *
+   * Refer to [selector][google.api.DocumentationRule.selector] for syntax
+   * details.
+   * 
+ * + * string selector = 1; + * + * @return The bytes for selector. + */ + com.google.protobuf.ByteString getSelectorBytes(); + + /** + * + * + *
+   * Metrics to update when the selected methods are called, and the associated
+   * cost applied to each metric.
+   *
+   * The key of the map is the metric name, and the values are the amount
+   * increased for the metric against which the quota limits are defined.
+   * The value must not be negative.
+   * 
+ * + * map<string, int64> metric_costs = 2; + */ + int getMetricCostsCount(); + /** + * + * + *
+   * Metrics to update when the selected methods are called, and the associated
+   * cost applied to each metric.
+   *
+   * The key of the map is the metric name, and the values are the amount
+   * increased for the metric against which the quota limits are defined.
+   * The value must not be negative.
+   * 
+ * + * map<string, int64> metric_costs = 2; + */ + boolean containsMetricCosts(java.lang.String key); + /** Use {@link #getMetricCostsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getMetricCosts(); + /** + * + * + *
+   * Metrics to update when the selected methods are called, and the associated
+   * cost applied to each metric.
+   *
+   * The key of the map is the metric name, and the values are the amount
+   * increased for the metric against which the quota limits are defined.
+   * The value must not be negative.
+   * 
+ * + * map<string, int64> metric_costs = 2; + */ + java.util.Map getMetricCostsMap(); + /** + * + * + *
+   * Metrics to update when the selected methods are called, and the associated
+   * cost applied to each metric.
+   *
+   * The key of the map is the metric name, and the values are the amount
+   * increased for the metric against which the quota limits are defined.
+   * The value must not be negative.
+   * 
+ * + * map<string, int64> metric_costs = 2; + */ + long getMetricCostsOrDefault(java.lang.String key, long defaultValue); + /** + * + * + *
+   * Metrics to update when the selected methods are called, and the associated
+   * cost applied to each metric.
+   *
+   * The key of the map is the metric name, and the values are the amount
+   * increased for the metric against which the quota limits are defined.
+   * The value must not be negative.
+   * 
+ * + * map<string, int64> metric_costs = 2; + */ + long getMetricCostsOrThrow(java.lang.String key); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResource.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResource.java new file mode 100644 index 000000000000..95c19c0ec9d4 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResource.java @@ -0,0 +1,1045 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +/** + * + * + *
+ * An object representing a resource that can be used for monitoring, logging,
+ * billing, or other purposes. Examples include virtual machine instances,
+ * databases, and storage devices such as disks. The `type` field identifies a
+ * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object
+ * that describes the resource's schema. Information in the `labels` field
+ * identifies the actual resource and its attributes according to the schema.
+ * For example, a particular Compute Engine VM instance could be represented by
+ * the following object, because the
+ * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for
+ * `"gce_instance"` has labels
+ * `"project_id"`, `"instance_id"` and `"zone"`:
+ *
+ *     { "type": "gce_instance",
+ *       "labels": { "project_id": "my-project",
+ *                   "instance_id": "12345678901234",
+ *                   "zone": "us-central1-a" }}
+ * 
+ * + * Protobuf type {@code google.api.MonitoredResource} + */ +public final class MonitoredResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.MonitoredResource) + MonitoredResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use MonitoredResource.newBuilder() to construct. + private MonitoredResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MonitoredResource() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MonitoredResource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MonitoredResource.class, com.google.api.MonitoredResource.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+   * Required. The monitored resource type. This field must match
+   * the `type` field of a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+   * object. For example, the type of a Compute Engine VM instance is
+   * `gce_instance`. Some descriptors include the service name in the type; for
+   * example, the type of a Datastream stream is
+   * `datastream.googleapis.com/Stream`.
+   * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The monitored resource type. This field must match
+   * the `type` field of a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+   * object. For example, the type of a Compute Engine VM instance is
+   * `gce_instance`. Some descriptors include the service name in the type; for
+   * example, the type of a Datastream stream is
+   * `datastream.googleapis.com/Stream`.
+   * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 2; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResource_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(); + } + /** + * + * + *
+   * Required. Values for all of the labels listed in the associated monitored
+   * resource descriptor. For example, Compute Engine VM instances use the
+   * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+   * 
+ * + * map<string, string> labels = 2; + */ + @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(); + } + /** + * + * + *
+   * Required. Values for all of the labels listed in the associated monitored
+   * resource descriptor. For example, Compute Engine VM instances use the
+   * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Required. Values for all of the labels listed in the associated monitored
+   * resource descriptor. For example, Compute Engine VM instances use the
+   * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+   * 
+ * + * map<string, string> labels = 2; + */ + @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; + } + /** + * + * + *
+   * Required. Values for all of the labels listed in the associated monitored
+   * resource descriptor. For example, Compute Engine VM instances use the
+   * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+   * 
+ * + * map<string, string> labels = 2; + */ + @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); + } + + 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(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); + 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(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + 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(2, labels__); + } + 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.api.MonitoredResource)) { + return super.equals(obj); + } + com.google.api.MonitoredResource other = (com.google.api.MonitoredResource) obj; + + if (!getType().equals(other.getType())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.MonitoredResource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MonitoredResource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MonitoredResource parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MonitoredResource 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.api.MonitoredResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MonitoredResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MonitoredResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MonitoredResource 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.api.MonitoredResource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.MonitoredResource 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.api.MonitoredResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MonitoredResource 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.api.MonitoredResource 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 object representing a resource that can be used for monitoring, logging,
+   * billing, or other purposes. Examples include virtual machine instances,
+   * databases, and storage devices such as disks. The `type` field identifies a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object
+   * that describes the resource's schema. Information in the `labels` field
+   * identifies the actual resource and its attributes according to the schema.
+   * For example, a particular Compute Engine VM instance could be represented by
+   * the following object, because the
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for
+   * `"gce_instance"` has labels
+   * `"project_id"`, `"instance_id"` and `"zone"`:
+   *
+   *     { "type": "gce_instance",
+   *       "labels": { "project_id": "my-project",
+   *                   "instance_id": "12345678901234",
+   *                   "zone": "us-central1-a" }}
+   * 
+ * + * Protobuf type {@code google.api.MonitoredResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.MonitoredResource) + com.google.api.MonitoredResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MonitoredResource.class, + com.google.api.MonitoredResource.Builder.class); + } + + // Construct using com.google.api.MonitoredResource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResource_descriptor; + } + + @java.lang.Override + public com.google.api.MonitoredResource getDefaultInstanceForType() { + return com.google.api.MonitoredResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.MonitoredResource build() { + com.google.api.MonitoredResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.MonitoredResource buildPartial() { + com.google.api.MonitoredResource result = new com.google.api.MonitoredResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.MonitoredResource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MonitoredResource) { + return mergeFrom((com.google.api.MonitoredResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MonitoredResource other) { + if (other == com.google.api.MonitoredResource.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * Required. The monitored resource type. This field must match
+     * the `type` field of a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+     * object. For example, the type of a Compute Engine VM instance is
+     * `gce_instance`. Some descriptors include the service name in the type; for
+     * example, the type of a Datastream stream is
+     * `datastream.googleapis.com/Stream`.
+     * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The monitored resource type. This field must match
+     * the `type` field of a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+     * object. For example, the type of a Compute Engine VM instance is
+     * `gce_instance`. Some descriptors include the service name in the type; for
+     * example, the type of a Datastream stream is
+     * `datastream.googleapis.com/Stream`.
+     * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The monitored resource type. This field must match
+     * the `type` field of a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+     * object. For example, the type of a Compute Engine VM instance is
+     * `gce_instance`. Some descriptors include the service name in the type; for
+     * example, the type of a Datastream stream is
+     * `datastream.googleapis.com/Stream`.
+     * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The monitored resource type. This field must match
+     * the `type` field of a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+     * object. For example, the type of a Compute Engine VM instance is
+     * `gce_instance`. Some descriptors include the service name in the type; for
+     * example, the type of a Datastream stream is
+     * `datastream.googleapis.com/Stream`.
+     * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The monitored resource type. This field must match
+     * the `type` field of a
+     * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+     * object. For example, the type of a Compute Engine VM instance is
+     * `gce_instance`. Some descriptors include the service name in the type; for
+     * example, the type of a Datastream stream is
+     * `datastream.googleapis.com/Stream`.
+     * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + 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_ |= 0x00000002; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Required. Values for all of the labels listed in the associated monitored
+     * resource descriptor. For example, Compute Engine VM instances use the
+     * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+     * 
+ * + * map<string, string> labels = 2; + */ + @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(); + } + /** + * + * + *
+     * Required. Values for all of the labels listed in the associated monitored
+     * resource descriptor. For example, Compute Engine VM instances use the
+     * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Required. Values for all of the labels listed in the associated monitored
+     * resource descriptor. For example, Compute Engine VM instances use the
+     * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+     * 
+ * + * map<string, string> labels = 2; + */ + @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; + } + /** + * + * + *
+     * Required. Values for all of the labels listed in the associated monitored
+     * resource descriptor. For example, Compute Engine VM instances use the
+     * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+     * 
+ * + * map<string, string> labels = 2; + */ + @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_ & ~0x00000002); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Required. Values for all of the labels listed in the associated monitored
+     * resource descriptor. For example, Compute Engine VM instances use the
+     * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+     * 
+ * + * map<string, string> labels = 2; + */ + 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_ |= 0x00000002; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Required. Values for all of the labels listed in the associated monitored
+     * resource descriptor. For example, Compute Engine VM instances use the
+     * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+     * 
+ * + * map<string, string> labels = 2; + */ + 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_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * Required. Values for all of the labels listed in the associated monitored
+     * resource descriptor. For example, Compute Engine VM instances use the
+     * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.MonitoredResource) + } + + // @@protoc_insertion_point(class_scope:google.api.MonitoredResource) + private static final com.google.api.MonitoredResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.MonitoredResource(); + } + + public static com.google.api.MonitoredResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MonitoredResource 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.api.MonitoredResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceDescriptor.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceDescriptor.java new file mode 100644 index 000000000000..5c5856fad0fa --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceDescriptor.java @@ -0,0 +1,1965 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +/** + * + * + *
+ * An object that describes the schema of a
+ * [MonitoredResource][google.api.MonitoredResource] object using a type name
+ * and a set of labels.  For example, the monitored resource descriptor for
+ * Google Compute Engine VM instances has a type of
+ * `"gce_instance"` and specifies the use of the labels `"instance_id"` and
+ * `"zone"` to identify particular VM instances.
+ *
+ * Different APIs can support different monitored resource types. APIs generally
+ * provide a `list` method that returns the monitored resource descriptors used
+ * by the API.
+ * 
+ * + * Protobuf type {@code google.api.MonitoredResourceDescriptor} + */ +public final class MonitoredResourceDescriptor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.MonitoredResourceDescriptor) + MonitoredResourceDescriptorOrBuilder { + private static final long serialVersionUID = 0L; + // Use MonitoredResourceDescriptor.newBuilder() to construct. + private MonitoredResourceDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MonitoredResourceDescriptor() { + name_ = ""; + type_ = ""; + displayName_ = ""; + description_ = ""; + labels_ = java.util.Collections.emptyList(); + launchStage_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MonitoredResourceDescriptor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MonitoredResourceDescriptor.class, + com.google.api.MonitoredResourceDescriptor.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Optional. The resource name of the monitored resource descriptor:
+   * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+   * {type} is the value of the `type` field in this object and
+   * {project_id} is a project ID that provides API-specific context for
+   * accessing the type.  APIs that do not use project information can use the
+   * resource name format `"monitoredResourceDescriptors/{type}"`.
+   * 
+ * + * string name = 5; + * + * @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; + } + } + /** + * + * + *
+   * Optional. The resource name of the monitored resource descriptor:
+   * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+   * {type} is the value of the `type` field in this object and
+   * {project_id} is a project ID that provides API-specific context for
+   * accessing the type.  APIs that do not use project information can use the
+   * resource name format `"monitoredResourceDescriptors/{type}"`.
+   * 
+ * + * string name = 5; + * + * @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 TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+   * Required. The monitored resource type. For example, the type
+   * `"cloudsql_database"` represents databases in Google Cloud SQL.
+   *  For a list of types, see [Monitoring resource
+   *  types](https://cloud.google.com/monitoring/api/resources)
+   * and [Logging resource
+   * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+   * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The monitored resource type. For example, the type
+   * `"cloudsql_database"` represents databases in Google Cloud SQL.
+   *  For a list of types, see [Monitoring resource
+   *  types](https://cloud.google.com/monitoring/api/resources)
+   * and [Logging resource
+   * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+   * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = 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. A concise name for the monitored resource type that might be
+   * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+   * without any article or other determiners. For example,
+   * `"Google Cloud SQL Database"`.
+   * 
+ * + * string display_name = 2; + * + * @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. A concise name for the monitored resource type that might be
+   * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+   * without any article or other determiners. For example,
+   * `"Google Cloud SQL Database"`.
+   * 
+ * + * string display_name = 2; + * + * @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 = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. A detailed description of the monitored resource type that might
+   * be used in documentation.
+   * 
+ * + * string description = 3; + * + * @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. A detailed description of the monitored resource type that might
+   * be used in documentation.
+   * 
+ * + * string description = 3; + * + * @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 LABELS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List labels_; + /** + * + * + *
+   * Required. A set of labels used to describe instances of this monitored
+   * resource type. For example, an individual Google Cloud SQL database is
+   * identified by values for the labels `"database_id"` and `"zone"`.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + @java.lang.Override + public java.util.List getLabelsList() { + return labels_; + } + /** + * + * + *
+   * Required. A set of labels used to describe instances of this monitored
+   * resource type. For example, an individual Google Cloud SQL database is
+   * identified by values for the labels `"database_id"` and `"zone"`.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + @java.lang.Override + public java.util.List + getLabelsOrBuilderList() { + return labels_; + } + /** + * + * + *
+   * Required. A set of labels used to describe instances of this monitored
+   * resource type. For example, an individual Google Cloud SQL database is
+   * identified by values for the labels `"database_id"` and `"zone"`.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + @java.lang.Override + public int getLabelsCount() { + return labels_.size(); + } + /** + * + * + *
+   * Required. A set of labels used to describe instances of this monitored
+   * resource type. For example, an individual Google Cloud SQL database is
+   * identified by values for the labels `"database_id"` and `"zone"`.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + @java.lang.Override + public com.google.api.LabelDescriptor getLabels(int index) { + return labels_.get(index); + } + /** + * + * + *
+   * Required. A set of labels used to describe instances of this monitored
+   * resource type. For example, an individual Google Cloud SQL database is
+   * identified by values for the labels `"database_id"` and `"zone"`.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + @java.lang.Override + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder(int index) { + return labels_.get(index); + } + + public static final int LAUNCH_STAGE_FIELD_NUMBER = 7; + private int launchStage_ = 0; + /** + * + * + *
+   * Optional. The launch stage of the monitored resource definition.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 7; + * + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Override + public int getLaunchStageValue() { + return launchStage_; + } + /** + * + * + *
+   * Optional. The launch stage of the monitored resource definition.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 7; + * + * @return The launchStage. + */ + @java.lang.Override + public com.google.api.LaunchStage getLaunchStage() { + com.google.api.LaunchStage result = com.google.api.LaunchStage.forNumber(launchStage_); + return result == null ? com.google.api.LaunchStage.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(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < labels_.size(); i++) { + output.writeMessage(4, labels_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_); + } + if (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, launchStage_); + } + 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(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (int i = 0; i < labels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_); + } + if (launchStage_ != com.google.api.LaunchStage.LAUNCH_STAGE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, launchStage_); + } + 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.api.MonitoredResourceDescriptor)) { + return super.equals(obj); + } + com.google.api.MonitoredResourceDescriptor other = + (com.google.api.MonitoredResourceDescriptor) obj; + + if (!getName().equals(other.getName())) return false; + if (!getType().equals(other.getType())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getLabelsList().equals(other.getLabelsList())) return false; + if (launchStage_ != other.launchStage_) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().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 (getLabelsCount() > 0) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + getLabelsList().hashCode(); + } + hash = (37 * hash) + LAUNCH_STAGE_FIELD_NUMBER; + hash = (53 * hash) + launchStage_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.MonitoredResourceDescriptor parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MonitoredResourceDescriptor parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MonitoredResourceDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MonitoredResourceDescriptor 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.api.MonitoredResourceDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MonitoredResourceDescriptor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MonitoredResourceDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MonitoredResourceDescriptor 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.api.MonitoredResourceDescriptor parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.MonitoredResourceDescriptor 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.api.MonitoredResourceDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MonitoredResourceDescriptor 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.api.MonitoredResourceDescriptor 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 object that describes the schema of a
+   * [MonitoredResource][google.api.MonitoredResource] object using a type name
+   * and a set of labels.  For example, the monitored resource descriptor for
+   * Google Compute Engine VM instances has a type of
+   * `"gce_instance"` and specifies the use of the labels `"instance_id"` and
+   * `"zone"` to identify particular VM instances.
+   *
+   * Different APIs can support different monitored resource types. APIs generally
+   * provide a `list` method that returns the monitored resource descriptors used
+   * by the API.
+   * 
+ * + * Protobuf type {@code google.api.MonitoredResourceDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.MonitoredResourceDescriptor) + com.google.api.MonitoredResourceDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MonitoredResourceDescriptor.class, + com.google.api.MonitoredResourceDescriptor.Builder.class); + } + + // Construct using com.google.api.MonitoredResourceDescriptor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = ""; + displayName_ = ""; + description_ = ""; + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + } else { + labels_ = null; + labelsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + launchStage_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceDescriptor_descriptor; + } + + @java.lang.Override + public com.google.api.MonitoredResourceDescriptor getDefaultInstanceForType() { + return com.google.api.MonitoredResourceDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.MonitoredResourceDescriptor build() { + com.google.api.MonitoredResourceDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.MonitoredResourceDescriptor buildPartial() { + com.google.api.MonitoredResourceDescriptor result = + new com.google.api.MonitoredResourceDescriptor(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.MonitoredResourceDescriptor result) { + if (labelsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + labels_ = java.util.Collections.unmodifiableList(labels_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.labels_ = labels_; + } else { + result.labels_ = labelsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.MonitoredResourceDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.launchStage_ = launchStage_; + } + } + + @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.api.MonitoredResourceDescriptor) { + return mergeFrom((com.google.api.MonitoredResourceDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MonitoredResourceDescriptor other) { + if (other == com.google.api.MonitoredResourceDescriptor.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (labelsBuilder_ == null) { + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } + } else { + if (!other.labels_.isEmpty()) { + if (labelsBuilder_.isEmpty()) { + labelsBuilder_.dispose(); + labelsBuilder_ = null; + labels_ = other.labels_; + bitField0_ = (bitField0_ & ~0x00000010); + labelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLabelsFieldBuilder() + : null; + } else { + labelsBuilder_.addAllMessages(other.labels_); + } + } + } + if (other.launchStage_ != 0) { + setLaunchStageValue(other.getLaunchStageValue()); + } + 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: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + com.google.api.LabelDescriptor m = + input.readMessage(com.google.api.LabelDescriptor.parser(), extensionRegistry); + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(m); + } else { + labelsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 42 + case 56: + { + launchStage_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // 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_ = ""; + /** + * + * + *
+     * Optional. The resource name of the monitored resource descriptor:
+     * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+     * {type} is the value of the `type` field in this object and
+     * {project_id} is a project ID that provides API-specific context for
+     * accessing the type.  APIs that do not use project information can use the
+     * resource name format `"monitoredResourceDescriptors/{type}"`.
+     * 
+ * + * string name = 5; + * + * @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; + } + } + /** + * + * + *
+     * Optional. The resource name of the monitored resource descriptor:
+     * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+     * {type} is the value of the `type` field in this object and
+     * {project_id} is a project ID that provides API-specific context for
+     * accessing the type.  APIs that do not use project information can use the
+     * resource name format `"monitoredResourceDescriptors/{type}"`.
+     * 
+ * + * string name = 5; + * + * @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; + } + } + /** + * + * + *
+     * Optional. The resource name of the monitored resource descriptor:
+     * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+     * {type} is the value of the `type` field in this object and
+     * {project_id} is a project ID that provides API-specific context for
+     * accessing the type.  APIs that do not use project information can use the
+     * resource name format `"monitoredResourceDescriptors/{type}"`.
+     * 
+ * + * string name = 5; + * + * @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; + } + /** + * + * + *
+     * Optional. The resource name of the monitored resource descriptor:
+     * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+     * {type} is the value of the `type` field in this object and
+     * {project_id} is a project ID that provides API-specific context for
+     * accessing the type.  APIs that do not use project information can use the
+     * resource name format `"monitoredResourceDescriptors/{type}"`.
+     * 
+ * + * string name = 5; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The resource name of the monitored resource descriptor:
+     * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+     * {type} is the value of the `type` field in this object and
+     * {project_id} is a project ID that provides API-specific context for
+     * accessing the type.  APIs that do not use project information can use the
+     * resource name format `"monitoredResourceDescriptors/{type}"`.
+     * 
+ * + * string name = 5; + * + * @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 type_ = ""; + /** + * + * + *
+     * Required. The monitored resource type. For example, the type
+     * `"cloudsql_database"` represents databases in Google Cloud SQL.
+     *  For a list of types, see [Monitoring resource
+     *  types](https://cloud.google.com/monitoring/api/resources)
+     * and [Logging resource
+     * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+     * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The monitored resource type. For example, the type
+     * `"cloudsql_database"` represents databases in Google Cloud SQL.
+     *  For a list of types, see [Monitoring resource
+     *  types](https://cloud.google.com/monitoring/api/resources)
+     * and [Logging resource
+     * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+     * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The monitored resource type. For example, the type
+     * `"cloudsql_database"` represents databases in Google Cloud SQL.
+     *  For a list of types, see [Monitoring resource
+     *  types](https://cloud.google.com/monitoring/api/resources)
+     * and [Logging resource
+     * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+     * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The monitored resource type. For example, the type
+     * `"cloudsql_database"` represents databases in Google Cloud SQL.
+     *  For a list of types, see [Monitoring resource
+     *  types](https://cloud.google.com/monitoring/api/resources)
+     * and [Logging resource
+     * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+     * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The monitored resource type. For example, the type
+     * `"cloudsql_database"` represents databases in Google Cloud SQL.
+     *  For a list of types, see [Monitoring resource
+     *  types](https://cloud.google.com/monitoring/api/resources)
+     * and [Logging resource
+     * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+     * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. A concise name for the monitored resource type that might be
+     * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+     * without any article or other determiners. For example,
+     * `"Google Cloud SQL Database"`.
+     * 
+ * + * string display_name = 2; + * + * @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. A concise name for the monitored resource type that might be
+     * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+     * without any article or other determiners. For example,
+     * `"Google Cloud SQL Database"`.
+     * 
+ * + * string display_name = 2; + * + * @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. A concise name for the monitored resource type that might be
+     * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+     * without any article or other determiners. For example,
+     * `"Google Cloud SQL Database"`.
+     * 
+ * + * string display_name = 2; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A concise name for the monitored resource type that might be
+     * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+     * without any article or other determiners. For example,
+     * `"Google Cloud SQL Database"`.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A concise name for the monitored resource type that might be
+     * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+     * without any article or other determiners. For example,
+     * `"Google Cloud SQL Database"`.
+     * 
+ * + * string display_name = 2; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. A detailed description of the monitored resource type that might
+     * be used in documentation.
+     * 
+ * + * string description = 3; + * + * @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. A detailed description of the monitored resource type that might
+     * be used in documentation.
+     * 
+ * + * string description = 3; + * + * @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. A detailed description of the monitored resource type that might
+     * be used in documentation.
+     * 
+ * + * string description = 3; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A detailed description of the monitored resource type that might
+     * be used in documentation.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A detailed description of the monitored resource type that might
+     * be used in documentation.
+     * 
+ * + * string description = 3; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List labels_ = + java.util.Collections.emptyList(); + + private void ensureLabelsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + labels_ = new java.util.ArrayList(labels_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.LabelDescriptor, + com.google.api.LabelDescriptor.Builder, + com.google.api.LabelDescriptorOrBuilder> + labelsBuilder_; + + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public java.util.List getLabelsList() { + if (labelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(labels_); + } else { + return labelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public int getLabelsCount() { + if (labelsBuilder_ == null) { + return labels_.size(); + } else { + return labelsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public com.google.api.LabelDescriptor getLabels(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public Builder setLabels(int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + onChanged(); + } else { + labelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public Builder setLabels(int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.set(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public Builder addLabels(com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + onChanged(); + } else { + labelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public Builder addLabels(int index, com.google.api.LabelDescriptor value) { + if (labelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(index, value); + onChanged(); + } else { + labelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public Builder addLabels(com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public Builder addLabels(int index, com.google.api.LabelDescriptor.Builder builderForValue) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.add(index, builderForValue.build()); + onChanged(); + } else { + labelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public Builder addAllLabels( + java.lang.Iterable values) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labels_); + onChanged(); + } else { + labelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public Builder clearLabels() { + if (labelsBuilder_ == null) { + labels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + labelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public Builder removeLabels(int index) { + if (labelsBuilder_ == null) { + ensureLabelsIsMutable(); + labels_.remove(index); + onChanged(); + } else { + labelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public com.google.api.LabelDescriptor.Builder getLabelsBuilder(int index) { + return getLabelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder(int index) { + if (labelsBuilder_ == null) { + return labels_.get(index); + } else { + return labelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public java.util.List + getLabelsOrBuilderList() { + if (labelsBuilder_ != null) { + return labelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(labels_); + } + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder() { + return getLabelsFieldBuilder() + .addBuilder(com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public com.google.api.LabelDescriptor.Builder addLabelsBuilder(int index) { + return getLabelsFieldBuilder() + .addBuilder(index, com.google.api.LabelDescriptor.getDefaultInstance()); + } + /** + * + * + *
+     * Required. A set of labels used to describe instances of this monitored
+     * resource type. For example, an individual Google Cloud SQL database is
+     * identified by values for the labels `"database_id"` and `"zone"`.
+     * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + public java.util.List getLabelsBuilderList() { + return getLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.LabelDescriptor, + com.google.api.LabelDescriptor.Builder, + com.google.api.LabelDescriptorOrBuilder> + getLabelsFieldBuilder() { + if (labelsBuilder_ == null) { + labelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.LabelDescriptor, + com.google.api.LabelDescriptor.Builder, + com.google.api.LabelDescriptorOrBuilder>( + labels_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + labels_ = null; + } + return labelsBuilder_; + } + + private int launchStage_ = 0; + /** + * + * + *
+     * Optional. The launch stage of the monitored resource definition.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 7; + * + * @return The enum numeric value on the wire for launchStage. + */ + @java.lang.Override + public int getLaunchStageValue() { + return launchStage_; + } + /** + * + * + *
+     * Optional. The launch stage of the monitored resource definition.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 7; + * + * @param value The enum numeric value on the wire for launchStage to set. + * @return This builder for chaining. + */ + public Builder setLaunchStageValue(int value) { + launchStage_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The launch stage of the monitored resource definition.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 7; + * + * @return The launchStage. + */ + @java.lang.Override + public com.google.api.LaunchStage getLaunchStage() { + com.google.api.LaunchStage result = com.google.api.LaunchStage.forNumber(launchStage_); + return result == null ? com.google.api.LaunchStage.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. The launch stage of the monitored resource definition.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 7; + * + * @param value The launchStage to set. + * @return This builder for chaining. + */ + public Builder setLaunchStage(com.google.api.LaunchStage value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + launchStage_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The launch stage of the monitored resource definition.
+     * 
+ * + * .google.api.LaunchStage launch_stage = 7; + * + * @return This builder for chaining. + */ + public Builder clearLaunchStage() { + bitField0_ = (bitField0_ & ~0x00000020); + launchStage_ = 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.api.MonitoredResourceDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.api.MonitoredResourceDescriptor) + private static final com.google.api.MonitoredResourceDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.MonitoredResourceDescriptor(); + } + + public static com.google.api.MonitoredResourceDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MonitoredResourceDescriptor 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.api.MonitoredResourceDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java new file mode 100644 index 000000000000..784a54882b46 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceDescriptorOrBuilder.java @@ -0,0 +1,239 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +public interface MonitoredResourceDescriptorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.MonitoredResourceDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The resource name of the monitored resource descriptor:
+   * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+   * {type} is the value of the `type` field in this object and
+   * {project_id} is a project ID that provides API-specific context for
+   * accessing the type.  APIs that do not use project information can use the
+   * resource name format `"monitoredResourceDescriptors/{type}"`.
+   * 
+ * + * string name = 5; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Optional. The resource name of the monitored resource descriptor:
+   * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
+   * {type} is the value of the `type` field in this object and
+   * {project_id} is a project ID that provides API-specific context for
+   * accessing the type.  APIs that do not use project information can use the
+   * resource name format `"monitoredResourceDescriptors/{type}"`.
+   * 
+ * + * string name = 5; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The monitored resource type. For example, the type
+   * `"cloudsql_database"` represents databases in Google Cloud SQL.
+   *  For a list of types, see [Monitoring resource
+   *  types](https://cloud.google.com/monitoring/api/resources)
+   * and [Logging resource
+   * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+   * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * Required. The monitored resource type. For example, the type
+   * `"cloudsql_database"` represents databases in Google Cloud SQL.
+   *  For a list of types, see [Monitoring resource
+   *  types](https://cloud.google.com/monitoring/api/resources)
+   * and [Logging resource
+   * types](https://cloud.google.com/logging/docs/api/v2/resource-list).
+   * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * Optional. A concise name for the monitored resource type that might be
+   * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+   * without any article or other determiners. For example,
+   * `"Google Cloud SQL Database"`.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. A concise name for the monitored resource type that might be
+   * displayed in user interfaces. It should be a Title Cased Noun Phrase,
+   * without any article or other determiners. For example,
+   * `"Google Cloud SQL Database"`.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. A detailed description of the monitored resource type that might
+   * be used in documentation.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. A detailed description of the monitored resource type that might
+   * be used in documentation.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. A set of labels used to describe instances of this monitored
+   * resource type. For example, an individual Google Cloud SQL database is
+   * identified by values for the labels `"database_id"` and `"zone"`.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + java.util.List getLabelsList(); + /** + * + * + *
+   * Required. A set of labels used to describe instances of this monitored
+   * resource type. For example, an individual Google Cloud SQL database is
+   * identified by values for the labels `"database_id"` and `"zone"`.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + com.google.api.LabelDescriptor getLabels(int index); + /** + * + * + *
+   * Required. A set of labels used to describe instances of this monitored
+   * resource type. For example, an individual Google Cloud SQL database is
+   * identified by values for the labels `"database_id"` and `"zone"`.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Required. A set of labels used to describe instances of this monitored
+   * resource type. For example, an individual Google Cloud SQL database is
+   * identified by values for the labels `"database_id"` and `"zone"`.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + java.util.List getLabelsOrBuilderList(); + /** + * + * + *
+   * Required. A set of labels used to describe instances of this monitored
+   * resource type. For example, an individual Google Cloud SQL database is
+   * identified by values for the labels `"database_id"` and `"zone"`.
+   * 
+ * + * repeated .google.api.LabelDescriptor labels = 4; + */ + com.google.api.LabelDescriptorOrBuilder getLabelsOrBuilder(int index); + + /** + * + * + *
+   * Optional. The launch stage of the monitored resource definition.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 7; + * + * @return The enum numeric value on the wire for launchStage. + */ + int getLaunchStageValue(); + /** + * + * + *
+   * Optional. The launch stage of the monitored resource definition.
+   * 
+ * + * .google.api.LaunchStage launch_stage = 7; + * + * @return The launchStage. + */ + com.google.api.LaunchStage getLaunchStage(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceMetadata.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceMetadata.java new file mode 100644 index 000000000000..340ea2a096e2 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceMetadata.java @@ -0,0 +1,1153 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +/** + * + * + *
+ * Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource]
+ * object. [MonitoredResource][google.api.MonitoredResource] objects contain the
+ * minimum set of information to uniquely identify a monitored resource
+ * instance. There is some other useful auxiliary metadata. Monitoring and
+ * Logging use an ingestion pipeline to extract metadata for cloud resources of
+ * all types, and store the metadata in this message.
+ * 
+ * + * Protobuf type {@code google.api.MonitoredResourceMetadata} + */ +public final class MonitoredResourceMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.MonitoredResourceMetadata) + MonitoredResourceMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use MonitoredResourceMetadata.newBuilder() to construct. + private MonitoredResourceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MonitoredResourceMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MonitoredResourceMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MonitoredResourceMetadata.class, + com.google.api.MonitoredResourceMetadata.Builder.class); + } + + public static final int SYSTEM_LABELS_FIELD_NUMBER = 1; + private com.google.protobuf.Struct systemLabels_; + /** + * + * + *
+   * Output only. Values for predefined system metadata labels.
+   * System labels are a kind of metadata extracted by Google, including
+   * "machine_image", "vpc", "subnet_id",
+   * "security_group", "name", etc.
+   * System label values can be only strings, Boolean values, or a list of
+   * strings. For example:
+   *
+   *     { "name": "my-test-instance",
+   *       "security_group": ["a", "b", "c"],
+   *       "spot_instance": false }
+   * 
+ * + * .google.protobuf.Struct system_labels = 1; + * + * @return Whether the systemLabels field is set. + */ + @java.lang.Override + public boolean hasSystemLabels() { + return systemLabels_ != null; + } + /** + * + * + *
+   * Output only. Values for predefined system metadata labels.
+   * System labels are a kind of metadata extracted by Google, including
+   * "machine_image", "vpc", "subnet_id",
+   * "security_group", "name", etc.
+   * System label values can be only strings, Boolean values, or a list of
+   * strings. For example:
+   *
+   *     { "name": "my-test-instance",
+   *       "security_group": ["a", "b", "c"],
+   *       "spot_instance": false }
+   * 
+ * + * .google.protobuf.Struct system_labels = 1; + * + * @return The systemLabels. + */ + @java.lang.Override + public com.google.protobuf.Struct getSystemLabels() { + return systemLabels_ == null ? com.google.protobuf.Struct.getDefaultInstance() : systemLabels_; + } + /** + * + * + *
+   * Output only. Values for predefined system metadata labels.
+   * System labels are a kind of metadata extracted by Google, including
+   * "machine_image", "vpc", "subnet_id",
+   * "security_group", "name", etc.
+   * System label values can be only strings, Boolean values, or a list of
+   * strings. For example:
+   *
+   *     { "name": "my-test-instance",
+   *       "security_group": ["a", "b", "c"],
+   *       "spot_instance": false }
+   * 
+ * + * .google.protobuf.Struct system_labels = 1; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getSystemLabelsOrBuilder() { + return systemLabels_ == null ? com.google.protobuf.Struct.getDefaultInstance() : systemLabels_; + } + + public static final int USER_LABELS_FIELD_NUMBER = 2; + + private static final class UserLabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceMetadata_UserLabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + /** + * + * + *
+   * Output only. A map of user-defined metadata labels.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetUserLabels().getMap().containsKey(key); + } + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + /** + * + * + *
+   * Output only. A map of user-defined metadata labels.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + /** + * + * + *
+   * Output only. A map of user-defined metadata labels.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. A map of user-defined metadata labels.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (systemLabels_ != null) { + output.writeMessage(1, getSystemLabels()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (systemLabels_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSystemLabels()); + } + for (java.util.Map.Entry entry : + internalGetUserLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry userLabels__ = + UserLabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, userLabels__); + } + 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.api.MonitoredResourceMetadata)) { + return super.equals(obj); + } + com.google.api.MonitoredResourceMetadata other = (com.google.api.MonitoredResourceMetadata) obj; + + if (hasSystemLabels() != other.hasSystemLabels()) return false; + if (hasSystemLabels()) { + if (!getSystemLabels().equals(other.getSystemLabels())) return false; + } + if (!internalGetUserLabels().equals(other.internalGetUserLabels())) 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 (hasSystemLabels()) { + hash = (37 * hash) + SYSTEM_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getSystemLabels().hashCode(); + } + if (!internalGetUserLabels().getMap().isEmpty()) { + hash = (37 * hash) + USER_LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetUserLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.MonitoredResourceMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MonitoredResourceMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MonitoredResourceMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MonitoredResourceMetadata 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.api.MonitoredResourceMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.MonitoredResourceMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.MonitoredResourceMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MonitoredResourceMetadata 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.api.MonitoredResourceMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.MonitoredResourceMetadata 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.api.MonitoredResourceMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.MonitoredResourceMetadata 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.api.MonitoredResourceMetadata 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; + } + /** + * + * + *
+   * Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource]
+   * object. [MonitoredResource][google.api.MonitoredResource] objects contain the
+   * minimum set of information to uniquely identify a monitored resource
+   * instance. There is some other useful auxiliary metadata. Monitoring and
+   * Logging use an ingestion pipeline to extract metadata for cloud resources of
+   * all types, and store the metadata in this message.
+   * 
+ * + * Protobuf type {@code google.api.MonitoredResourceMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.MonitoredResourceMetadata) + com.google.api.MonitoredResourceMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.MonitoredResourceMetadata.class, + com.google.api.MonitoredResourceMetadata.Builder.class); + } + + // Construct using com.google.api.MonitoredResourceMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + systemLabels_ = null; + if (systemLabelsBuilder_ != null) { + systemLabelsBuilder_.dispose(); + systemLabelsBuilder_ = null; + } + internalGetMutableUserLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.MonitoredResourceProto + .internal_static_google_api_MonitoredResourceMetadata_descriptor; + } + + @java.lang.Override + public com.google.api.MonitoredResourceMetadata getDefaultInstanceForType() { + return com.google.api.MonitoredResourceMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.MonitoredResourceMetadata build() { + com.google.api.MonitoredResourceMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.MonitoredResourceMetadata buildPartial() { + com.google.api.MonitoredResourceMetadata result = + new com.google.api.MonitoredResourceMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.MonitoredResourceMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.systemLabels_ = + systemLabelsBuilder_ == null ? systemLabels_ : systemLabelsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userLabels_ = internalGetUserLabels(); + result.userLabels_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.MonitoredResourceMetadata) { + return mergeFrom((com.google.api.MonitoredResourceMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.MonitoredResourceMetadata other) { + if (other == com.google.api.MonitoredResourceMetadata.getDefaultInstance()) return this; + if (other.hasSystemLabels()) { + mergeSystemLabels(other.getSystemLabels()); + } + internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSystemLabelsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry userLabels__ = + input.readMessage( + UserLabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableUserLabels() + .getMutableMap() + .put(userLabels__.getKey(), userLabels__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Struct systemLabels_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + systemLabelsBuilder_; + /** + * + * + *
+     * Output only. Values for predefined system metadata labels.
+     * System labels are a kind of metadata extracted by Google, including
+     * "machine_image", "vpc", "subnet_id",
+     * "security_group", "name", etc.
+     * System label values can be only strings, Boolean values, or a list of
+     * strings. For example:
+     *
+     *     { "name": "my-test-instance",
+     *       "security_group": ["a", "b", "c"],
+     *       "spot_instance": false }
+     * 
+ * + * .google.protobuf.Struct system_labels = 1; + * + * @return Whether the systemLabels field is set. + */ + public boolean hasSystemLabels() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Output only. Values for predefined system metadata labels.
+     * System labels are a kind of metadata extracted by Google, including
+     * "machine_image", "vpc", "subnet_id",
+     * "security_group", "name", etc.
+     * System label values can be only strings, Boolean values, or a list of
+     * strings. For example:
+     *
+     *     { "name": "my-test-instance",
+     *       "security_group": ["a", "b", "c"],
+     *       "spot_instance": false }
+     * 
+ * + * .google.protobuf.Struct system_labels = 1; + * + * @return The systemLabels. + */ + public com.google.protobuf.Struct getSystemLabels() { + if (systemLabelsBuilder_ == null) { + return systemLabels_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : systemLabels_; + } else { + return systemLabelsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Values for predefined system metadata labels.
+     * System labels are a kind of metadata extracted by Google, including
+     * "machine_image", "vpc", "subnet_id",
+     * "security_group", "name", etc.
+     * System label values can be only strings, Boolean values, or a list of
+     * strings. For example:
+     *
+     *     { "name": "my-test-instance",
+     *       "security_group": ["a", "b", "c"],
+     *       "spot_instance": false }
+     * 
+ * + * .google.protobuf.Struct system_labels = 1; + */ + public Builder setSystemLabels(com.google.protobuf.Struct value) { + if (systemLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemLabels_ = value; + } else { + systemLabelsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Values for predefined system metadata labels.
+     * System labels are a kind of metadata extracted by Google, including
+     * "machine_image", "vpc", "subnet_id",
+     * "security_group", "name", etc.
+     * System label values can be only strings, Boolean values, or a list of
+     * strings. For example:
+     *
+     *     { "name": "my-test-instance",
+     *       "security_group": ["a", "b", "c"],
+     *       "spot_instance": false }
+     * 
+ * + * .google.protobuf.Struct system_labels = 1; + */ + public Builder setSystemLabels(com.google.protobuf.Struct.Builder builderForValue) { + if (systemLabelsBuilder_ == null) { + systemLabels_ = builderForValue.build(); + } else { + systemLabelsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Values for predefined system metadata labels.
+     * System labels are a kind of metadata extracted by Google, including
+     * "machine_image", "vpc", "subnet_id",
+     * "security_group", "name", etc.
+     * System label values can be only strings, Boolean values, or a list of
+     * strings. For example:
+     *
+     *     { "name": "my-test-instance",
+     *       "security_group": ["a", "b", "c"],
+     *       "spot_instance": false }
+     * 
+ * + * .google.protobuf.Struct system_labels = 1; + */ + public Builder mergeSystemLabels(com.google.protobuf.Struct value) { + if (systemLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && systemLabels_ != null + && systemLabels_ != com.google.protobuf.Struct.getDefaultInstance()) { + getSystemLabelsBuilder().mergeFrom(value); + } else { + systemLabels_ = value; + } + } else { + systemLabelsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Values for predefined system metadata labels.
+     * System labels are a kind of metadata extracted by Google, including
+     * "machine_image", "vpc", "subnet_id",
+     * "security_group", "name", etc.
+     * System label values can be only strings, Boolean values, or a list of
+     * strings. For example:
+     *
+     *     { "name": "my-test-instance",
+     *       "security_group": ["a", "b", "c"],
+     *       "spot_instance": false }
+     * 
+ * + * .google.protobuf.Struct system_labels = 1; + */ + public Builder clearSystemLabels() { + bitField0_ = (bitField0_ & ~0x00000001); + systemLabels_ = null; + if (systemLabelsBuilder_ != null) { + systemLabelsBuilder_.dispose(); + systemLabelsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Values for predefined system metadata labels.
+     * System labels are a kind of metadata extracted by Google, including
+     * "machine_image", "vpc", "subnet_id",
+     * "security_group", "name", etc.
+     * System label values can be only strings, Boolean values, or a list of
+     * strings. For example:
+     *
+     *     { "name": "my-test-instance",
+     *       "security_group": ["a", "b", "c"],
+     *       "spot_instance": false }
+     * 
+ * + * .google.protobuf.Struct system_labels = 1; + */ + public com.google.protobuf.Struct.Builder getSystemLabelsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSystemLabelsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Values for predefined system metadata labels.
+     * System labels are a kind of metadata extracted by Google, including
+     * "machine_image", "vpc", "subnet_id",
+     * "security_group", "name", etc.
+     * System label values can be only strings, Boolean values, or a list of
+     * strings. For example:
+     *
+     *     { "name": "my-test-instance",
+     *       "security_group": ["a", "b", "c"],
+     *       "spot_instance": false }
+     * 
+ * + * .google.protobuf.Struct system_labels = 1; + */ + public com.google.protobuf.StructOrBuilder getSystemLabelsOrBuilder() { + if (systemLabelsBuilder_ != null) { + return systemLabelsBuilder_.getMessageOrBuilder(); + } else { + return systemLabels_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : systemLabels_; + } + } + /** + * + * + *
+     * Output only. Values for predefined system metadata labels.
+     * System labels are a kind of metadata extracted by Google, including
+     * "machine_image", "vpc", "subnet_id",
+     * "security_group", "name", etc.
+     * System label values can be only strings, Boolean values, or a list of
+     * strings. For example:
+     *
+     *     { "name": "my-test-instance",
+     *       "security_group": ["a", "b", "c"],
+     *       "spot_instance": false }
+     * 
+ * + * .google.protobuf.Struct system_labels = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getSystemLabelsFieldBuilder() { + if (systemLabelsBuilder_ == null) { + systemLabelsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getSystemLabels(), getParentForChildren(), isClean()); + systemLabels_ = null; + } + return systemLabelsBuilder_; + } + + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField + internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + private com.google.protobuf.MapField + internalGetMutableUserLabels() { + if (userLabels_ == null) { + userLabels_ = + com.google.protobuf.MapField.newMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + if (!userLabels_.isMutable()) { + userLabels_ = userLabels_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + /** + * + * + *
+     * Output only. A map of user-defined metadata labels.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetUserLabels().getMap().containsKey(key); + } + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + /** + * + * + *
+     * Output only. A map of user-defined metadata labels.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + /** + * + * + *
+     * Output only. A map of user-defined metadata labels.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. A map of user-defined metadata labels.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearUserLabels() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableUserLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. A map of user-defined metadata labels.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + public Builder removeUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableUserLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableUserLabels() { + bitField0_ |= 0x00000002; + return internalGetMutableUserLabels().getMutableMap(); + } + /** + * + * + *
+     * Output only. A map of user-defined metadata labels.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + public Builder putUserLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableUserLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * Output only. A map of user-defined metadata labels.
+     * 
+ * + * map<string, string> user_labels = 2; + */ + public Builder putAllUserLabels(java.util.Map values) { + internalGetMutableUserLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.MonitoredResourceMetadata) + } + + // @@protoc_insertion_point(class_scope:google.api.MonitoredResourceMetadata) + private static final com.google.api.MonitoredResourceMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.MonitoredResourceMetadata(); + } + + public static com.google.api.MonitoredResourceMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MonitoredResourceMetadata 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.api.MonitoredResourceMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceMetadataOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceMetadataOrBuilder.java new file mode 100644 index 000000000000..7b61ca24608a --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceMetadataOrBuilder.java @@ -0,0 +1,145 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +public interface MonitoredResourceMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.MonitoredResourceMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Values for predefined system metadata labels.
+   * System labels are a kind of metadata extracted by Google, including
+   * "machine_image", "vpc", "subnet_id",
+   * "security_group", "name", etc.
+   * System label values can be only strings, Boolean values, or a list of
+   * strings. For example:
+   *
+   *     { "name": "my-test-instance",
+   *       "security_group": ["a", "b", "c"],
+   *       "spot_instance": false }
+   * 
+ * + * .google.protobuf.Struct system_labels = 1; + * + * @return Whether the systemLabels field is set. + */ + boolean hasSystemLabels(); + /** + * + * + *
+   * Output only. Values for predefined system metadata labels.
+   * System labels are a kind of metadata extracted by Google, including
+   * "machine_image", "vpc", "subnet_id",
+   * "security_group", "name", etc.
+   * System label values can be only strings, Boolean values, or a list of
+   * strings. For example:
+   *
+   *     { "name": "my-test-instance",
+   *       "security_group": ["a", "b", "c"],
+   *       "spot_instance": false }
+   * 
+ * + * .google.protobuf.Struct system_labels = 1; + * + * @return The systemLabels. + */ + com.google.protobuf.Struct getSystemLabels(); + /** + * + * + *
+   * Output only. Values for predefined system metadata labels.
+   * System labels are a kind of metadata extracted by Google, including
+   * "machine_image", "vpc", "subnet_id",
+   * "security_group", "name", etc.
+   * System label values can be only strings, Boolean values, or a list of
+   * strings. For example:
+   *
+   *     { "name": "my-test-instance",
+   *       "security_group": ["a", "b", "c"],
+   *       "spot_instance": false }
+   * 
+ * + * .google.protobuf.Struct system_labels = 1; + */ + com.google.protobuf.StructOrBuilder getSystemLabelsOrBuilder(); + + /** + * + * + *
+   * Output only. A map of user-defined metadata labels.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + int getUserLabelsCount(); + /** + * + * + *
+   * Output only. A map of user-defined metadata labels.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + boolean containsUserLabels(java.lang.String key); + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getUserLabels(); + /** + * + * + *
+   * Output only. A map of user-defined metadata labels.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + java.util.Map getUserLabelsMap(); + /** + * + * + *
+   * Output only. A map of user-defined metadata labels.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + /* nullable */ + java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Output only. A map of user-defined metadata labels.
+   * 
+ * + * map<string, string> user_labels = 2; + */ + java.lang.String getUserLabelsOrThrow(java.lang.String key); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceOrBuilder.java new file mode 100644 index 000000000000..b499f6366b45 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +public interface MonitoredResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.MonitoredResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The monitored resource type. This field must match
+   * the `type` field of a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+   * object. For example, the type of a Compute Engine VM instance is
+   * `gce_instance`. Some descriptors include the service name in the type; for
+   * example, the type of a Datastream stream is
+   * `datastream.googleapis.com/Stream`.
+   * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * Required. The monitored resource type. This field must match
+   * the `type` field of a
+   * [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor]
+   * object. For example, the type of a Compute Engine VM instance is
+   * `gce_instance`. Some descriptors include the service name in the type; for
+   * example, the type of a Datastream stream is
+   * `datastream.googleapis.com/Stream`.
+   * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * Required. Values for all of the labels listed in the associated monitored
+   * resource descriptor. For example, Compute Engine VM instances use the
+   * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+   * 
+ * + * map<string, string> labels = 2; + */ + int getLabelsCount(); + /** + * + * + *
+   * Required. Values for all of the labels listed in the associated monitored
+   * resource descriptor. For example, Compute Engine VM instances use the
+   * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+   * 
+ * + * map<string, string> labels = 2; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Required. Values for all of the labels listed in the associated monitored
+   * resource descriptor. For example, Compute Engine VM instances use the
+   * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+   * 
+ * + * map<string, string> labels = 2; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Required. Values for all of the labels listed in the associated monitored
+   * resource descriptor. For example, Compute Engine VM instances use the
+   * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+   * 
+ * + * map<string, string> labels = 2; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Required. Values for all of the labels listed in the associated monitored
+   * resource descriptor. For example, Compute Engine VM instances use the
+   * labels `"project_id"`, `"instance_id"`, and `"zone"`.
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceProto.java new file mode 100644 index 000000000000..9e4b682b8893 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoredResourceProto.java @@ -0,0 +1,135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitored_resource.proto + +package com.google.api; + +public final class MonitoredResourceProto { + private MonitoredResourceProto() {} + + 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_api_MonitoredResourceDescriptor_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MonitoredResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MonitoredResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MonitoredResource_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MonitoredResource_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MonitoredResourceMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MonitoredResourceMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MonitoredResourceMetadata_UserLabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MonitoredResourceMetadata_UserLabelsEntry_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/api/monitored_resource.proto\022\ng" + + "oogle.api\032\026google/api/label.proto\032\035googl" + + "e/api/launch_stage.proto\032\034google/protobu" + + "f/struct.proto\"\300\001\n\033MonitoredResourceDesc" + + "riptor\022\014\n\004name\030\005 \001(\t\022\014\n\004type\030\001 \001(\t\022\024\n\014di" + + "splay_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022+\n" + + "\006labels\030\004 \003(\0132\033.google.api.LabelDescript" + + "or\022-\n\014launch_stage\030\007 \001(\0162\027.google.api.La" + + "unchStage\"\213\001\n\021MonitoredResource\022\014\n\004type\030" + + "\001 \001(\t\0229\n\006labels\030\002 \003(\0132).google.api.Monit" + + "oredResource.LabelsEntry\032-\n\013LabelsEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\312\001\n\031Moni" + + "toredResourceMetadata\022.\n\rsystem_labels\030\001" + + " \001(\0132\027.google.protobuf.Struct\022J\n\013user_la" + + "bels\030\002 \003(\01325.google.api.MonitoredResourc" + + "eMetadata.UserLabelsEntry\0321\n\017UserLabelsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001By\n\016" + + "com.google.apiB\026MonitoredResourceProtoP\001" + + "ZCgoogle.golang.org/genproto/googleapis/" + + "api/monitoredres;monitoredres\370\001\001\242\002\004GAPIb" + + "\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.LabelProto.getDescriptor(), + com.google.api.LaunchStageProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_api_MonitoredResourceDescriptor_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_MonitoredResourceDescriptor_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MonitoredResourceDescriptor_descriptor, + new java.lang.String[] { + "Name", "Type", "DisplayName", "Description", "Labels", "LaunchStage", + }); + internal_static_google_api_MonitoredResource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_MonitoredResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MonitoredResource_descriptor, + new java.lang.String[] { + "Type", "Labels", + }); + internal_static_google_api_MonitoredResource_LabelsEntry_descriptor = + internal_static_google_api_MonitoredResource_descriptor.getNestedTypes().get(0); + internal_static_google_api_MonitoredResource_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MonitoredResource_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_api_MonitoredResourceMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_api_MonitoredResourceMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MonitoredResourceMetadata_descriptor, + new java.lang.String[] { + "SystemLabels", "UserLabels", + }); + internal_static_google_api_MonitoredResourceMetadata_UserLabelsEntry_descriptor = + internal_static_google_api_MonitoredResourceMetadata_descriptor.getNestedTypes().get(0); + internal_static_google_api_MonitoredResourceMetadata_UserLabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MonitoredResourceMetadata_UserLabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.api.LabelProto.getDescriptor(); + com.google.api.LaunchStageProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Monitoring.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Monitoring.java new file mode 100644 index 000000000000..c005f4688537 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Monitoring.java @@ -0,0 +1,2800 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitoring.proto + +package com.google.api; + +/** + * + * + *
+ * Monitoring configuration of the service.
+ *
+ * The example below shows how to configure monitored resources and metrics
+ * for monitoring. In the example, a monitored resource and two metrics are
+ * defined. The `library.googleapis.com/book/returned_count` metric is sent
+ * to both producer and consumer projects, whereas the
+ * `library.googleapis.com/book/num_overdue` metric is only sent to the
+ * consumer project.
+ *
+ *     monitored_resources:
+ *     - type: library.googleapis.com/Branch
+ *       display_name: "Library Branch"
+ *       description: "A branch of a library."
+ *       launch_stage: GA
+ *       labels:
+ *       - key: resource_container
+ *         description: "The Cloud container (ie. project id) for the Branch."
+ *       - key: location
+ *         description: "The location of the library branch."
+ *       - key: branch_id
+ *         description: "The id of the branch."
+ *     metrics:
+ *     - name: library.googleapis.com/book/returned_count
+ *       display_name: "Books Returned"
+ *       description: "The count of books that have been returned."
+ *       launch_stage: GA
+ *       metric_kind: DELTA
+ *       value_type: INT64
+ *       unit: "1"
+ *       labels:
+ *       - key: customer_id
+ *         description: "The id of the customer."
+ *     - name: library.googleapis.com/book/num_overdue
+ *       display_name: "Books Overdue"
+ *       description: "The current number of overdue books."
+ *       launch_stage: GA
+ *       metric_kind: GAUGE
+ *       value_type: INT64
+ *       unit: "1"
+ *       labels:
+ *       - key: customer_id
+ *         description: "The id of the customer."
+ *     monitoring:
+ *       producer_destinations:
+ *       - monitored_resource: library.googleapis.com/Branch
+ *         metrics:
+ *         - library.googleapis.com/book/returned_count
+ *       consumer_destinations:
+ *       - monitored_resource: library.googleapis.com/Branch
+ *         metrics:
+ *         - library.googleapis.com/book/returned_count
+ *         - library.googleapis.com/book/num_overdue
+ * 
+ * + * Protobuf type {@code google.api.Monitoring} + */ +public final class Monitoring extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Monitoring) + MonitoringOrBuilder { + private static final long serialVersionUID = 0L; + // Use Monitoring.newBuilder() to construct. + private Monitoring(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Monitoring() { + producerDestinations_ = java.util.Collections.emptyList(); + consumerDestinations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Monitoring(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Monitoring.class, com.google.api.Monitoring.Builder.class); + } + + public interface MonitoringDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Monitoring.MonitoringDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 1; + * + * @return The monitoredResource. + */ + java.lang.String getMonitoredResource(); + /** + * + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 1; + * + * @return The bytes for monitoredResource. + */ + com.google.protobuf.ByteString getMonitoredResourceBytes(); + + /** + * + * + *
+     * Types of the metrics to report to this monitoring destination.
+     * Each type must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @return A list containing the metrics. + */ + java.util.List getMetricsList(); + /** + * + * + *
+     * Types of the metrics to report to this monitoring destination.
+     * Each type must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @return The count of metrics. + */ + int getMetricsCount(); + /** + * + * + *
+     * Types of the metrics to report to this monitoring destination.
+     * Each type must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the element to return. + * @return The metrics at the given index. + */ + java.lang.String getMetrics(int index); + /** + * + * + *
+     * Types of the metrics to report to this monitoring destination.
+     * Each type must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the value to return. + * @return The bytes of the metrics at the given index. + */ + com.google.protobuf.ByteString getMetricsBytes(int index); + } + /** + * + * + *
+   * Configuration of a specific monitoring destination (the producer project
+   * or the consumer project).
+   * 
+ * + * Protobuf type {@code google.api.Monitoring.MonitoringDestination} + */ + public static final class MonitoringDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Monitoring.MonitoringDestination) + MonitoringDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use MonitoringDestination.newBuilder() to construct. + private MonitoringDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MonitoringDestination() { + monitoredResource_ = ""; + metrics_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MonitoringDestination(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MonitoringProto + .internal_static_google_api_Monitoring_MonitoringDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoringProto + .internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Monitoring.MonitoringDestination.class, + com.google.api.Monitoring.MonitoringDestination.Builder.class); + } + + public static final int MONITORED_RESOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object monitoredResource_ = ""; + /** + * + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 1; + * + * @return The monitoredResource. + */ + @java.lang.Override + public java.lang.String getMonitoredResource() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + monitoredResource_ = s; + return s; + } + } + /** + * + * + *
+     * The monitored resource type. The type must be defined in
+     * [Service.monitored_resources][google.api.Service.monitored_resources]
+     * section.
+     * 
+ * + * string monitored_resource = 1; + * + * @return The bytes for monitoredResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMonitoredResourceBytes() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + monitoredResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRICS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList metrics_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Types of the metrics to report to this monitoring destination.
+     * Each type must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @return A list containing the metrics. + */ + public com.google.protobuf.ProtocolStringList getMetricsList() { + return metrics_; + } + /** + * + * + *
+     * Types of the metrics to report to this monitoring destination.
+     * Each type must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @return The count of metrics. + */ + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+     * Types of the metrics to report to this monitoring destination.
+     * Each type must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the element to return. + * @return The metrics at the given index. + */ + public java.lang.String getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+     * Types of the metrics to report to this monitoring destination.
+     * Each type must be defined in
+     * [Service.metrics][google.api.Service.metrics] section.
+     * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the value to return. + * @return The bytes of the metrics at the given index. + */ + public com.google.protobuf.ByteString getMetricsBytes(int index) { + return metrics_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(monitoredResource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, monitoredResource_); + } + for (int i = 0; i < metrics_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metrics_.getRaw(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(monitoredResource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, monitoredResource_); + } + { + int dataSize = 0; + for (int i = 0; i < metrics_.size(); i++) { + dataSize += computeStringSizeNoTag(metrics_.getRaw(i)); + } + size += dataSize; + size += 1 * getMetricsList().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.api.Monitoring.MonitoringDestination)) { + return super.equals(obj); + } + com.google.api.Monitoring.MonitoringDestination other = + (com.google.api.Monitoring.MonitoringDestination) obj; + + if (!getMonitoredResource().equals(other.getMonitoredResource())) return false; + if (!getMetricsList().equals(other.getMetricsList())) 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) + MONITORED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getMonitoredResource().hashCode(); + if (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Monitoring.MonitoringDestination parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Monitoring.MonitoringDestination parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Monitoring.MonitoringDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Monitoring.MonitoringDestination 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.api.Monitoring.MonitoringDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Monitoring.MonitoringDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Monitoring.MonitoringDestination parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Monitoring.MonitoringDestination 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.api.Monitoring.MonitoringDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Monitoring.MonitoringDestination 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.api.Monitoring.MonitoringDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Monitoring.MonitoringDestination 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.api.Monitoring.MonitoringDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration of a specific monitoring destination (the producer project
+     * or the consumer project).
+     * 
+ * + * Protobuf type {@code google.api.Monitoring.MonitoringDestination} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Monitoring.MonitoringDestination) + com.google.api.Monitoring.MonitoringDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MonitoringProto + .internal_static_google_api_Monitoring_MonitoringDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoringProto + .internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Monitoring.MonitoringDestination.class, + com.google.api.Monitoring.MonitoringDestination.Builder.class); + } + + // Construct using com.google.api.Monitoring.MonitoringDestination.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + monitoredResource_ = ""; + metrics_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.MonitoringProto + .internal_static_google_api_Monitoring_MonitoringDestination_descriptor; + } + + @java.lang.Override + public com.google.api.Monitoring.MonitoringDestination getDefaultInstanceForType() { + return com.google.api.Monitoring.MonitoringDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Monitoring.MonitoringDestination build() { + com.google.api.Monitoring.MonitoringDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Monitoring.MonitoringDestination buildPartial() { + com.google.api.Monitoring.MonitoringDestination result = + new com.google.api.Monitoring.MonitoringDestination(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Monitoring.MonitoringDestination result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.monitoredResource_ = monitoredResource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + metrics_.makeImmutable(); + result.metrics_ = metrics_; + } + } + + @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.api.Monitoring.MonitoringDestination) { + return mergeFrom((com.google.api.Monitoring.MonitoringDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Monitoring.MonitoringDestination other) { + if (other == com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()) + return this; + if (!other.getMonitoredResource().isEmpty()) { + monitoredResource_ = other.monitoredResource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ |= 0x00000002; + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + 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: + { + monitoredResource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMetricsIsMutable(); + metrics_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object monitoredResource_ = ""; + /** + * + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 1; + * + * @return The monitoredResource. + */ + public java.lang.String getMonitoredResource() { + java.lang.Object ref = monitoredResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + monitoredResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 1; + * + * @return The bytes for monitoredResource. + */ + public com.google.protobuf.ByteString getMonitoredResourceBytes() { + java.lang.Object ref = monitoredResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + monitoredResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 1; + * + * @param value The monitoredResource to set. + * @return This builder for chaining. + */ + public Builder setMonitoredResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + monitoredResource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 1; + * + * @return This builder for chaining. + */ + public Builder clearMonitoredResource() { + monitoredResource_ = getDefaultInstance().getMonitoredResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The monitored resource type. The type must be defined in
+       * [Service.monitored_resources][google.api.Service.monitored_resources]
+       * section.
+       * 
+ * + * string monitored_resource = 1; + * + * @param value The bytes for monitoredResource to set. + * @return This builder for chaining. + */ + public Builder setMonitoredResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + monitoredResource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList metrics_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureMetricsIsMutable() { + if (!metrics_.isModifiable()) { + metrics_ = new com.google.protobuf.LazyStringArrayList(metrics_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Types of the metrics to report to this monitoring destination.
+       * Each type must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @return A list containing the metrics. + */ + public com.google.protobuf.ProtocolStringList getMetricsList() { + metrics_.makeImmutable(); + return metrics_; + } + /** + * + * + *
+       * Types of the metrics to report to this monitoring destination.
+       * Each type must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @return The count of metrics. + */ + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+       * Types of the metrics to report to this monitoring destination.
+       * Each type must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the element to return. + * @return The metrics at the given index. + */ + public java.lang.String getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+       * Types of the metrics to report to this monitoring destination.
+       * Each type must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param index The index of the value to return. + * @return The bytes of the metrics at the given index. + */ + public com.google.protobuf.ByteString getMetricsBytes(int index) { + return metrics_.getByteString(index); + } + /** + * + * + *
+       * Types of the metrics to report to this monitoring destination.
+       * Each type must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param index The index to set the value at. + * @param value The metrics to set. + * @return This builder for chaining. + */ + public Builder setMetrics(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Types of the metrics to report to this monitoring destination.
+       * Each type must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param value The metrics to add. + * @return This builder for chaining. + */ + public Builder addMetrics(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Types of the metrics to report to this monitoring destination.
+       * Each type must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param values The metrics to add. + * @return This builder for chaining. + */ + public Builder addAllMetrics(java.lang.Iterable values) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Types of the metrics to report to this monitoring destination.
+       * Each type must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @return This builder for chaining. + */ + public Builder clearMetrics() { + metrics_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Types of the metrics to report to this monitoring destination.
+       * Each type must be defined in
+       * [Service.metrics][google.api.Service.metrics] section.
+       * 
+ * + * repeated string metrics = 2; + * + * @param value The bytes of the metrics to add. + * @return This builder for chaining. + */ + public Builder addMetricsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMetricsIsMutable(); + metrics_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.Monitoring.MonitoringDestination) + } + + // @@protoc_insertion_point(class_scope:google.api.Monitoring.MonitoringDestination) + private static final com.google.api.Monitoring.MonitoringDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Monitoring.MonitoringDestination(); + } + + public static com.google.api.Monitoring.MonitoringDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MonitoringDestination 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.api.Monitoring.MonitoringDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PRODUCER_DESTINATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List producerDestinations_; + /** + * + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + @java.lang.Override + public java.util.List + getProducerDestinationsList() { + return producerDestinations_; + } + /** + * + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + @java.lang.Override + public java.util.List + getProducerDestinationsOrBuilderList() { + return producerDestinations_; + } + /** + * + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + @java.lang.Override + public int getProducerDestinationsCount() { + return producerDestinations_.size(); + } + /** + * + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + @java.lang.Override + public com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index) { + return producerDestinations_.get(index); + } + /** + * + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + @java.lang.Override + public com.google.api.Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder( + int index) { + return producerDestinations_.get(index); + } + + public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List consumerDestinations_; + /** + * + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + @java.lang.Override + public java.util.List + getConsumerDestinationsList() { + return consumerDestinations_; + } + /** + * + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + @java.lang.Override + public java.util.List + getConsumerDestinationsOrBuilderList() { + return consumerDestinations_; + } + /** + * + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + @java.lang.Override + public int getConsumerDestinationsCount() { + return consumerDestinations_.size(); + } + /** + * + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + @java.lang.Override + public com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index) { + return consumerDestinations_.get(index); + } + /** + * + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + @java.lang.Override + public com.google.api.Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index) { + return consumerDestinations_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < producerDestinations_.size(); i++) { + output.writeMessage(1, producerDestinations_.get(i)); + } + for (int i = 0; i < consumerDestinations_.size(); i++) { + output.writeMessage(2, consumerDestinations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < producerDestinations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, producerDestinations_.get(i)); + } + for (int i = 0; i < consumerDestinations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, consumerDestinations_.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.api.Monitoring)) { + return super.equals(obj); + } + com.google.api.Monitoring other = (com.google.api.Monitoring) obj; + + if (!getProducerDestinationsList().equals(other.getProducerDestinationsList())) return false; + if (!getConsumerDestinationsList().equals(other.getConsumerDestinationsList())) 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 (getProducerDestinationsCount() > 0) { + hash = (37 * hash) + PRODUCER_DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + getProducerDestinationsList().hashCode(); + } + if (getConsumerDestinationsCount() > 0) { + hash = (37 * hash) + CONSUMER_DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + getConsumerDestinationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Monitoring parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Monitoring parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Monitoring parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Monitoring 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.api.Monitoring parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Monitoring parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Monitoring parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Monitoring 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.api.Monitoring parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Monitoring 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.api.Monitoring parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Monitoring 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.api.Monitoring 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; + } + /** + * + * + *
+   * Monitoring configuration of the service.
+   *
+   * The example below shows how to configure monitored resources and metrics
+   * for monitoring. In the example, a monitored resource and two metrics are
+   * defined. The `library.googleapis.com/book/returned_count` metric is sent
+   * to both producer and consumer projects, whereas the
+   * `library.googleapis.com/book/num_overdue` metric is only sent to the
+   * consumer project.
+   *
+   *     monitored_resources:
+   *     - type: library.googleapis.com/Branch
+   *       display_name: "Library Branch"
+   *       description: "A branch of a library."
+   *       launch_stage: GA
+   *       labels:
+   *       - key: resource_container
+   *         description: "The Cloud container (ie. project id) for the Branch."
+   *       - key: location
+   *         description: "The location of the library branch."
+   *       - key: branch_id
+   *         description: "The id of the branch."
+   *     metrics:
+   *     - name: library.googleapis.com/book/returned_count
+   *       display_name: "Books Returned"
+   *       description: "The count of books that have been returned."
+   *       launch_stage: GA
+   *       metric_kind: DELTA
+   *       value_type: INT64
+   *       unit: "1"
+   *       labels:
+   *       - key: customer_id
+   *         description: "The id of the customer."
+   *     - name: library.googleapis.com/book/num_overdue
+   *       display_name: "Books Overdue"
+   *       description: "The current number of overdue books."
+   *       launch_stage: GA
+   *       metric_kind: GAUGE
+   *       value_type: INT64
+   *       unit: "1"
+   *       labels:
+   *       - key: customer_id
+   *         description: "The id of the customer."
+   *     monitoring:
+   *       producer_destinations:
+   *       - monitored_resource: library.googleapis.com/Branch
+   *         metrics:
+   *         - library.googleapis.com/book/returned_count
+   *       consumer_destinations:
+   *       - monitored_resource: library.googleapis.com/Branch
+   *         metrics:
+   *         - library.googleapis.com/book/returned_count
+   *         - library.googleapis.com/book/num_overdue
+   * 
+ * + * Protobuf type {@code google.api.Monitoring} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Monitoring) + com.google.api.MonitoringOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Monitoring.class, com.google.api.Monitoring.Builder.class); + } + + // Construct using com.google.api.Monitoring.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (producerDestinationsBuilder_ == null) { + producerDestinations_ = java.util.Collections.emptyList(); + } else { + producerDestinations_ = null; + producerDestinationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (consumerDestinationsBuilder_ == null) { + consumerDestinations_ = java.util.Collections.emptyList(); + } else { + consumerDestinations_ = null; + consumerDestinationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.MonitoringProto.internal_static_google_api_Monitoring_descriptor; + } + + @java.lang.Override + public com.google.api.Monitoring getDefaultInstanceForType() { + return com.google.api.Monitoring.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Monitoring build() { + com.google.api.Monitoring result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Monitoring buildPartial() { + com.google.api.Monitoring result = new com.google.api.Monitoring(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Monitoring result) { + if (producerDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + producerDestinations_ = java.util.Collections.unmodifiableList(producerDestinations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.producerDestinations_ = producerDestinations_; + } else { + result.producerDestinations_ = producerDestinationsBuilder_.build(); + } + if (consumerDestinationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + consumerDestinations_ = java.util.Collections.unmodifiableList(consumerDestinations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.consumerDestinations_ = consumerDestinations_; + } else { + result.consumerDestinations_ = consumerDestinationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Monitoring result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Monitoring) { + return mergeFrom((com.google.api.Monitoring) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Monitoring other) { + if (other == com.google.api.Monitoring.getDefaultInstance()) return this; + if (producerDestinationsBuilder_ == null) { + if (!other.producerDestinations_.isEmpty()) { + if (producerDestinations_.isEmpty()) { + producerDestinations_ = other.producerDestinations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProducerDestinationsIsMutable(); + producerDestinations_.addAll(other.producerDestinations_); + } + onChanged(); + } + } else { + if (!other.producerDestinations_.isEmpty()) { + if (producerDestinationsBuilder_.isEmpty()) { + producerDestinationsBuilder_.dispose(); + producerDestinationsBuilder_ = null; + producerDestinations_ = other.producerDestinations_; + bitField0_ = (bitField0_ & ~0x00000001); + producerDestinationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProducerDestinationsFieldBuilder() + : null; + } else { + producerDestinationsBuilder_.addAllMessages(other.producerDestinations_); + } + } + } + if (consumerDestinationsBuilder_ == null) { + if (!other.consumerDestinations_.isEmpty()) { + if (consumerDestinations_.isEmpty()) { + consumerDestinations_ = other.consumerDestinations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.addAll(other.consumerDestinations_); + } + onChanged(); + } + } else { + if (!other.consumerDestinations_.isEmpty()) { + if (consumerDestinationsBuilder_.isEmpty()) { + consumerDestinationsBuilder_.dispose(); + consumerDestinationsBuilder_ = null; + consumerDestinations_ = other.consumerDestinations_; + bitField0_ = (bitField0_ & ~0x00000002); + consumerDestinationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConsumerDestinationsFieldBuilder() + : null; + } else { + consumerDestinationsBuilder_.addAllMessages(other.consumerDestinations_); + } + } + } + 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.api.Monitoring.MonitoringDestination m = + input.readMessage( + com.google.api.Monitoring.MonitoringDestination.parser(), + extensionRegistry); + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(m); + } else { + producerDestinationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.api.Monitoring.MonitoringDestination m = + input.readMessage( + com.google.api.Monitoring.MonitoringDestination.parser(), + extensionRegistry); + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(m); + } else { + consumerDestinationsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List producerDestinations_ = + java.util.Collections.emptyList(); + + private void ensureProducerDestinationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + producerDestinations_ = + new java.util.ArrayList( + producerDestinations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Monitoring.MonitoringDestination, + com.google.api.Monitoring.MonitoringDestination.Builder, + com.google.api.Monitoring.MonitoringDestinationOrBuilder> + producerDestinationsBuilder_; + + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public java.util.List + getProducerDestinationsList() { + if (producerDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(producerDestinations_); + } else { + return producerDestinationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public int getProducerDestinationsCount() { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.size(); + } else { + return producerDestinationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index) { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.get(index); + } else { + return producerDestinationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public Builder setProducerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.set(index, value); + onChanged(); + } else { + producerDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public Builder setProducerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public Builder addProducerDestinations(com.google.api.Monitoring.MonitoringDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(value); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public Builder addProducerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination value) { + if (producerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(index, value); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public Builder addProducerDestinations( + com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public Builder addProducerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + producerDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public Builder addAllProducerDestinations( + java.lang.Iterable values) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, producerDestinations_); + onChanged(); + } else { + producerDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public Builder clearProducerDestinations() { + if (producerDestinationsBuilder_ == null) { + producerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + producerDestinationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public Builder removeProducerDestinations(int index) { + if (producerDestinationsBuilder_ == null) { + ensureProducerDestinationsIsMutable(); + producerDestinations_.remove(index); + onChanged(); + } else { + producerDestinationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public com.google.api.Monitoring.MonitoringDestination.Builder getProducerDestinationsBuilder( + int index) { + return getProducerDestinationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public com.google.api.Monitoring.MonitoringDestinationOrBuilder + getProducerDestinationsOrBuilder(int index) { + if (producerDestinationsBuilder_ == null) { + return producerDestinations_.get(index); + } else { + return producerDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public java.util.List + getProducerDestinationsOrBuilderList() { + if (producerDestinationsBuilder_ != null) { + return producerDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(producerDestinations_); + } + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public com.google.api.Monitoring.MonitoringDestination.Builder + addProducerDestinationsBuilder() { + return getProducerDestinationsFieldBuilder() + .addBuilder(com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public com.google.api.Monitoring.MonitoringDestination.Builder addProducerDestinationsBuilder( + int index) { + return getProducerDestinationsFieldBuilder() + .addBuilder(index, com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the producer project.
+     * There can be multiple producer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + public java.util.List + getProducerDestinationsBuilderList() { + return getProducerDestinationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Monitoring.MonitoringDestination, + com.google.api.Monitoring.MonitoringDestination.Builder, + com.google.api.Monitoring.MonitoringDestinationOrBuilder> + getProducerDestinationsFieldBuilder() { + if (producerDestinationsBuilder_ == null) { + producerDestinationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Monitoring.MonitoringDestination, + com.google.api.Monitoring.MonitoringDestination.Builder, + com.google.api.Monitoring.MonitoringDestinationOrBuilder>( + producerDestinations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + producerDestinations_ = null; + } + return producerDestinationsBuilder_; + } + + private java.util.List consumerDestinations_ = + java.util.Collections.emptyList(); + + private void ensureConsumerDestinationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + consumerDestinations_ = + new java.util.ArrayList( + consumerDestinations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Monitoring.MonitoringDestination, + com.google.api.Monitoring.MonitoringDestination.Builder, + com.google.api.Monitoring.MonitoringDestinationOrBuilder> + consumerDestinationsBuilder_; + + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public java.util.List + getConsumerDestinationsList() { + if (consumerDestinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumerDestinations_); + } else { + return consumerDestinationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public int getConsumerDestinationsCount() { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.size(); + } else { + return consumerDestinationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index) { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.get(index); + } else { + return consumerDestinationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public Builder setConsumerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.set(index, value); + onChanged(); + } else { + consumerDestinationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public Builder setConsumerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.set(index, builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public Builder addConsumerDestinations(com.google.api.Monitoring.MonitoringDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(value); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public Builder addConsumerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination value) { + if (consumerDestinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(index, value); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public Builder addConsumerDestinations( + com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public Builder addConsumerDestinations( + int index, com.google.api.Monitoring.MonitoringDestination.Builder builderForValue) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.add(index, builderForValue.build()); + onChanged(); + } else { + consumerDestinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public Builder addAllConsumerDestinations( + java.lang.Iterable values) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, consumerDestinations_); + onChanged(); + } else { + consumerDestinationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public Builder clearConsumerDestinations() { + if (consumerDestinationsBuilder_ == null) { + consumerDestinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + consumerDestinationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public Builder removeConsumerDestinations(int index) { + if (consumerDestinationsBuilder_ == null) { + ensureConsumerDestinationsIsMutable(); + consumerDestinations_.remove(index); + onChanged(); + } else { + consumerDestinationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public com.google.api.Monitoring.MonitoringDestination.Builder getConsumerDestinationsBuilder( + int index) { + return getConsumerDestinationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public com.google.api.Monitoring.MonitoringDestinationOrBuilder + getConsumerDestinationsOrBuilder(int index) { + if (consumerDestinationsBuilder_ == null) { + return consumerDestinations_.get(index); + } else { + return consumerDestinationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public java.util.List + getConsumerDestinationsOrBuilderList() { + if (consumerDestinationsBuilder_ != null) { + return consumerDestinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(consumerDestinations_); + } + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public com.google.api.Monitoring.MonitoringDestination.Builder + addConsumerDestinationsBuilder() { + return getConsumerDestinationsFieldBuilder() + .addBuilder(com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public com.google.api.Monitoring.MonitoringDestination.Builder addConsumerDestinationsBuilder( + int index) { + return getConsumerDestinationsFieldBuilder() + .addBuilder(index, com.google.api.Monitoring.MonitoringDestination.getDefaultInstance()); + } + /** + * + * + *
+     * Monitoring configurations for sending metrics to the consumer project.
+     * There can be multiple consumer destinations. A monitored resource type may
+     * appear in multiple monitoring destinations if different aggregations are
+     * needed for different sets of metrics associated with that monitored
+     * resource type. A monitored resource and metric pair may only be used once
+     * in the Monitoring configuration.
+     * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + public java.util.List + getConsumerDestinationsBuilderList() { + return getConsumerDestinationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Monitoring.MonitoringDestination, + com.google.api.Monitoring.MonitoringDestination.Builder, + com.google.api.Monitoring.MonitoringDestinationOrBuilder> + getConsumerDestinationsFieldBuilder() { + if (consumerDestinationsBuilder_ == null) { + consumerDestinationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Monitoring.MonitoringDestination, + com.google.api.Monitoring.MonitoringDestination.Builder, + com.google.api.Monitoring.MonitoringDestinationOrBuilder>( + consumerDestinations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + consumerDestinations_ = null; + } + return consumerDestinationsBuilder_; + } + + @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.api.Monitoring) + } + + // @@protoc_insertion_point(class_scope:google.api.Monitoring) + private static final com.google.api.Monitoring DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Monitoring(); + } + + public static com.google.api.Monitoring getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Monitoring 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.api.Monitoring getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoringOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoringOrBuilder.java new file mode 100644 index 000000000000..838054f69731 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoringOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitoring.proto + +package com.google.api; + +public interface MonitoringOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Monitoring) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + java.util.List getProducerDestinationsList(); + /** + * + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + com.google.api.Monitoring.MonitoringDestination getProducerDestinations(int index); + /** + * + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + int getProducerDestinationsCount(); + /** + * + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + java.util.List + getProducerDestinationsOrBuilderList(); + /** + * + * + *
+   * Monitoring configurations for sending metrics to the producer project.
+   * There can be multiple producer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1; + */ + com.google.api.Monitoring.MonitoringDestinationOrBuilder getProducerDestinationsOrBuilder( + int index); + + /** + * + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + java.util.List getConsumerDestinationsList(); + /** + * + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + com.google.api.Monitoring.MonitoringDestination getConsumerDestinations(int index); + /** + * + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + int getConsumerDestinationsCount(); + /** + * + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + java.util.List + getConsumerDestinationsOrBuilderList(); + /** + * + * + *
+   * Monitoring configurations for sending metrics to the consumer project.
+   * There can be multiple consumer destinations. A monitored resource type may
+   * appear in multiple monitoring destinations if different aggregations are
+   * needed for different sets of metrics associated with that monitored
+   * resource type. A monitored resource and metric pair may only be used once
+   * in the Monitoring configuration.
+   * 
+ * + * repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2; + */ + com.google.api.Monitoring.MonitoringDestinationOrBuilder getConsumerDestinationsOrBuilder( + int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoringProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoringProto.java new file mode 100644 index 000000000000..762053c06fe9 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/MonitoringProto.java @@ -0,0 +1,80 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/monitoring.proto + +package com.google.api; + +public final class MonitoringProto { + private MonitoringProto() {} + + 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_api_Monitoring_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Monitoring_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_Monitoring_MonitoringDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Monitoring_MonitoringDestination_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\033google/api/monitoring.proto\022\ngoogle.ap" + + "i\"\354\001\n\nMonitoring\022K\n\025producer_destination" + + "s\030\001 \003(\0132,.google.api.Monitoring.Monitori" + + "ngDestination\022K\n\025consumer_destinations\030\002" + + " \003(\0132,.google.api.Monitoring.MonitoringD" + + "estination\032D\n\025MonitoringDestination\022\032\n\022m" + + "onitored_resource\030\001 \001(\t\022\017\n\007metrics\030\002 \003(\t" + + "Bq\n\016com.google.apiB\017MonitoringProtoP\001ZEg" + + "oogle.golang.org/genproto/googleapis/api" + + "/serviceconfig;serviceconfig\242\002\004GAPIb\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_Monitoring_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Monitoring_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Monitoring_descriptor, + new java.lang.String[] { + "ProducerDestinations", "ConsumerDestinations", + }); + internal_static_google_api_Monitoring_MonitoringDestination_descriptor = + internal_static_google_api_Monitoring_descriptor.getNestedTypes().get(0); + internal_static_google_api_Monitoring_MonitoringDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Monitoring_MonitoringDestination_descriptor, + new java.lang.String[] { + "MonitoredResource", "Metrics", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/NodeSettings.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/NodeSettings.java new file mode 100644 index 000000000000..6d9979a24410 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/NodeSettings.java @@ -0,0 +1,690 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * Settings for Node client libraries.
+ * 
+ * + * Protobuf type {@code google.api.NodeSettings} + */ +public final class NodeSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.NodeSettings) + NodeSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use NodeSettings.newBuilder() to construct. + private NodeSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NodeSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NodeSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_NodeSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_NodeSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.NodeSettings.class, com.google.api.NodeSettings.Builder.class); + } + + public static final int COMMON_FIELD_NUMBER = 1; + private com.google.api.CommonLanguageSettings common_; + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + @java.lang.Override + public com.google.api.CommonLanguageSettings getCommon() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + @java.lang.Override + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + + 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 (common_ != null) { + output.writeMessage(1, getCommon()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommon()); + } + 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.api.NodeSettings)) { + return super.equals(obj); + } + com.google.api.NodeSettings other = (com.google.api.NodeSettings) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon().equals(other.getCommon())) 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 (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.NodeSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.NodeSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.NodeSettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.NodeSettings 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.api.NodeSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.NodeSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.NodeSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.NodeSettings 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.api.NodeSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.NodeSettings 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.api.NodeSettings parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.NodeSettings 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.api.NodeSettings 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; + } + /** + * + * + *
+   * Settings for Node client libraries.
+   * 
+ * + * Protobuf type {@code google.api.NodeSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.NodeSettings) + com.google.api.NodeSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_NodeSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_NodeSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.NodeSettings.class, com.google.api.NodeSettings.Builder.class); + } + + // Construct using com.google.api.NodeSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto.internal_static_google_api_NodeSettings_descriptor; + } + + @java.lang.Override + public com.google.api.NodeSettings getDefaultInstanceForType() { + return com.google.api.NodeSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.NodeSettings build() { + com.google.api.NodeSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.NodeSettings buildPartial() { + com.google.api.NodeSettings result = new com.google.api.NodeSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.NodeSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null ? common_ : commonBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.NodeSettings) { + return mergeFrom((com.google.api.NodeSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.NodeSettings other) { + if (other == com.google.api.NodeSettings.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + 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(getCommonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.api.CommonLanguageSettings common_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + commonBuilder_; + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + public com.google.api.CommonLanguageSettings getCommon() { + if (commonBuilder_ == null) { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder mergeCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && common_ != null + && common_ != com.google.api.CommonLanguageSettings.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettings.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder>( + getCommon(), getParentForChildren(), isClean()); + common_ = null; + } + return commonBuilder_; + } + + @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.api.NodeSettings) + } + + // @@protoc_insertion_point(class_scope:google.api.NodeSettings) + private static final com.google.api.NodeSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.NodeSettings(); + } + + public static com.google.api.NodeSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeSettings 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.api.NodeSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/NodeSettingsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/NodeSettingsOrBuilder.java new file mode 100644 index 000000000000..5c7499ff43e9 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/NodeSettingsOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface NodeSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.NodeSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + com.google.api.CommonLanguageSettings getCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/OAuthRequirements.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/OAuthRequirements.java new file mode 100644 index 000000000000..08eec7941bb9 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/OAuthRequirements.java @@ -0,0 +1,691 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +/** + * + * + *
+ * OAuth scopes are a way to define data and permissions on data. For example,
+ * there are scopes defined for "Read-only access to Google Calendar" and
+ * "Access to Cloud Platform". Users can consent to a scope for an application,
+ * giving it permission to access that data on their behalf.
+ *
+ * OAuth scope specifications should be fairly coarse grained; a user will need
+ * to see and understand the text description of what your scope means.
+ *
+ * In most cases: use one or at most two OAuth scopes for an entire family of
+ * products. If your product has multiple APIs, you should probably be sharing
+ * the OAuth scope across all of those APIs.
+ *
+ * When you need finer grained OAuth consent screens: talk with your product
+ * management about how developers will use them in practice.
+ *
+ * Please note that even though each of the canonical scopes is enough for a
+ * request to be accepted and passed to the backend, a request can still fail
+ * due to the backend requiring additional scopes or permissions.
+ * 
+ * + * Protobuf type {@code google.api.OAuthRequirements} + */ +public final class OAuthRequirements extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.OAuthRequirements) + OAuthRequirementsOrBuilder { + private static final long serialVersionUID = 0L; + // Use OAuthRequirements.newBuilder() to construct. + private OAuthRequirements(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OAuthRequirements() { + canonicalScopes_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OAuthRequirements(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.OAuthRequirements.class, com.google.api.OAuthRequirements.Builder.class); + } + + public static final int CANONICAL_SCOPES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object canonicalScopes_ = ""; + /** + * + * + *
+   * The list of publicly documented OAuth scopes that are allowed access. An
+   * OAuth token containing any of these scopes will be accepted.
+   *
+   * Example:
+   *
+   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+   *                        https://www.googleapis.com/auth/calendar.read
+   * 
+ * + * string canonical_scopes = 1; + * + * @return The canonicalScopes. + */ + @java.lang.Override + public java.lang.String getCanonicalScopes() { + java.lang.Object ref = canonicalScopes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + canonicalScopes_ = s; + return s; + } + } + /** + * + * + *
+   * The list of publicly documented OAuth scopes that are allowed access. An
+   * OAuth token containing any of these scopes will be accepted.
+   *
+   * Example:
+   *
+   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+   *                        https://www.googleapis.com/auth/calendar.read
+   * 
+ * + * string canonical_scopes = 1; + * + * @return The bytes for canonicalScopes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCanonicalScopesBytes() { + java.lang.Object ref = canonicalScopes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + canonicalScopes_ = 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(canonicalScopes_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, canonicalScopes_); + } + 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(canonicalScopes_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, canonicalScopes_); + } + 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.api.OAuthRequirements)) { + return super.equals(obj); + } + com.google.api.OAuthRequirements other = (com.google.api.OAuthRequirements) obj; + + if (!getCanonicalScopes().equals(other.getCanonicalScopes())) 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) + CANONICAL_SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getCanonicalScopes().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.OAuthRequirements parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.OAuthRequirements parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.OAuthRequirements parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.OAuthRequirements 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.api.OAuthRequirements parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.OAuthRequirements parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.OAuthRequirements parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.OAuthRequirements 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.api.OAuthRequirements parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.OAuthRequirements 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.api.OAuthRequirements parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.OAuthRequirements 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.api.OAuthRequirements 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; + } + /** + * + * + *
+   * OAuth scopes are a way to define data and permissions on data. For example,
+   * there are scopes defined for "Read-only access to Google Calendar" and
+   * "Access to Cloud Platform". Users can consent to a scope for an application,
+   * giving it permission to access that data on their behalf.
+   *
+   * OAuth scope specifications should be fairly coarse grained; a user will need
+   * to see and understand the text description of what your scope means.
+   *
+   * In most cases: use one or at most two OAuth scopes for an entire family of
+   * products. If your product has multiple APIs, you should probably be sharing
+   * the OAuth scope across all of those APIs.
+   *
+   * When you need finer grained OAuth consent screens: talk with your product
+   * management about how developers will use them in practice.
+   *
+   * Please note that even though each of the canonical scopes is enough for a
+   * request to be accepted and passed to the backend, a request can still fail
+   * due to the backend requiring additional scopes or permissions.
+   * 
+ * + * Protobuf type {@code google.api.OAuthRequirements} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.OAuthRequirements) + com.google.api.OAuthRequirementsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.AuthProto + .internal_static_google_api_OAuthRequirements_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.OAuthRequirements.class, + com.google.api.OAuthRequirements.Builder.class); + } + + // Construct using com.google.api.OAuthRequirements.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + canonicalScopes_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.AuthProto.internal_static_google_api_OAuthRequirements_descriptor; + } + + @java.lang.Override + public com.google.api.OAuthRequirements getDefaultInstanceForType() { + return com.google.api.OAuthRequirements.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.OAuthRequirements build() { + com.google.api.OAuthRequirements result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.OAuthRequirements buildPartial() { + com.google.api.OAuthRequirements result = new com.google.api.OAuthRequirements(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.OAuthRequirements result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.canonicalScopes_ = canonicalScopes_; + } + } + + @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.api.OAuthRequirements) { + return mergeFrom((com.google.api.OAuthRequirements) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.OAuthRequirements other) { + if (other == com.google.api.OAuthRequirements.getDefaultInstance()) return this; + if (!other.getCanonicalScopes().isEmpty()) { + canonicalScopes_ = other.canonicalScopes_; + 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: + { + canonicalScopes_ = 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 canonicalScopes_ = ""; + /** + * + * + *
+     * The list of publicly documented OAuth scopes that are allowed access. An
+     * OAuth token containing any of these scopes will be accepted.
+     *
+     * Example:
+     *
+     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+     *                        https://www.googleapis.com/auth/calendar.read
+     * 
+ * + * string canonical_scopes = 1; + * + * @return The canonicalScopes. + */ + public java.lang.String getCanonicalScopes() { + java.lang.Object ref = canonicalScopes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + canonicalScopes_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The list of publicly documented OAuth scopes that are allowed access. An
+     * OAuth token containing any of these scopes will be accepted.
+     *
+     * Example:
+     *
+     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+     *                        https://www.googleapis.com/auth/calendar.read
+     * 
+ * + * string canonical_scopes = 1; + * + * @return The bytes for canonicalScopes. + */ + public com.google.protobuf.ByteString getCanonicalScopesBytes() { + java.lang.Object ref = canonicalScopes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + canonicalScopes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The list of publicly documented OAuth scopes that are allowed access. An
+     * OAuth token containing any of these scopes will be accepted.
+     *
+     * Example:
+     *
+     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+     *                        https://www.googleapis.com/auth/calendar.read
+     * 
+ * + * string canonical_scopes = 1; + * + * @param value The canonicalScopes to set. + * @return This builder for chaining. + */ + public Builder setCanonicalScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + canonicalScopes_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of publicly documented OAuth scopes that are allowed access. An
+     * OAuth token containing any of these scopes will be accepted.
+     *
+     * Example:
+     *
+     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+     *                        https://www.googleapis.com/auth/calendar.read
+     * 
+ * + * string canonical_scopes = 1; + * + * @return This builder for chaining. + */ + public Builder clearCanonicalScopes() { + canonicalScopes_ = getDefaultInstance().getCanonicalScopes(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of publicly documented OAuth scopes that are allowed access. An
+     * OAuth token containing any of these scopes will be accepted.
+     *
+     * Example:
+     *
+     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+     *                        https://www.googleapis.com/auth/calendar.read
+     * 
+ * + * string canonical_scopes = 1; + * + * @param value The bytes for canonicalScopes to set. + * @return This builder for chaining. + */ + public Builder setCanonicalScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + canonicalScopes_ = 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.api.OAuthRequirements) + } + + // @@protoc_insertion_point(class_scope:google.api.OAuthRequirements) + private static final com.google.api.OAuthRequirements DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.OAuthRequirements(); + } + + public static com.google.api.OAuthRequirements getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OAuthRequirements 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.api.OAuthRequirements getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/OAuthRequirementsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/OAuthRequirementsOrBuilder.java new file mode 100644 index 000000000000..3d186fe403c7 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/OAuthRequirementsOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/auth.proto + +package com.google.api; + +public interface OAuthRequirementsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.OAuthRequirements) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of publicly documented OAuth scopes that are allowed access. An
+   * OAuth token containing any of these scopes will be accepted.
+   *
+   * Example:
+   *
+   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+   *                        https://www.googleapis.com/auth/calendar.read
+   * 
+ * + * string canonical_scopes = 1; + * + * @return The canonicalScopes. + */ + java.lang.String getCanonicalScopes(); + /** + * + * + *
+   * The list of publicly documented OAuth scopes that are allowed access. An
+   * OAuth token containing any of these scopes will be accepted.
+   *
+   * Example:
+   *
+   *      canonical_scopes: https://www.googleapis.com/auth/calendar,
+   *                        https://www.googleapis.com/auth/calendar.read
+   * 
+ * + * string canonical_scopes = 1; + * + * @return The bytes for canonicalScopes. + */ + com.google.protobuf.ByteString getCanonicalScopesBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Page.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Page.java new file mode 100644 index 000000000000..735f40d6ed63 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Page.java @@ -0,0 +1,1401 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +/** + * + * + *
+ * Represents a documentation page. A page can contain subpages to represent
+ * nested documentation set structure.
+ * 
+ * + * Protobuf type {@code google.api.Page} + */ +public final class Page extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Page) + PageOrBuilder { + private static final long serialVersionUID = 0L; + // Use Page.newBuilder() to construct. + private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Page() { + name_ = ""; + content_ = ""; + subpages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Page(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Page.class, com.google.api.Page.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The name of the page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   * <pre><code>pages:
+   * - name: Tutorial
+   *   content: &#40;== include tutorial.md ==&#41;
+   *   subpages:
+   *   - name: Java
+   *     content: &#40;== include tutorial_java.md ==&#41;
+   * </code></pre>
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+   * The name of the page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   * <pre><code>pages:
+   * - name: Tutorial
+   *   content: &#40;== include tutorial.md ==&#41;
+   *   subpages:
+   *   - name: Java
+   *     content: &#40;== include tutorial_java.md ==&#41;
+   * </code></pre>
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ * + * string name = 1; + * + * @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 CONTENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * + * + *
+   * The Markdown content of the page. You can use <code>&#40;== include {path}
+   * ==&#41;</code> to include content from a Markdown file. The content can be
+   * used to produce the documentation page such as HTML format page.
+   * 
+ * + * string content = 2; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + * + * + *
+   * The Markdown content of the page. You can use <code>&#40;== include {path}
+   * ==&#41;</code> to include content from a Markdown file. The content can be
+   * used to produce the documentation page such as HTML format page.
+   * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBPAGES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List subpages_; + /** + * + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ * + * repeated .google.api.Page subpages = 3; + */ + @java.lang.Override + public java.util.List getSubpagesList() { + return subpages_; + } + /** + * + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ * + * repeated .google.api.Page subpages = 3; + */ + @java.lang.Override + public java.util.List getSubpagesOrBuilderList() { + return subpages_; + } + /** + * + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ * + * repeated .google.api.Page subpages = 3; + */ + @java.lang.Override + public int getSubpagesCount() { + return subpages_.size(); + } + /** + * + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ * + * repeated .google.api.Page subpages = 3; + */ + @java.lang.Override + public com.google.api.Page getSubpages(int index) { + return subpages_.get(index); + } + /** + * + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ * + * repeated .google.api.Page subpages = 3; + */ + @java.lang.Override + public com.google.api.PageOrBuilder getSubpagesOrBuilder(int index) { + return subpages_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + for (int i = 0; i < subpages_.size(); i++) { + output.writeMessage(3, subpages_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + for (int i = 0; i < subpages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, subpages_.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.api.Page)) { + return super.equals(obj); + } + com.google.api.Page other = (com.google.api.Page) obj; + + if (!getName().equals(other.getName())) return false; + if (!getContent().equals(other.getContent())) return false; + if (!getSubpagesList().equals(other.getSubpagesList())) 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) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (getSubpagesCount() > 0) { + hash = (37 * hash) + SUBPAGES_FIELD_NUMBER; + hash = (53 * hash) + getSubpagesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Page parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Page parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Page parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Page 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.api.Page parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Page parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Page parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Page 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.api.Page parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Page 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.api.Page parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Page 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.api.Page 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 documentation page. A page can contain subpages to represent
+   * nested documentation set structure.
+   * 
+ * + * Protobuf type {@code google.api.Page} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Page) + com.google.api.PageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Page.class, com.google.api.Page.Builder.class); + } + + // Construct using com.google.api.Page.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + content_ = ""; + if (subpagesBuilder_ == null) { + subpages_ = java.util.Collections.emptyList(); + } else { + subpages_ = null; + subpagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; + } + + @java.lang.Override + public com.google.api.Page getDefaultInstanceForType() { + return com.google.api.Page.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Page build() { + com.google.api.Page result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Page buildPartial() { + com.google.api.Page result = new com.google.api.Page(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Page result) { + if (subpagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + subpages_ = java.util.Collections.unmodifiableList(subpages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.subpages_ = subpages_; + } else { + result.subpages_ = subpagesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Page result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + } + + @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.api.Page) { + return mergeFrom((com.google.api.Page) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Page other) { + if (other == com.google.api.Page.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (subpagesBuilder_ == null) { + if (!other.subpages_.isEmpty()) { + if (subpages_.isEmpty()) { + subpages_ = other.subpages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSubpagesIsMutable(); + subpages_.addAll(other.subpages_); + } + onChanged(); + } + } else { + if (!other.subpages_.isEmpty()) { + if (subpagesBuilder_.isEmpty()) { + subpagesBuilder_.dispose(); + subpagesBuilder_ = null; + subpages_ = other.subpages_; + bitField0_ = (bitField0_ & ~0x00000004); + subpagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSubpagesFieldBuilder() + : null; + } else { + subpagesBuilder_.addAllMessages(other.subpages_); + } + } + } + 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: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.api.Page m = + input.readMessage(com.google.api.Page.parser(), extensionRegistry); + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.add(m); + } else { + subpagesBuilder_.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 name_ = ""; + /** + * + * + *
+     * The name of the page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     * <pre><code>pages:
+     * - name: Tutorial
+     *   content: &#40;== include tutorial.md ==&#41;
+     *   subpages:
+     *   - name: Java
+     *     content: &#40;== include tutorial_java.md ==&#41;
+     * </code></pre>
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The name of the page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     * <pre><code>pages:
+     * - name: Tutorial
+     *   content: &#40;== include tutorial.md ==&#41;
+     *   subpages:
+     *   - name: Java
+     *     content: &#40;== include tutorial_java.md ==&#41;
+     * </code></pre>
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The name of the page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     * <pre><code>pages:
+     * - name: Tutorial
+     *   content: &#40;== include tutorial.md ==&#41;
+     *   subpages:
+     *   - name: Java
+     *     content: &#40;== include tutorial_java.md ==&#41;
+     * </code></pre>
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+     * The name of the page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     * <pre><code>pages:
+     * - name: Tutorial
+     *   content: &#40;== include tutorial.md ==&#41;
+     *   subpages:
+     *   - name: Java
+     *     content: &#40;== include tutorial_java.md ==&#41;
+     * </code></pre>
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the page. It will be used as an identity of the page to
+     * generate URI of the page, text of the link to this page in navigation,
+     * etc. The full page name (start from the root page name to this page
+     * concatenated with `.`) can be used as reference to the page in your
+     * documentation. For example:
+     * <pre><code>pages:
+     * - name: Tutorial
+     *   content: &#40;== include tutorial.md ==&#41;
+     *   subpages:
+     *   - name: Java
+     *     content: &#40;== include tutorial_java.md ==&#41;
+     * </code></pre>
+     * You can reference `Java` page using Markdown reference link syntax:
+     * `[Java][Tutorial.Java]`.
+     * 
+ * + * string name = 1; + * + * @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 content_ = ""; + /** + * + * + *
+     * The Markdown content of the page. You can use <code>&#40;== include {path}
+     * ==&#41;</code> to include content from a Markdown file. The content can be
+     * used to produce the documentation page such as HTML format page.
+     * 
+ * + * string content = 2; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Markdown content of the page. You can use <code>&#40;== include {path}
+     * ==&#41;</code> to include content from a Markdown file. The content can be
+     * used to produce the documentation page such as HTML format page.
+     * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Markdown content of the page. You can use <code>&#40;== include {path}
+     * ==&#41;</code> to include content from a Markdown file. The content can be
+     * used to produce the documentation page such as HTML format page.
+     * 
+ * + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The Markdown content of the page. You can use <code>&#40;== include {path}
+     * ==&#41;</code> to include content from a Markdown file. The content can be
+     * used to produce the documentation page such as HTML format page.
+     * 
+ * + * string content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The Markdown content of the page. You can use <code>&#40;== include {path}
+     * ==&#41;</code> to include content from a Markdown file. The content can be
+     * used to produce the documentation page such as HTML format page.
+     * 
+ * + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List subpages_ = java.util.Collections.emptyList(); + + private void ensureSubpagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + subpages_ = new java.util.ArrayList(subpages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> + subpagesBuilder_; + + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public java.util.List getSubpagesList() { + if (subpagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(subpages_); + } else { + return subpagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public int getSubpagesCount() { + if (subpagesBuilder_ == null) { + return subpages_.size(); + } else { + return subpagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public com.google.api.Page getSubpages(int index) { + if (subpagesBuilder_ == null) { + return subpages_.get(index); + } else { + return subpagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public Builder setSubpages(int index, com.google.api.Page value) { + if (subpagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpagesIsMutable(); + subpages_.set(index, value); + onChanged(); + } else { + subpagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public Builder setSubpages(int index, com.google.api.Page.Builder builderForValue) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.set(index, builderForValue.build()); + onChanged(); + } else { + subpagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public Builder addSubpages(com.google.api.Page value) { + if (subpagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpagesIsMutable(); + subpages_.add(value); + onChanged(); + } else { + subpagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public Builder addSubpages(int index, com.google.api.Page value) { + if (subpagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubpagesIsMutable(); + subpages_.add(index, value); + onChanged(); + } else { + subpagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public Builder addSubpages(com.google.api.Page.Builder builderForValue) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.add(builderForValue.build()); + onChanged(); + } else { + subpagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public Builder addSubpages(int index, com.google.api.Page.Builder builderForValue) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.add(index, builderForValue.build()); + onChanged(); + } else { + subpagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public Builder addAllSubpages(java.lang.Iterable values) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subpages_); + onChanged(); + } else { + subpagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public Builder clearSubpages() { + if (subpagesBuilder_ == null) { + subpages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + subpagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public Builder removeSubpages(int index) { + if (subpagesBuilder_ == null) { + ensureSubpagesIsMutable(); + subpages_.remove(index); + onChanged(); + } else { + subpagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public com.google.api.Page.Builder getSubpagesBuilder(int index) { + return getSubpagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public com.google.api.PageOrBuilder getSubpagesOrBuilder(int index) { + if (subpagesBuilder_ == null) { + return subpages_.get(index); + } else { + return subpagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public java.util.List getSubpagesOrBuilderList() { + if (subpagesBuilder_ != null) { + return subpagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subpages_); + } + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public com.google.api.Page.Builder addSubpagesBuilder() { + return getSubpagesFieldBuilder().addBuilder(com.google.api.Page.getDefaultInstance()); + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public com.google.api.Page.Builder addSubpagesBuilder(int index) { + return getSubpagesFieldBuilder().addBuilder(index, com.google.api.Page.getDefaultInstance()); + } + /** + * + * + *
+     * Subpages of this page. The order of subpages specified here will be
+     * honored in the generated docset.
+     * 
+ * + * repeated .google.api.Page subpages = 3; + */ + public java.util.List getSubpagesBuilderList() { + return getSubpagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> + getSubpagesFieldBuilder() { + if (subpagesBuilder_ == null) { + subpagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder>( + subpages_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + subpages_ = null; + } + return subpagesBuilder_; + } + + @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.api.Page) + } + + // @@protoc_insertion_point(class_scope:google.api.Page) + private static final com.google.api.Page DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Page(); + } + + public static com.google.api.Page getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Page 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.api.Page getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PageOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PageOrBuilder.java new file mode 100644 index 000000000000..f21ff4033607 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PageOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/documentation.proto + +package com.google.api; + +public interface PageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Page) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   * <pre><code>pages:
+   * - name: Tutorial
+   *   content: &#40;== include tutorial.md ==&#41;
+   *   subpages:
+   *   - name: Java
+   *     content: &#40;== include tutorial_java.md ==&#41;
+   * </code></pre>
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of the page. It will be used as an identity of the page to
+   * generate URI of the page, text of the link to this page in navigation,
+   * etc. The full page name (start from the root page name to this page
+   * concatenated with `.`) can be used as reference to the page in your
+   * documentation. For example:
+   * <pre><code>pages:
+   * - name: Tutorial
+   *   content: &#40;== include tutorial.md ==&#41;
+   *   subpages:
+   *   - name: Java
+   *     content: &#40;== include tutorial_java.md ==&#41;
+   * </code></pre>
+   * You can reference `Java` page using Markdown reference link syntax:
+   * `[Java][Tutorial.Java]`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The Markdown content of the page. You can use <code>&#40;== include {path}
+   * ==&#41;</code> to include content from a Markdown file. The content can be
+   * used to produce the documentation page such as HTML format page.
+   * 
+ * + * string content = 2; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * The Markdown content of the page. You can use <code>&#40;== include {path}
+   * ==&#41;</code> to include content from a Markdown file. The content can be
+   * used to produce the documentation page such as HTML format page.
+   * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ * + * repeated .google.api.Page subpages = 3; + */ + java.util.List getSubpagesList(); + /** + * + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ * + * repeated .google.api.Page subpages = 3; + */ + com.google.api.Page getSubpages(int index); + /** + * + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ * + * repeated .google.api.Page subpages = 3; + */ + int getSubpagesCount(); + /** + * + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ * + * repeated .google.api.Page subpages = 3; + */ + java.util.List getSubpagesOrBuilderList(); + /** + * + * + *
+   * Subpages of this page. The order of subpages specified here will be
+   * honored in the generated docset.
+   * 
+ * + * repeated .google.api.Page subpages = 3; + */ + com.google.api.PageOrBuilder getSubpagesOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PhpSettings.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PhpSettings.java new file mode 100644 index 000000000000..9493b3e8c61f --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PhpSettings.java @@ -0,0 +1,690 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * Settings for Php client libraries.
+ * 
+ * + * Protobuf type {@code google.api.PhpSettings} + */ +public final class PhpSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.PhpSettings) + PhpSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use PhpSettings.newBuilder() to construct. + private PhpSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PhpSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PhpSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_PhpSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_PhpSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.PhpSettings.class, com.google.api.PhpSettings.Builder.class); + } + + public static final int COMMON_FIELD_NUMBER = 1; + private com.google.api.CommonLanguageSettings common_; + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + @java.lang.Override + public com.google.api.CommonLanguageSettings getCommon() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + @java.lang.Override + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + + 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 (common_ != null) { + output.writeMessage(1, getCommon()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommon()); + } + 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.api.PhpSettings)) { + return super.equals(obj); + } + com.google.api.PhpSettings other = (com.google.api.PhpSettings) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon().equals(other.getCommon())) 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 (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.PhpSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.PhpSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.PhpSettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.PhpSettings 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.api.PhpSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.PhpSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.PhpSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.PhpSettings 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.api.PhpSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.PhpSettings 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.api.PhpSettings parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.PhpSettings 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.api.PhpSettings 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; + } + /** + * + * + *
+   * Settings for Php client libraries.
+   * 
+ * + * Protobuf type {@code google.api.PhpSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.PhpSettings) + com.google.api.PhpSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_PhpSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_PhpSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.PhpSettings.class, com.google.api.PhpSettings.Builder.class); + } + + // Construct using com.google.api.PhpSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto.internal_static_google_api_PhpSettings_descriptor; + } + + @java.lang.Override + public com.google.api.PhpSettings getDefaultInstanceForType() { + return com.google.api.PhpSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.PhpSettings build() { + com.google.api.PhpSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.PhpSettings buildPartial() { + com.google.api.PhpSettings result = new com.google.api.PhpSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.PhpSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null ? common_ : commonBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.PhpSettings) { + return mergeFrom((com.google.api.PhpSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.PhpSettings other) { + if (other == com.google.api.PhpSettings.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + 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(getCommonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.api.CommonLanguageSettings common_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + commonBuilder_; + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + public com.google.api.CommonLanguageSettings getCommon() { + if (commonBuilder_ == null) { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder mergeCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && common_ != null + && common_ != com.google.api.CommonLanguageSettings.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettings.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder>( + getCommon(), getParentForChildren(), isClean()); + common_ = null; + } + return commonBuilder_; + } + + @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.api.PhpSettings) + } + + // @@protoc_insertion_point(class_scope:google.api.PhpSettings) + private static final com.google.api.PhpSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.PhpSettings(); + } + + public static com.google.api.PhpSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PhpSettings 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.api.PhpSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PhpSettingsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PhpSettingsOrBuilder.java new file mode 100644 index 000000000000..3f15262efd37 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PhpSettingsOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface PhpSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.PhpSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + com.google.api.CommonLanguageSettings getCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PolicyProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PolicyProto.java new file mode 100644 index 000000000000..70de12eaf683 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PolicyProto.java @@ -0,0 +1,123 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/policy.proto + +package com.google.api; + +public final class PolicyProto { + private PolicyProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.google.api.PolicyProto.fieldPolicy); + registry.add(com.google.api.PolicyProto.methodPolicy); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static final int FIELD_POLICY_FIELD_NUMBER = 158361448; + /** + * + * + *
+   * See [FieldPolicy][].
+   * 
+ * + * extend .google.protobuf.FieldOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, com.google.api.FieldPolicy> + fieldPolicy = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + com.google.api.FieldPolicy.class, com.google.api.FieldPolicy.getDefaultInstance()); + + public static final int METHOD_POLICY_FIELD_NUMBER = 161893301; + /** + * + * + *
+   * See [MethodPolicy][].
+   * 
+ * + * extend .google.protobuf.MethodOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, com.google.api.MethodPolicy> + methodPolicy = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + com.google.api.MethodPolicy.class, com.google.api.MethodPolicy.getDefaultInstance()); + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_FieldPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_FieldPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MethodPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MethodPolicy_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\027google/api/policy.proto\022\ngoogle.api\032 g" + + "oogle/protobuf/descriptor.proto\"S\n\013Field" + + "Policy\022\020\n\010selector\030\001 \001(\t\022\033\n\023resource_per" + + "mission\030\002 \001(\t\022\025\n\rresource_type\030\003 \001(\t\"S\n\014" + + "MethodPolicy\022\020\n\010selector\030\t \001(\t\0221\n\020reques" + + "t_policies\030\002 \003(\0132\027.google.api.FieldPolic" + + "y:O\n\014field_policy\022\035.google.protobuf.Fiel" + + "dOptions\030\350\316\301K \001(\0132\027.google.api.FieldPoli" + + "cy:R\n\rmethod_policy\022\036.google.protobuf.Me" + + "thodOptions\030\265\227\231M \001(\0132\030.google.api.Method" + + "PolicyBp\n\016com.google.apiB\013PolicyProtoP\001Z" + + "Egoogle.golang.org/genproto/googleapis/a" + + "pi/serviceconfig;serviceconfig\370\001\001\242\002\004GAPI" + + "b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.DescriptorProtos.getDescriptor(), + }); + internal_static_google_api_FieldPolicy_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_FieldPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_FieldPolicy_descriptor, + new java.lang.String[] { + "Selector", "ResourcePermission", "ResourceType", + }); + internal_static_google_api_MethodPolicy_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_api_MethodPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MethodPolicy_descriptor, + new java.lang.String[] { + "Selector", "RequestPolicies", + }); + fieldPolicy.internalInit(descriptor.getExtensions().get(0)); + methodPolicy.internalInit(descriptor.getExtensions().get(1)); + com.google.protobuf.DescriptorProtos.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ProjectProperties.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ProjectProperties.java new file mode 100644 index 000000000000..6bd5b322e72c --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ProjectProperties.java @@ -0,0 +1,947 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/consumer.proto + +package com.google.api; + +/** + * + * + *
+ * A descriptor for defining project properties for a service. One service may
+ * have many consumer projects, and the service may want to behave differently
+ * depending on some properties on the project. For example, a project may be
+ * associated with a school, or a business, or a government agency, a business
+ * type property on the project may affect how a service responds to the client.
+ * This descriptor defines which properties are allowed to be set on a project.
+ *
+ * Example:
+ *
+ *    project_properties:
+ *      properties:
+ *      - name: NO_WATERMARK
+ *        type: BOOL
+ *        description: Allows usage of the API without watermarks.
+ *      - name: EXTENDED_TILE_CACHE_PERIOD
+ *        type: INT64
+ * 
+ * + * Protobuf type {@code google.api.ProjectProperties} + */ +public final class ProjectProperties extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.ProjectProperties) + ProjectPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProjectProperties.newBuilder() to construct. + private ProjectProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProjectProperties() { + properties_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProjectProperties(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ConsumerProto.internal_static_google_api_ProjectProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ConsumerProto + .internal_static_google_api_ProjectProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ProjectProperties.class, com.google.api.ProjectProperties.Builder.class); + } + + public static final int PROPERTIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List properties_; + /** + * + * + *
+   * List of per consumer project-specific properties.
+   * 
+ * + * repeated .google.api.Property properties = 1; + */ + @java.lang.Override + public java.util.List getPropertiesList() { + return properties_; + } + /** + * + * + *
+   * List of per consumer project-specific properties.
+   * 
+ * + * repeated .google.api.Property properties = 1; + */ + @java.lang.Override + public java.util.List getPropertiesOrBuilderList() { + return properties_; + } + /** + * + * + *
+   * List of per consumer project-specific properties.
+   * 
+ * + * repeated .google.api.Property properties = 1; + */ + @java.lang.Override + public int getPropertiesCount() { + return properties_.size(); + } + /** + * + * + *
+   * List of per consumer project-specific properties.
+   * 
+ * + * repeated .google.api.Property properties = 1; + */ + @java.lang.Override + public com.google.api.Property getProperties(int index) { + return properties_.get(index); + } + /** + * + * + *
+   * List of per consumer project-specific properties.
+   * 
+ * + * repeated .google.api.Property properties = 1; + */ + @java.lang.Override + public com.google.api.PropertyOrBuilder getPropertiesOrBuilder(int index) { + return properties_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < properties_.size(); i++) { + output.writeMessage(1, properties_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < properties_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, properties_.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.api.ProjectProperties)) { + return super.equals(obj); + } + com.google.api.ProjectProperties other = (com.google.api.ProjectProperties) obj; + + if (!getPropertiesList().equals(other.getPropertiesList())) 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 (getPropertiesCount() > 0) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertiesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.ProjectProperties parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ProjectProperties parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.ProjectProperties parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ProjectProperties 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.api.ProjectProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.ProjectProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.ProjectProperties parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.ProjectProperties 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.api.ProjectProperties parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.ProjectProperties 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.api.ProjectProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.ProjectProperties 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.api.ProjectProperties 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 descriptor for defining project properties for a service. One service may
+   * have many consumer projects, and the service may want to behave differently
+   * depending on some properties on the project. For example, a project may be
+   * associated with a school, or a business, or a government agency, a business
+   * type property on the project may affect how a service responds to the client.
+   * This descriptor defines which properties are allowed to be set on a project.
+   *
+   * Example:
+   *
+   *    project_properties:
+   *      properties:
+   *      - name: NO_WATERMARK
+   *        type: BOOL
+   *        description: Allows usage of the API without watermarks.
+   *      - name: EXTENDED_TILE_CACHE_PERIOD
+   *        type: INT64
+   * 
+ * + * Protobuf type {@code google.api.ProjectProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.ProjectProperties) + com.google.api.ProjectPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ConsumerProto.internal_static_google_api_ProjectProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ConsumerProto + .internal_static_google_api_ProjectProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ProjectProperties.class, + com.google.api.ProjectProperties.Builder.class); + } + + // Construct using com.google.api.ProjectProperties.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + } else { + properties_ = null; + propertiesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ConsumerProto.internal_static_google_api_ProjectProperties_descriptor; + } + + @java.lang.Override + public com.google.api.ProjectProperties getDefaultInstanceForType() { + return com.google.api.ProjectProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.ProjectProperties build() { + com.google.api.ProjectProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.ProjectProperties buildPartial() { + com.google.api.ProjectProperties result = new com.google.api.ProjectProperties(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.ProjectProperties result) { + if (propertiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + properties_ = java.util.Collections.unmodifiableList(properties_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.properties_ = properties_; + } else { + result.properties_ = propertiesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.ProjectProperties result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.ProjectProperties) { + return mergeFrom((com.google.api.ProjectProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.ProjectProperties other) { + if (other == com.google.api.ProjectProperties.getDefaultInstance()) return this; + if (propertiesBuilder_ == null) { + if (!other.properties_.isEmpty()) { + if (properties_.isEmpty()) { + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePropertiesIsMutable(); + properties_.addAll(other.properties_); + } + onChanged(); + } + } else { + if (!other.properties_.isEmpty()) { + if (propertiesBuilder_.isEmpty()) { + propertiesBuilder_.dispose(); + propertiesBuilder_ = null; + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000001); + propertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPropertiesFieldBuilder() + : null; + } else { + propertiesBuilder_.addAllMessages(other.properties_); + } + } + } + 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.api.Property m = + input.readMessage(com.google.api.Property.parser(), extensionRegistry); + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(m); + } else { + propertiesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List properties_ = java.util.Collections.emptyList(); + + private void ensurePropertiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + properties_ = new java.util.ArrayList(properties_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Property, + com.google.api.Property.Builder, + com.google.api.PropertyOrBuilder> + propertiesBuilder_; + + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public java.util.List getPropertiesList() { + if (propertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(properties_); + } else { + return propertiesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public int getPropertiesCount() { + if (propertiesBuilder_ == null) { + return properties_.size(); + } else { + return propertiesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public com.google.api.Property getProperties(int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public Builder setProperties(int index, com.google.api.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.set(index, value); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public Builder setProperties(int index, com.google.api.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.set(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public Builder addProperties(com.google.api.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(value); + onChanged(); + } else { + propertiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public Builder addProperties(int index, com.google.api.Property value) { + if (propertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(index, value); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public Builder addProperties(com.google.api.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public Builder addProperties(int index, com.google.api.Property.Builder builderForValue) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.add(index, builderForValue.build()); + onChanged(); + } else { + propertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public Builder addAllProperties(java.lang.Iterable values) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, properties_); + onChanged(); + } else { + propertiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public Builder clearProperties() { + if (propertiesBuilder_ == null) { + properties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + propertiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public Builder removeProperties(int index) { + if (propertiesBuilder_ == null) { + ensurePropertiesIsMutable(); + properties_.remove(index); + onChanged(); + } else { + propertiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public com.google.api.Property.Builder getPropertiesBuilder(int index) { + return getPropertiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public com.google.api.PropertyOrBuilder getPropertiesOrBuilder(int index) { + if (propertiesBuilder_ == null) { + return properties_.get(index); + } else { + return propertiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public java.util.List getPropertiesOrBuilderList() { + if (propertiesBuilder_ != null) { + return propertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(properties_); + } + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public com.google.api.Property.Builder addPropertiesBuilder() { + return getPropertiesFieldBuilder().addBuilder(com.google.api.Property.getDefaultInstance()); + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public com.google.api.Property.Builder addPropertiesBuilder(int index) { + return getPropertiesFieldBuilder() + .addBuilder(index, com.google.api.Property.getDefaultInstance()); + } + /** + * + * + *
+     * List of per consumer project-specific properties.
+     * 
+ * + * repeated .google.api.Property properties = 1; + */ + public java.util.List getPropertiesBuilderList() { + return getPropertiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Property, + com.google.api.Property.Builder, + com.google.api.PropertyOrBuilder> + getPropertiesFieldBuilder() { + if (propertiesBuilder_ == null) { + propertiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Property, + com.google.api.Property.Builder, + com.google.api.PropertyOrBuilder>( + properties_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + properties_ = null; + } + return propertiesBuilder_; + } + + @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.api.ProjectProperties) + } + + // @@protoc_insertion_point(class_scope:google.api.ProjectProperties) + private static final com.google.api.ProjectProperties DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.ProjectProperties(); + } + + public static com.google.api.ProjectProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProjectProperties 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.api.ProjectProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ProjectPropertiesOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ProjectPropertiesOrBuilder.java new file mode 100644 index 000000000000..a6d69773fe13 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ProjectPropertiesOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/consumer.proto + +package com.google.api; + +public interface ProjectPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.ProjectProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of per consumer project-specific properties.
+   * 
+ * + * repeated .google.api.Property properties = 1; + */ + java.util.List getPropertiesList(); + /** + * + * + *
+   * List of per consumer project-specific properties.
+   * 
+ * + * repeated .google.api.Property properties = 1; + */ + com.google.api.Property getProperties(int index); + /** + * + * + *
+   * List of per consumer project-specific properties.
+   * 
+ * + * repeated .google.api.Property properties = 1; + */ + int getPropertiesCount(); + /** + * + * + *
+   * List of per consumer project-specific properties.
+   * 
+ * + * repeated .google.api.Property properties = 1; + */ + java.util.List getPropertiesOrBuilderList(); + /** + * + * + *
+   * List of per consumer project-specific properties.
+   * 
+ * + * repeated .google.api.Property properties = 1; + */ + com.google.api.PropertyOrBuilder getPropertiesOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Property.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Property.java new file mode 100644 index 000000000000..6367281f7cfa --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Property.java @@ -0,0 +1,1162 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/consumer.proto + +package com.google.api; + +/** + * + * + *
+ * Defines project properties.
+ *
+ * API services can define properties that can be assigned to consumer projects
+ * so that backends can perform response customization without having to make
+ * additional calls or maintain additional storage. For example, Maps API
+ * defines properties that controls map tile cache period, or whether to embed a
+ * watermark in a result.
+ *
+ * These values can be set via API producer console. Only API providers can
+ * define and set these properties.
+ * 
+ * + * Protobuf type {@code google.api.Property} + */ +public final class Property extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Property) + PropertyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Property.newBuilder() to construct. + private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Property() { + name_ = ""; + type_ = 0; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Property(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ConsumerProto.internal_static_google_api_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ConsumerProto.internal_static_google_api_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Property.class, com.google.api.Property.Builder.class); + } + + /** + * + * + *
+   * Supported data type of the property values
+   * 
+ * + * Protobuf enum {@code google.api.Property.PropertyType} + */ + public enum PropertyType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The type is unspecified, and will result in an error.
+     * 
+ * + * UNSPECIFIED = 0; + */ + UNSPECIFIED(0), + /** + * + * + *
+     * The type is `int64`.
+     * 
+ * + * INT64 = 1; + */ + INT64(1), + /** + * + * + *
+     * The type is `bool`.
+     * 
+ * + * BOOL = 2; + */ + BOOL(2), + /** + * + * + *
+     * The type is `string`.
+     * 
+ * + * STRING = 3; + */ + STRING(3), + /** + * + * + *
+     * The type is 'double'.
+     * 
+ * + * DOUBLE = 4; + */ + DOUBLE(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The type is unspecified, and will result in an error.
+     * 
+ * + * UNSPECIFIED = 0; + */ + public static final int UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The type is `int64`.
+     * 
+ * + * INT64 = 1; + */ + public static final int INT64_VALUE = 1; + /** + * + * + *
+     * The type is `bool`.
+     * 
+ * + * BOOL = 2; + */ + public static final int BOOL_VALUE = 2; + /** + * + * + *
+     * The type is `string`.
+     * 
+ * + * STRING = 3; + */ + public static final int STRING_VALUE = 3; + /** + * + * + *
+     * The type is 'double'.
+     * 
+ * + * DOUBLE = 4; + */ + public static final int DOUBLE_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 PropertyType 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 PropertyType forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED; + case 1: + return INT64; + case 2: + return BOOL; + case 3: + return STRING; + case 4: + return DOUBLE; + 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 PropertyType findValueByNumber(int number) { + return PropertyType.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.api.Property.getDescriptor().getEnumTypes().get(0); + } + + private static final PropertyType[] VALUES = values(); + + public static PropertyType 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 PropertyType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.Property.PropertyType) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The name of the property (a.k.a key).
+   * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+   * The name of the property (a.k.a key).
+   * 
+ * + * string name = 1; + * + * @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 TYPE_FIELD_NUMBER = 2; + private int type_ = 0; + /** + * + * + *
+   * The type of this property.
+   * 
+ * + * .google.api.Property.PropertyType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * The type of this property.
+   * 
+ * + * .google.api.Property.PropertyType type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.api.Property.PropertyType getType() { + com.google.api.Property.PropertyType result = + com.google.api.Property.PropertyType.forNumber(type_); + return result == null ? com.google.api.Property.PropertyType.UNRECOGNIZED : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The description of the property
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the property
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ != com.google.api.Property.PropertyType.UNSPECIFIED.getNumber()) { + output.writeEnum(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + 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 (type_ != com.google.api.Property.PropertyType.UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.Property)) { + return super.equals(obj); + } + com.google.api.Property other = (com.google.api.Property) obj; + + if (!getName().equals(other.getName())) return false; + if (type_ != other.type_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Property parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Property parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Property parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Property 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.api.Property parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Property parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Property parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Property 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.api.Property parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Property 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.api.Property parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Property 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.api.Property 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; + } + /** + * + * + *
+   * Defines project properties.
+   *
+   * API services can define properties that can be assigned to consumer projects
+   * so that backends can perform response customization without having to make
+   * additional calls or maintain additional storage. For example, Maps API
+   * defines properties that controls map tile cache period, or whether to embed a
+   * watermark in a result.
+   *
+   * These values can be set via API producer console. Only API providers can
+   * define and set these properties.
+   * 
+ * + * Protobuf type {@code google.api.Property} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Property) + com.google.api.PropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ConsumerProto.internal_static_google_api_Property_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ConsumerProto.internal_static_google_api_Property_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Property.class, com.google.api.Property.Builder.class); + } + + // Construct using com.google.api.Property.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = 0; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ConsumerProto.internal_static_google_api_Property_descriptor; + } + + @java.lang.Override + public com.google.api.Property getDefaultInstanceForType() { + return com.google.api.Property.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Property build() { + com.google.api.Property result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Property buildPartial() { + com.google.api.Property result = new com.google.api.Property(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.Property result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + } + + @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.api.Property) { + return mergeFrom((com.google.api.Property) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Property other) { + if (other == com.google.api.Property.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the property (a.k.a key).
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The name of the property (a.k.a key).
+     * 
+ * + * string name = 1; + * + * @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; + } + } + /** + * + * + *
+     * The name of the property (a.k.a key).
+     * 
+ * + * string name = 1; + * + * @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; + } + /** + * + * + *
+     * The name of the property (a.k.a key).
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the property (a.k.a key).
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * The type of this property.
+     * 
+ * + * .google.api.Property.PropertyType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The type of this property.
+     * 
+ * + * .google.api.Property.PropertyType type = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of this property.
+     * 
+ * + * .google.api.Property.PropertyType type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.api.Property.PropertyType getType() { + com.google.api.Property.PropertyType result = + com.google.api.Property.PropertyType.forNumber(type_); + return result == null ? com.google.api.Property.PropertyType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The type of this property.
+     * 
+ * + * .google.api.Property.PropertyType type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.api.Property.PropertyType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of this property.
+     * 
+ * + * .google.api.Property.PropertyType type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the property
+     * 
+ * + * string description = 3; + * + * @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; + } + } + /** + * + * + *
+     * The description of the property
+     * 
+ * + * string description = 3; + * + * @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; + } + } + /** + * + * + *
+     * The description of the property
+     * 
+ * + * string description = 3; + * + * @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; + } + /** + * + * + *
+     * The description of the property
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the property
+     * 
+ * + * string description = 3; + * + * @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; + } + + @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.api.Property) + } + + // @@protoc_insertion_point(class_scope:google.api.Property) + private static final com.google.api.Property DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Property(); + } + + public static com.google.api.Property getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Property 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.api.Property getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PropertyOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PropertyOrBuilder.java new file mode 100644 index 000000000000..09442a3c1396 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PropertyOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/consumer.proto + +package com.google.api; + +public interface PropertyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Property) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the property (a.k.a key).
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of the property (a.k.a key).
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The type of this property.
+   * 
+ * + * .google.api.Property.PropertyType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * The type of this property.
+   * 
+ * + * .google.api.Property.PropertyType type = 2; + * + * @return The type. + */ + com.google.api.Property.PropertyType getType(); + + /** + * + * + *
+   * The description of the property
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the property
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Publishing.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Publishing.java new file mode 100644 index 000000000000..008ca4deefe5 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Publishing.java @@ -0,0 +1,3072 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * This message configures the settings for publishing [Google Cloud Client
+ * libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
+ * generated from the service config.
+ * 
+ * + * Protobuf type {@code google.api.Publishing} + */ +public final class Publishing extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Publishing) + PublishingOrBuilder { + private static final long serialVersionUID = 0L; + // Use Publishing.newBuilder() to construct. + private Publishing(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Publishing() { + methodSettings_ = java.util.Collections.emptyList(); + newIssueUri_ = ""; + documentationUri_ = ""; + apiShortName_ = ""; + githubLabel_ = ""; + codeownerGithubTeams_ = com.google.protobuf.LazyStringArrayList.emptyList(); + docTagPrefix_ = ""; + organization_ = 0; + librarySettings_ = java.util.Collections.emptyList(); + protoReferenceDocumentationUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Publishing(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_Publishing_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_Publishing_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Publishing.class, com.google.api.Publishing.Builder.class); + } + + public static final int METHOD_SETTINGS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List methodSettings_; + /** + * + * + *
+   * A list of API method settings, e.g. the behavior for methods that use the
+   * long-running operation pattern.
+   * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + @java.lang.Override + public java.util.List getMethodSettingsList() { + return methodSettings_; + } + /** + * + * + *
+   * A list of API method settings, e.g. the behavior for methods that use the
+   * long-running operation pattern.
+   * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + @java.lang.Override + public java.util.List + getMethodSettingsOrBuilderList() { + return methodSettings_; + } + /** + * + * + *
+   * A list of API method settings, e.g. the behavior for methods that use the
+   * long-running operation pattern.
+   * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + @java.lang.Override + public int getMethodSettingsCount() { + return methodSettings_.size(); + } + /** + * + * + *
+   * A list of API method settings, e.g. the behavior for methods that use the
+   * long-running operation pattern.
+   * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + @java.lang.Override + public com.google.api.MethodSettings getMethodSettings(int index) { + return methodSettings_.get(index); + } + /** + * + * + *
+   * A list of API method settings, e.g. the behavior for methods that use the
+   * long-running operation pattern.
+   * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + @java.lang.Override + public com.google.api.MethodSettingsOrBuilder getMethodSettingsOrBuilder(int index) { + return methodSettings_.get(index); + } + + public static final int NEW_ISSUE_URI_FIELD_NUMBER = 101; + + @SuppressWarnings("serial") + private volatile java.lang.Object newIssueUri_ = ""; + /** + * + * + *
+   * Link to a *public* URI where users can report issues.  Example:
+   * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+   * 
+ * + * string new_issue_uri = 101; + * + * @return The newIssueUri. + */ + @java.lang.Override + public java.lang.String getNewIssueUri() { + java.lang.Object ref = newIssueUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newIssueUri_ = s; + return s; + } + } + /** + * + * + *
+   * Link to a *public* URI where users can report issues.  Example:
+   * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+   * 
+ * + * string new_issue_uri = 101; + * + * @return The bytes for newIssueUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNewIssueUriBytes() { + java.lang.Object ref = newIssueUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newIssueUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENTATION_URI_FIELD_NUMBER = 102; + + @SuppressWarnings("serial") + private volatile java.lang.Object documentationUri_ = ""; + /** + * + * + *
+   * Link to product home page.  Example:
+   * https://cloud.google.com/asset-inventory/docs/overview
+   * 
+ * + * string documentation_uri = 102; + * + * @return The documentationUri. + */ + @java.lang.Override + public java.lang.String getDocumentationUri() { + java.lang.Object ref = documentationUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + documentationUri_ = s; + return s; + } + } + /** + * + * + *
+   * Link to product home page.  Example:
+   * https://cloud.google.com/asset-inventory/docs/overview
+   * 
+ * + * string documentation_uri = 102; + * + * @return The bytes for documentationUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentationUriBytes() { + java.lang.Object ref = documentationUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + documentationUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int API_SHORT_NAME_FIELD_NUMBER = 103; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiShortName_ = ""; + /** + * + * + *
+   * Used as a tracking tag when collecting data about the APIs developer
+   * relations artifacts like docs, packages delivered to package managers,
+   * etc.  Example: "speech".
+   * 
+ * + * string api_short_name = 103; + * + * @return The apiShortName. + */ + @java.lang.Override + public java.lang.String getApiShortName() { + java.lang.Object ref = apiShortName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiShortName_ = s; + return s; + } + } + /** + * + * + *
+   * Used as a tracking tag when collecting data about the APIs developer
+   * relations artifacts like docs, packages delivered to package managers,
+   * etc.  Example: "speech".
+   * 
+ * + * string api_short_name = 103; + * + * @return The bytes for apiShortName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiShortNameBytes() { + java.lang.Object ref = apiShortName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GITHUB_LABEL_FIELD_NUMBER = 104; + + @SuppressWarnings("serial") + private volatile java.lang.Object githubLabel_ = ""; + /** + * + * + *
+   * GitHub label to apply to issues and pull requests opened for this API.
+   * 
+ * + * string github_label = 104; + * + * @return The githubLabel. + */ + @java.lang.Override + public java.lang.String getGithubLabel() { + java.lang.Object ref = githubLabel_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + githubLabel_ = s; + return s; + } + } + /** + * + * + *
+   * GitHub label to apply to issues and pull requests opened for this API.
+   * 
+ * + * string github_label = 104; + * + * @return The bytes for githubLabel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGithubLabelBytes() { + java.lang.Object ref = githubLabel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + githubLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODEOWNER_GITHUB_TEAMS_FIELD_NUMBER = 105; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList codeownerGithubTeams_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+   * containing source code for the client libraries for this API.
+   * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @return A list containing the codeownerGithubTeams. + */ + public com.google.protobuf.ProtocolStringList getCodeownerGithubTeamsList() { + return codeownerGithubTeams_; + } + /** + * + * + *
+   * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+   * containing source code for the client libraries for this API.
+   * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @return The count of codeownerGithubTeams. + */ + public int getCodeownerGithubTeamsCount() { + return codeownerGithubTeams_.size(); + } + /** + * + * + *
+   * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+   * containing source code for the client libraries for this API.
+   * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @param index The index of the element to return. + * @return The codeownerGithubTeams at the given index. + */ + public java.lang.String getCodeownerGithubTeams(int index) { + return codeownerGithubTeams_.get(index); + } + /** + * + * + *
+   * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+   * containing source code for the client libraries for this API.
+   * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @param index The index of the value to return. + * @return The bytes of the codeownerGithubTeams at the given index. + */ + public com.google.protobuf.ByteString getCodeownerGithubTeamsBytes(int index) { + return codeownerGithubTeams_.getByteString(index); + } + + public static final int DOC_TAG_PREFIX_FIELD_NUMBER = 106; + + @SuppressWarnings("serial") + private volatile java.lang.Object docTagPrefix_ = ""; + /** + * + * + *
+   * A prefix used in sample code when demarking regions to be included in
+   * documentation.
+   * 
+ * + * string doc_tag_prefix = 106; + * + * @return The docTagPrefix. + */ + @java.lang.Override + public java.lang.String getDocTagPrefix() { + java.lang.Object ref = docTagPrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docTagPrefix_ = s; + return s; + } + } + /** + * + * + *
+   * A prefix used in sample code when demarking regions to be included in
+   * documentation.
+   * 
+ * + * string doc_tag_prefix = 106; + * + * @return The bytes for docTagPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocTagPrefixBytes() { + java.lang.Object ref = docTagPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docTagPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORGANIZATION_FIELD_NUMBER = 107; + private int organization_ = 0; + /** + * + * + *
+   * For whom the client library is being published.
+   * 
+ * + * .google.api.ClientLibraryOrganization organization = 107; + * + * @return The enum numeric value on the wire for organization. + */ + @java.lang.Override + public int getOrganizationValue() { + return organization_; + } + /** + * + * + *
+   * For whom the client library is being published.
+   * 
+ * + * .google.api.ClientLibraryOrganization organization = 107; + * + * @return The organization. + */ + @java.lang.Override + public com.google.api.ClientLibraryOrganization getOrganization() { + com.google.api.ClientLibraryOrganization result = + com.google.api.ClientLibraryOrganization.forNumber(organization_); + return result == null ? com.google.api.ClientLibraryOrganization.UNRECOGNIZED : result; + } + + public static final int LIBRARY_SETTINGS_FIELD_NUMBER = 109; + + @SuppressWarnings("serial") + private java.util.List librarySettings_; + /** + * + * + *
+   * Client library settings.  If the same version string appears multiple
+   * times in this list, then the last one wins.  Settings from earlier
+   * settings with the same version string are discarded.
+   * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + @java.lang.Override + public java.util.List getLibrarySettingsList() { + return librarySettings_; + } + /** + * + * + *
+   * Client library settings.  If the same version string appears multiple
+   * times in this list, then the last one wins.  Settings from earlier
+   * settings with the same version string are discarded.
+   * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + @java.lang.Override + public java.util.List + getLibrarySettingsOrBuilderList() { + return librarySettings_; + } + /** + * + * + *
+   * Client library settings.  If the same version string appears multiple
+   * times in this list, then the last one wins.  Settings from earlier
+   * settings with the same version string are discarded.
+   * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + @java.lang.Override + public int getLibrarySettingsCount() { + return librarySettings_.size(); + } + /** + * + * + *
+   * Client library settings.  If the same version string appears multiple
+   * times in this list, then the last one wins.  Settings from earlier
+   * settings with the same version string are discarded.
+   * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + @java.lang.Override + public com.google.api.ClientLibrarySettings getLibrarySettings(int index) { + return librarySettings_.get(index); + } + /** + * + * + *
+   * Client library settings.  If the same version string appears multiple
+   * times in this list, then the last one wins.  Settings from earlier
+   * settings with the same version string are discarded.
+   * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + @java.lang.Override + public com.google.api.ClientLibrarySettingsOrBuilder getLibrarySettingsOrBuilder(int index) { + return librarySettings_.get(index); + } + + public static final int PROTO_REFERENCE_DOCUMENTATION_URI_FIELD_NUMBER = 110; + + @SuppressWarnings("serial") + private volatile java.lang.Object protoReferenceDocumentationUri_ = ""; + /** + * + * + *
+   * Optional link to proto reference documentation.  Example:
+   * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+   * 
+ * + * string proto_reference_documentation_uri = 110; + * + * @return The protoReferenceDocumentationUri. + */ + @java.lang.Override + public java.lang.String getProtoReferenceDocumentationUri() { + java.lang.Object ref = protoReferenceDocumentationUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protoReferenceDocumentationUri_ = s; + return s; + } + } + /** + * + * + *
+   * Optional link to proto reference documentation.  Example:
+   * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+   * 
+ * + * string proto_reference_documentation_uri = 110; + * + * @return The bytes for protoReferenceDocumentationUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtoReferenceDocumentationUriBytes() { + java.lang.Object ref = protoReferenceDocumentationUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protoReferenceDocumentationUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < methodSettings_.size(); i++) { + output.writeMessage(2, methodSettings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newIssueUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 101, newIssueUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentationUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 102, documentationUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiShortName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 103, apiShortName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(githubLabel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 104, githubLabel_); + } + for (int i = 0; i < codeownerGithubTeams_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 105, codeownerGithubTeams_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(docTagPrefix_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 106, docTagPrefix_); + } + if (organization_ + != com.google.api.ClientLibraryOrganization.CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED + .getNumber()) { + output.writeEnum(107, organization_); + } + for (int i = 0; i < librarySettings_.size(); i++) { + output.writeMessage(109, librarySettings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protoReferenceDocumentationUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 110, protoReferenceDocumentationUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < methodSettings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, methodSettings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newIssueUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(101, newIssueUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(documentationUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(102, documentationUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiShortName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(103, apiShortName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(githubLabel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(104, githubLabel_); + } + { + int dataSize = 0; + for (int i = 0; i < codeownerGithubTeams_.size(); i++) { + dataSize += computeStringSizeNoTag(codeownerGithubTeams_.getRaw(i)); + } + size += dataSize; + size += 2 * getCodeownerGithubTeamsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(docTagPrefix_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(106, docTagPrefix_); + } + if (organization_ + != com.google.api.ClientLibraryOrganization.CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(107, organization_); + } + for (int i = 0; i < librarySettings_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(109, librarySettings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protoReferenceDocumentationUri_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 110, protoReferenceDocumentationUri_); + } + 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.api.Publishing)) { + return super.equals(obj); + } + com.google.api.Publishing other = (com.google.api.Publishing) obj; + + if (!getMethodSettingsList().equals(other.getMethodSettingsList())) return false; + if (!getNewIssueUri().equals(other.getNewIssueUri())) return false; + if (!getDocumentationUri().equals(other.getDocumentationUri())) return false; + if (!getApiShortName().equals(other.getApiShortName())) return false; + if (!getGithubLabel().equals(other.getGithubLabel())) return false; + if (!getCodeownerGithubTeamsList().equals(other.getCodeownerGithubTeamsList())) return false; + if (!getDocTagPrefix().equals(other.getDocTagPrefix())) return false; + if (organization_ != other.organization_) return false; + if (!getLibrarySettingsList().equals(other.getLibrarySettingsList())) return false; + if (!getProtoReferenceDocumentationUri().equals(other.getProtoReferenceDocumentationUri())) + 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 (getMethodSettingsCount() > 0) { + hash = (37 * hash) + METHOD_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getMethodSettingsList().hashCode(); + } + hash = (37 * hash) + NEW_ISSUE_URI_FIELD_NUMBER; + hash = (53 * hash) + getNewIssueUri().hashCode(); + hash = (37 * hash) + DOCUMENTATION_URI_FIELD_NUMBER; + hash = (53 * hash) + getDocumentationUri().hashCode(); + hash = (37 * hash) + API_SHORT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getApiShortName().hashCode(); + hash = (37 * hash) + GITHUB_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getGithubLabel().hashCode(); + if (getCodeownerGithubTeamsCount() > 0) { + hash = (37 * hash) + CODEOWNER_GITHUB_TEAMS_FIELD_NUMBER; + hash = (53 * hash) + getCodeownerGithubTeamsList().hashCode(); + } + hash = (37 * hash) + DOC_TAG_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getDocTagPrefix().hashCode(); + hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER; + hash = (53 * hash) + organization_; + if (getLibrarySettingsCount() > 0) { + hash = (37 * hash) + LIBRARY_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getLibrarySettingsList().hashCode(); + } + hash = (37 * hash) + PROTO_REFERENCE_DOCUMENTATION_URI_FIELD_NUMBER; + hash = (53 * hash) + getProtoReferenceDocumentationUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Publishing parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Publishing parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Publishing parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Publishing 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.api.Publishing parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Publishing parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Publishing parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Publishing 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.api.Publishing parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Publishing 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.api.Publishing parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Publishing 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.api.Publishing prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * This message configures the settings for publishing [Google Cloud Client
+   * libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
+   * generated from the service config.
+   * 
+ * + * Protobuf type {@code google.api.Publishing} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Publishing) + com.google.api.PublishingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_Publishing_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_Publishing_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Publishing.class, com.google.api.Publishing.Builder.class); + } + + // Construct using com.google.api.Publishing.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (methodSettingsBuilder_ == null) { + methodSettings_ = java.util.Collections.emptyList(); + } else { + methodSettings_ = null; + methodSettingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + newIssueUri_ = ""; + documentationUri_ = ""; + apiShortName_ = ""; + githubLabel_ = ""; + codeownerGithubTeams_ = com.google.protobuf.LazyStringArrayList.emptyList(); + docTagPrefix_ = ""; + organization_ = 0; + if (librarySettingsBuilder_ == null) { + librarySettings_ = java.util.Collections.emptyList(); + } else { + librarySettings_ = null; + librarySettingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + protoReferenceDocumentationUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto.internal_static_google_api_Publishing_descriptor; + } + + @java.lang.Override + public com.google.api.Publishing getDefaultInstanceForType() { + return com.google.api.Publishing.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Publishing build() { + com.google.api.Publishing result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Publishing buildPartial() { + com.google.api.Publishing result = new com.google.api.Publishing(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Publishing result) { + if (methodSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + methodSettings_ = java.util.Collections.unmodifiableList(methodSettings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.methodSettings_ = methodSettings_; + } else { + result.methodSettings_ = methodSettingsBuilder_.build(); + } + if (librarySettingsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + librarySettings_ = java.util.Collections.unmodifiableList(librarySettings_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.librarySettings_ = librarySettings_; + } else { + result.librarySettings_ = librarySettingsBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Publishing result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.newIssueUri_ = newIssueUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.documentationUri_ = documentationUri_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.apiShortName_ = apiShortName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.githubLabel_ = githubLabel_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + codeownerGithubTeams_.makeImmutable(); + result.codeownerGithubTeams_ = codeownerGithubTeams_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.docTagPrefix_ = docTagPrefix_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.organization_ = organization_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.protoReferenceDocumentationUri_ = protoReferenceDocumentationUri_; + } + } + + @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.api.Publishing) { + return mergeFrom((com.google.api.Publishing) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Publishing other) { + if (other == com.google.api.Publishing.getDefaultInstance()) return this; + if (methodSettingsBuilder_ == null) { + if (!other.methodSettings_.isEmpty()) { + if (methodSettings_.isEmpty()) { + methodSettings_ = other.methodSettings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMethodSettingsIsMutable(); + methodSettings_.addAll(other.methodSettings_); + } + onChanged(); + } + } else { + if (!other.methodSettings_.isEmpty()) { + if (methodSettingsBuilder_.isEmpty()) { + methodSettingsBuilder_.dispose(); + methodSettingsBuilder_ = null; + methodSettings_ = other.methodSettings_; + bitField0_ = (bitField0_ & ~0x00000001); + methodSettingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMethodSettingsFieldBuilder() + : null; + } else { + methodSettingsBuilder_.addAllMessages(other.methodSettings_); + } + } + } + if (!other.getNewIssueUri().isEmpty()) { + newIssueUri_ = other.newIssueUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDocumentationUri().isEmpty()) { + documentationUri_ = other.documentationUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getApiShortName().isEmpty()) { + apiShortName_ = other.apiShortName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getGithubLabel().isEmpty()) { + githubLabel_ = other.githubLabel_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.codeownerGithubTeams_.isEmpty()) { + if (codeownerGithubTeams_.isEmpty()) { + codeownerGithubTeams_ = other.codeownerGithubTeams_; + bitField0_ |= 0x00000020; + } else { + ensureCodeownerGithubTeamsIsMutable(); + codeownerGithubTeams_.addAll(other.codeownerGithubTeams_); + } + onChanged(); + } + if (!other.getDocTagPrefix().isEmpty()) { + docTagPrefix_ = other.docTagPrefix_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.organization_ != 0) { + setOrganizationValue(other.getOrganizationValue()); + } + if (librarySettingsBuilder_ == null) { + if (!other.librarySettings_.isEmpty()) { + if (librarySettings_.isEmpty()) { + librarySettings_ = other.librarySettings_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureLibrarySettingsIsMutable(); + librarySettings_.addAll(other.librarySettings_); + } + onChanged(); + } + } else { + if (!other.librarySettings_.isEmpty()) { + if (librarySettingsBuilder_.isEmpty()) { + librarySettingsBuilder_.dispose(); + librarySettingsBuilder_ = null; + librarySettings_ = other.librarySettings_; + bitField0_ = (bitField0_ & ~0x00000100); + librarySettingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLibrarySettingsFieldBuilder() + : null; + } else { + librarySettingsBuilder_.addAllMessages(other.librarySettings_); + } + } + } + if (!other.getProtoReferenceDocumentationUri().isEmpty()) { + protoReferenceDocumentationUri_ = other.protoReferenceDocumentationUri_; + 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 18: + { + com.google.api.MethodSettings m = + input.readMessage(com.google.api.MethodSettings.parser(), extensionRegistry); + if (methodSettingsBuilder_ == null) { + ensureMethodSettingsIsMutable(); + methodSettings_.add(m); + } else { + methodSettingsBuilder_.addMessage(m); + } + break; + } // case 18 + case 810: + { + newIssueUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 810 + case 818: + { + documentationUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 818 + case 826: + { + apiShortName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 826 + case 834: + { + githubLabel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 834 + case 842: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCodeownerGithubTeamsIsMutable(); + codeownerGithubTeams_.add(s); + break; + } // case 842 + case 850: + { + docTagPrefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 850 + case 856: + { + organization_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 856 + case 874: + { + com.google.api.ClientLibrarySettings m = + input.readMessage( + com.google.api.ClientLibrarySettings.parser(), extensionRegistry); + if (librarySettingsBuilder_ == null) { + ensureLibrarySettingsIsMutable(); + librarySettings_.add(m); + } else { + librarySettingsBuilder_.addMessage(m); + } + break; + } // case 874 + case 882: + { + protoReferenceDocumentationUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 882 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // 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 methodSettings_ = + java.util.Collections.emptyList(); + + private void ensureMethodSettingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + methodSettings_ = new java.util.ArrayList(methodSettings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.MethodSettings, + com.google.api.MethodSettings.Builder, + com.google.api.MethodSettingsOrBuilder> + methodSettingsBuilder_; + + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public java.util.List getMethodSettingsList() { + if (methodSettingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(methodSettings_); + } else { + return methodSettingsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public int getMethodSettingsCount() { + if (methodSettingsBuilder_ == null) { + return methodSettings_.size(); + } else { + return methodSettingsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public com.google.api.MethodSettings getMethodSettings(int index) { + if (methodSettingsBuilder_ == null) { + return methodSettings_.get(index); + } else { + return methodSettingsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public Builder setMethodSettings(int index, com.google.api.MethodSettings value) { + if (methodSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodSettingsIsMutable(); + methodSettings_.set(index, value); + onChanged(); + } else { + methodSettingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public Builder setMethodSettings( + int index, com.google.api.MethodSettings.Builder builderForValue) { + if (methodSettingsBuilder_ == null) { + ensureMethodSettingsIsMutable(); + methodSettings_.set(index, builderForValue.build()); + onChanged(); + } else { + methodSettingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public Builder addMethodSettings(com.google.api.MethodSettings value) { + if (methodSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodSettingsIsMutable(); + methodSettings_.add(value); + onChanged(); + } else { + methodSettingsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public Builder addMethodSettings(int index, com.google.api.MethodSettings value) { + if (methodSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMethodSettingsIsMutable(); + methodSettings_.add(index, value); + onChanged(); + } else { + methodSettingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public Builder addMethodSettings(com.google.api.MethodSettings.Builder builderForValue) { + if (methodSettingsBuilder_ == null) { + ensureMethodSettingsIsMutable(); + methodSettings_.add(builderForValue.build()); + onChanged(); + } else { + methodSettingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public Builder addMethodSettings( + int index, com.google.api.MethodSettings.Builder builderForValue) { + if (methodSettingsBuilder_ == null) { + ensureMethodSettingsIsMutable(); + methodSettings_.add(index, builderForValue.build()); + onChanged(); + } else { + methodSettingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public Builder addAllMethodSettings( + java.lang.Iterable values) { + if (methodSettingsBuilder_ == null) { + ensureMethodSettingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, methodSettings_); + onChanged(); + } else { + methodSettingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public Builder clearMethodSettings() { + if (methodSettingsBuilder_ == null) { + methodSettings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + methodSettingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public Builder removeMethodSettings(int index) { + if (methodSettingsBuilder_ == null) { + ensureMethodSettingsIsMutable(); + methodSettings_.remove(index); + onChanged(); + } else { + methodSettingsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public com.google.api.MethodSettings.Builder getMethodSettingsBuilder(int index) { + return getMethodSettingsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public com.google.api.MethodSettingsOrBuilder getMethodSettingsOrBuilder(int index) { + if (methodSettingsBuilder_ == null) { + return methodSettings_.get(index); + } else { + return methodSettingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public java.util.List + getMethodSettingsOrBuilderList() { + if (methodSettingsBuilder_ != null) { + return methodSettingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(methodSettings_); + } + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public com.google.api.MethodSettings.Builder addMethodSettingsBuilder() { + return getMethodSettingsFieldBuilder() + .addBuilder(com.google.api.MethodSettings.getDefaultInstance()); + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public com.google.api.MethodSettings.Builder addMethodSettingsBuilder(int index) { + return getMethodSettingsFieldBuilder() + .addBuilder(index, com.google.api.MethodSettings.getDefaultInstance()); + } + /** + * + * + *
+     * A list of API method settings, e.g. the behavior for methods that use the
+     * long-running operation pattern.
+     * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + public java.util.List getMethodSettingsBuilderList() { + return getMethodSettingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.MethodSettings, + com.google.api.MethodSettings.Builder, + com.google.api.MethodSettingsOrBuilder> + getMethodSettingsFieldBuilder() { + if (methodSettingsBuilder_ == null) { + methodSettingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.MethodSettings, + com.google.api.MethodSettings.Builder, + com.google.api.MethodSettingsOrBuilder>( + methodSettings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + methodSettings_ = null; + } + return methodSettingsBuilder_; + } + + private java.lang.Object newIssueUri_ = ""; + /** + * + * + *
+     * Link to a *public* URI where users can report issues.  Example:
+     * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+     * 
+ * + * string new_issue_uri = 101; + * + * @return The newIssueUri. + */ + public java.lang.String getNewIssueUri() { + java.lang.Object ref = newIssueUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newIssueUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Link to a *public* URI where users can report issues.  Example:
+     * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+     * 
+ * + * string new_issue_uri = 101; + * + * @return The bytes for newIssueUri. + */ + public com.google.protobuf.ByteString getNewIssueUriBytes() { + java.lang.Object ref = newIssueUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newIssueUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Link to a *public* URI where users can report issues.  Example:
+     * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+     * 
+ * + * string new_issue_uri = 101; + * + * @param value The newIssueUri to set. + * @return This builder for chaining. + */ + public Builder setNewIssueUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + newIssueUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Link to a *public* URI where users can report issues.  Example:
+     * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+     * 
+ * + * string new_issue_uri = 101; + * + * @return This builder for chaining. + */ + public Builder clearNewIssueUri() { + newIssueUri_ = getDefaultInstance().getNewIssueUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Link to a *public* URI where users can report issues.  Example:
+     * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+     * 
+ * + * string new_issue_uri = 101; + * + * @param value The bytes for newIssueUri to set. + * @return This builder for chaining. + */ + public Builder setNewIssueUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + newIssueUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object documentationUri_ = ""; + /** + * + * + *
+     * Link to product home page.  Example:
+     * https://cloud.google.com/asset-inventory/docs/overview
+     * 
+ * + * string documentation_uri = 102; + * + * @return The documentationUri. + */ + public java.lang.String getDocumentationUri() { + java.lang.Object ref = documentationUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + documentationUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Link to product home page.  Example:
+     * https://cloud.google.com/asset-inventory/docs/overview
+     * 
+ * + * string documentation_uri = 102; + * + * @return The bytes for documentationUri. + */ + public com.google.protobuf.ByteString getDocumentationUriBytes() { + java.lang.Object ref = documentationUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + documentationUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Link to product home page.  Example:
+     * https://cloud.google.com/asset-inventory/docs/overview
+     * 
+ * + * string documentation_uri = 102; + * + * @param value The documentationUri to set. + * @return This builder for chaining. + */ + public Builder setDocumentationUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + documentationUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Link to product home page.  Example:
+     * https://cloud.google.com/asset-inventory/docs/overview
+     * 
+ * + * string documentation_uri = 102; + * + * @return This builder for chaining. + */ + public Builder clearDocumentationUri() { + documentationUri_ = getDefaultInstance().getDocumentationUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Link to product home page.  Example:
+     * https://cloud.google.com/asset-inventory/docs/overview
+     * 
+ * + * string documentation_uri = 102; + * + * @param value The bytes for documentationUri to set. + * @return This builder for chaining. + */ + public Builder setDocumentationUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + documentationUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object apiShortName_ = ""; + /** + * + * + *
+     * Used as a tracking tag when collecting data about the APIs developer
+     * relations artifacts like docs, packages delivered to package managers,
+     * etc.  Example: "speech".
+     * 
+ * + * string api_short_name = 103; + * + * @return The apiShortName. + */ + public java.lang.String getApiShortName() { + java.lang.Object ref = apiShortName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiShortName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Used as a tracking tag when collecting data about the APIs developer
+     * relations artifacts like docs, packages delivered to package managers,
+     * etc.  Example: "speech".
+     * 
+ * + * string api_short_name = 103; + * + * @return The bytes for apiShortName. + */ + public com.google.protobuf.ByteString getApiShortNameBytes() { + java.lang.Object ref = apiShortName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Used as a tracking tag when collecting data about the APIs developer
+     * relations artifacts like docs, packages delivered to package managers,
+     * etc.  Example: "speech".
+     * 
+ * + * string api_short_name = 103; + * + * @param value The apiShortName to set. + * @return This builder for chaining. + */ + public Builder setApiShortName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiShortName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Used as a tracking tag when collecting data about the APIs developer
+     * relations artifacts like docs, packages delivered to package managers,
+     * etc.  Example: "speech".
+     * 
+ * + * string api_short_name = 103; + * + * @return This builder for chaining. + */ + public Builder clearApiShortName() { + apiShortName_ = getDefaultInstance().getApiShortName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Used as a tracking tag when collecting data about the APIs developer
+     * relations artifacts like docs, packages delivered to package managers,
+     * etc.  Example: "speech".
+     * 
+ * + * string api_short_name = 103; + * + * @param value The bytes for apiShortName to set. + * @return This builder for chaining. + */ + public Builder setApiShortNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiShortName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object githubLabel_ = ""; + /** + * + * + *
+     * GitHub label to apply to issues and pull requests opened for this API.
+     * 
+ * + * string github_label = 104; + * + * @return The githubLabel. + */ + public java.lang.String getGithubLabel() { + java.lang.Object ref = githubLabel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + githubLabel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * GitHub label to apply to issues and pull requests opened for this API.
+     * 
+ * + * string github_label = 104; + * + * @return The bytes for githubLabel. + */ + public com.google.protobuf.ByteString getGithubLabelBytes() { + java.lang.Object ref = githubLabel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + githubLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * GitHub label to apply to issues and pull requests opened for this API.
+     * 
+ * + * string github_label = 104; + * + * @param value The githubLabel to set. + * @return This builder for chaining. + */ + public Builder setGithubLabel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + githubLabel_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * GitHub label to apply to issues and pull requests opened for this API.
+     * 
+ * + * string github_label = 104; + * + * @return This builder for chaining. + */ + public Builder clearGithubLabel() { + githubLabel_ = getDefaultInstance().getGithubLabel(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * GitHub label to apply to issues and pull requests opened for this API.
+     * 
+ * + * string github_label = 104; + * + * @param value The bytes for githubLabel to set. + * @return This builder for chaining. + */ + public Builder setGithubLabelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + githubLabel_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList codeownerGithubTeams_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCodeownerGithubTeamsIsMutable() { + if (!codeownerGithubTeams_.isModifiable()) { + codeownerGithubTeams_ = new com.google.protobuf.LazyStringArrayList(codeownerGithubTeams_); + } + bitField0_ |= 0x00000020; + } + /** + * + * + *
+     * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+     * containing source code for the client libraries for this API.
+     * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @return A list containing the codeownerGithubTeams. + */ + public com.google.protobuf.ProtocolStringList getCodeownerGithubTeamsList() { + codeownerGithubTeams_.makeImmutable(); + return codeownerGithubTeams_; + } + /** + * + * + *
+     * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+     * containing source code for the client libraries for this API.
+     * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @return The count of codeownerGithubTeams. + */ + public int getCodeownerGithubTeamsCount() { + return codeownerGithubTeams_.size(); + } + /** + * + * + *
+     * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+     * containing source code for the client libraries for this API.
+     * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @param index The index of the element to return. + * @return The codeownerGithubTeams at the given index. + */ + public java.lang.String getCodeownerGithubTeams(int index) { + return codeownerGithubTeams_.get(index); + } + /** + * + * + *
+     * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+     * containing source code for the client libraries for this API.
+     * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @param index The index of the value to return. + * @return The bytes of the codeownerGithubTeams at the given index. + */ + public com.google.protobuf.ByteString getCodeownerGithubTeamsBytes(int index) { + return codeownerGithubTeams_.getByteString(index); + } + /** + * + * + *
+     * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+     * containing source code for the client libraries for this API.
+     * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @param index The index to set the value at. + * @param value The codeownerGithubTeams to set. + * @return This builder for chaining. + */ + public Builder setCodeownerGithubTeams(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCodeownerGithubTeamsIsMutable(); + codeownerGithubTeams_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+     * containing source code for the client libraries for this API.
+     * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @param value The codeownerGithubTeams to add. + * @return This builder for chaining. + */ + public Builder addCodeownerGithubTeams(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCodeownerGithubTeamsIsMutable(); + codeownerGithubTeams_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+     * containing source code for the client libraries for this API.
+     * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @param values The codeownerGithubTeams to add. + * @return This builder for chaining. + */ + public Builder addAllCodeownerGithubTeams(java.lang.Iterable values) { + ensureCodeownerGithubTeamsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, codeownerGithubTeams_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+     * containing source code for the client libraries for this API.
+     * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @return This builder for chaining. + */ + public Builder clearCodeownerGithubTeams() { + codeownerGithubTeams_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+     * containing source code for the client libraries for this API.
+     * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @param value The bytes of the codeownerGithubTeams to add. + * @return This builder for chaining. + */ + public Builder addCodeownerGithubTeamsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCodeownerGithubTeamsIsMutable(); + codeownerGithubTeams_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object docTagPrefix_ = ""; + /** + * + * + *
+     * A prefix used in sample code when demarking regions to be included in
+     * documentation.
+     * 
+ * + * string doc_tag_prefix = 106; + * + * @return The docTagPrefix. + */ + public java.lang.String getDocTagPrefix() { + java.lang.Object ref = docTagPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docTagPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A prefix used in sample code when demarking regions to be included in
+     * documentation.
+     * 
+ * + * string doc_tag_prefix = 106; + * + * @return The bytes for docTagPrefix. + */ + public com.google.protobuf.ByteString getDocTagPrefixBytes() { + java.lang.Object ref = docTagPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docTagPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A prefix used in sample code when demarking regions to be included in
+     * documentation.
+     * 
+ * + * string doc_tag_prefix = 106; + * + * @param value The docTagPrefix to set. + * @return This builder for chaining. + */ + public Builder setDocTagPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + docTagPrefix_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * A prefix used in sample code when demarking regions to be included in
+     * documentation.
+     * 
+ * + * string doc_tag_prefix = 106; + * + * @return This builder for chaining. + */ + public Builder clearDocTagPrefix() { + docTagPrefix_ = getDefaultInstance().getDocTagPrefix(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * A prefix used in sample code when demarking regions to be included in
+     * documentation.
+     * 
+ * + * string doc_tag_prefix = 106; + * + * @param value The bytes for docTagPrefix to set. + * @return This builder for chaining. + */ + public Builder setDocTagPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + docTagPrefix_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int organization_ = 0; + /** + * + * + *
+     * For whom the client library is being published.
+     * 
+ * + * .google.api.ClientLibraryOrganization organization = 107; + * + * @return The enum numeric value on the wire for organization. + */ + @java.lang.Override + public int getOrganizationValue() { + return organization_; + } + /** + * + * + *
+     * For whom the client library is being published.
+     * 
+ * + * .google.api.ClientLibraryOrganization organization = 107; + * + * @param value The enum numeric value on the wire for organization to set. + * @return This builder for chaining. + */ + public Builder setOrganizationValue(int value) { + organization_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * For whom the client library is being published.
+     * 
+ * + * .google.api.ClientLibraryOrganization organization = 107; + * + * @return The organization. + */ + @java.lang.Override + public com.google.api.ClientLibraryOrganization getOrganization() { + com.google.api.ClientLibraryOrganization result = + com.google.api.ClientLibraryOrganization.forNumber(organization_); + return result == null ? com.google.api.ClientLibraryOrganization.UNRECOGNIZED : result; + } + /** + * + * + *
+     * For whom the client library is being published.
+     * 
+ * + * .google.api.ClientLibraryOrganization organization = 107; + * + * @param value The organization to set. + * @return This builder for chaining. + */ + public Builder setOrganization(com.google.api.ClientLibraryOrganization value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + organization_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * For whom the client library is being published.
+     * 
+ * + * .google.api.ClientLibraryOrganization organization = 107; + * + * @return This builder for chaining. + */ + public Builder clearOrganization() { + bitField0_ = (bitField0_ & ~0x00000080); + organization_ = 0; + onChanged(); + return this; + } + + private java.util.List librarySettings_ = + java.util.Collections.emptyList(); + + private void ensureLibrarySettingsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + librarySettings_ = + new java.util.ArrayList(librarySettings_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.ClientLibrarySettings, + com.google.api.ClientLibrarySettings.Builder, + com.google.api.ClientLibrarySettingsOrBuilder> + librarySettingsBuilder_; + + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public java.util.List getLibrarySettingsList() { + if (librarySettingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(librarySettings_); + } else { + return librarySettingsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public int getLibrarySettingsCount() { + if (librarySettingsBuilder_ == null) { + return librarySettings_.size(); + } else { + return librarySettingsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public com.google.api.ClientLibrarySettings getLibrarySettings(int index) { + if (librarySettingsBuilder_ == null) { + return librarySettings_.get(index); + } else { + return librarySettingsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public Builder setLibrarySettings(int index, com.google.api.ClientLibrarySettings value) { + if (librarySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrarySettingsIsMutable(); + librarySettings_.set(index, value); + onChanged(); + } else { + librarySettingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public Builder setLibrarySettings( + int index, com.google.api.ClientLibrarySettings.Builder builderForValue) { + if (librarySettingsBuilder_ == null) { + ensureLibrarySettingsIsMutable(); + librarySettings_.set(index, builderForValue.build()); + onChanged(); + } else { + librarySettingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public Builder addLibrarySettings(com.google.api.ClientLibrarySettings value) { + if (librarySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrarySettingsIsMutable(); + librarySettings_.add(value); + onChanged(); + } else { + librarySettingsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public Builder addLibrarySettings(int index, com.google.api.ClientLibrarySettings value) { + if (librarySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrarySettingsIsMutable(); + librarySettings_.add(index, value); + onChanged(); + } else { + librarySettingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public Builder addLibrarySettings( + com.google.api.ClientLibrarySettings.Builder builderForValue) { + if (librarySettingsBuilder_ == null) { + ensureLibrarySettingsIsMutable(); + librarySettings_.add(builderForValue.build()); + onChanged(); + } else { + librarySettingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public Builder addLibrarySettings( + int index, com.google.api.ClientLibrarySettings.Builder builderForValue) { + if (librarySettingsBuilder_ == null) { + ensureLibrarySettingsIsMutable(); + librarySettings_.add(index, builderForValue.build()); + onChanged(); + } else { + librarySettingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public Builder addAllLibrarySettings( + java.lang.Iterable values) { + if (librarySettingsBuilder_ == null) { + ensureLibrarySettingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, librarySettings_); + onChanged(); + } else { + librarySettingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public Builder clearLibrarySettings() { + if (librarySettingsBuilder_ == null) { + librarySettings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + librarySettingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public Builder removeLibrarySettings(int index) { + if (librarySettingsBuilder_ == null) { + ensureLibrarySettingsIsMutable(); + librarySettings_.remove(index); + onChanged(); + } else { + librarySettingsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public com.google.api.ClientLibrarySettings.Builder getLibrarySettingsBuilder(int index) { + return getLibrarySettingsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public com.google.api.ClientLibrarySettingsOrBuilder getLibrarySettingsOrBuilder(int index) { + if (librarySettingsBuilder_ == null) { + return librarySettings_.get(index); + } else { + return librarySettingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public java.util.List + getLibrarySettingsOrBuilderList() { + if (librarySettingsBuilder_ != null) { + return librarySettingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(librarySettings_); + } + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public com.google.api.ClientLibrarySettings.Builder addLibrarySettingsBuilder() { + return getLibrarySettingsFieldBuilder() + .addBuilder(com.google.api.ClientLibrarySettings.getDefaultInstance()); + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public com.google.api.ClientLibrarySettings.Builder addLibrarySettingsBuilder(int index) { + return getLibrarySettingsFieldBuilder() + .addBuilder(index, com.google.api.ClientLibrarySettings.getDefaultInstance()); + } + /** + * + * + *
+     * Client library settings.  If the same version string appears multiple
+     * times in this list, then the last one wins.  Settings from earlier
+     * settings with the same version string are discarded.
+     * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + public java.util.List + getLibrarySettingsBuilderList() { + return getLibrarySettingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.ClientLibrarySettings, + com.google.api.ClientLibrarySettings.Builder, + com.google.api.ClientLibrarySettingsOrBuilder> + getLibrarySettingsFieldBuilder() { + if (librarySettingsBuilder_ == null) { + librarySettingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.ClientLibrarySettings, + com.google.api.ClientLibrarySettings.Builder, + com.google.api.ClientLibrarySettingsOrBuilder>( + librarySettings_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + librarySettings_ = null; + } + return librarySettingsBuilder_; + } + + private java.lang.Object protoReferenceDocumentationUri_ = ""; + /** + * + * + *
+     * Optional link to proto reference documentation.  Example:
+     * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+     * 
+ * + * string proto_reference_documentation_uri = 110; + * + * @return The protoReferenceDocumentationUri. + */ + public java.lang.String getProtoReferenceDocumentationUri() { + java.lang.Object ref = protoReferenceDocumentationUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protoReferenceDocumentationUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional link to proto reference documentation.  Example:
+     * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+     * 
+ * + * string proto_reference_documentation_uri = 110; + * + * @return The bytes for protoReferenceDocumentationUri. + */ + public com.google.protobuf.ByteString getProtoReferenceDocumentationUriBytes() { + java.lang.Object ref = protoReferenceDocumentationUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + protoReferenceDocumentationUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional link to proto reference documentation.  Example:
+     * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+     * 
+ * + * string proto_reference_documentation_uri = 110; + * + * @param value The protoReferenceDocumentationUri to set. + * @return This builder for chaining. + */ + public Builder setProtoReferenceDocumentationUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + protoReferenceDocumentationUri_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional link to proto reference documentation.  Example:
+     * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+     * 
+ * + * string proto_reference_documentation_uri = 110; + * + * @return This builder for chaining. + */ + public Builder clearProtoReferenceDocumentationUri() { + protoReferenceDocumentationUri_ = getDefaultInstance().getProtoReferenceDocumentationUri(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional link to proto reference documentation.  Example:
+     * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+     * 
+ * + * string proto_reference_documentation_uri = 110; + * + * @param value The bytes for protoReferenceDocumentationUri to set. + * @return This builder for chaining. + */ + public Builder setProtoReferenceDocumentationUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + protoReferenceDocumentationUri_ = 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.api.Publishing) + } + + // @@protoc_insertion_point(class_scope:google.api.Publishing) + private static final com.google.api.Publishing DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Publishing(); + } + + public static com.google.api.Publishing getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Publishing 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.api.Publishing getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PublishingOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PublishingOrBuilder.java new file mode 100644 index 000000000000..70497e48bd94 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PublishingOrBuilder.java @@ -0,0 +1,385 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface PublishingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Publishing) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of API method settings, e.g. the behavior for methods that use the
+   * long-running operation pattern.
+   * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + java.util.List getMethodSettingsList(); + /** + * + * + *
+   * A list of API method settings, e.g. the behavior for methods that use the
+   * long-running operation pattern.
+   * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + com.google.api.MethodSettings getMethodSettings(int index); + /** + * + * + *
+   * A list of API method settings, e.g. the behavior for methods that use the
+   * long-running operation pattern.
+   * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + int getMethodSettingsCount(); + /** + * + * + *
+   * A list of API method settings, e.g. the behavior for methods that use the
+   * long-running operation pattern.
+   * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + java.util.List getMethodSettingsOrBuilderList(); + /** + * + * + *
+   * A list of API method settings, e.g. the behavior for methods that use the
+   * long-running operation pattern.
+   * 
+ * + * repeated .google.api.MethodSettings method_settings = 2; + */ + com.google.api.MethodSettingsOrBuilder getMethodSettingsOrBuilder(int index); + + /** + * + * + *
+   * Link to a *public* URI where users can report issues.  Example:
+   * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+   * 
+ * + * string new_issue_uri = 101; + * + * @return The newIssueUri. + */ + java.lang.String getNewIssueUri(); + /** + * + * + *
+   * Link to a *public* URI where users can report issues.  Example:
+   * https://issuetracker.google.com/issues/new?component=190865&template=1161103
+   * 
+ * + * string new_issue_uri = 101; + * + * @return The bytes for newIssueUri. + */ + com.google.protobuf.ByteString getNewIssueUriBytes(); + + /** + * + * + *
+   * Link to product home page.  Example:
+   * https://cloud.google.com/asset-inventory/docs/overview
+   * 
+ * + * string documentation_uri = 102; + * + * @return The documentationUri. + */ + java.lang.String getDocumentationUri(); + /** + * + * + *
+   * Link to product home page.  Example:
+   * https://cloud.google.com/asset-inventory/docs/overview
+   * 
+ * + * string documentation_uri = 102; + * + * @return The bytes for documentationUri. + */ + com.google.protobuf.ByteString getDocumentationUriBytes(); + + /** + * + * + *
+   * Used as a tracking tag when collecting data about the APIs developer
+   * relations artifacts like docs, packages delivered to package managers,
+   * etc.  Example: "speech".
+   * 
+ * + * string api_short_name = 103; + * + * @return The apiShortName. + */ + java.lang.String getApiShortName(); + /** + * + * + *
+   * Used as a tracking tag when collecting data about the APIs developer
+   * relations artifacts like docs, packages delivered to package managers,
+   * etc.  Example: "speech".
+   * 
+ * + * string api_short_name = 103; + * + * @return The bytes for apiShortName. + */ + com.google.protobuf.ByteString getApiShortNameBytes(); + + /** + * + * + *
+   * GitHub label to apply to issues and pull requests opened for this API.
+   * 
+ * + * string github_label = 104; + * + * @return The githubLabel. + */ + java.lang.String getGithubLabel(); + /** + * + * + *
+   * GitHub label to apply to issues and pull requests opened for this API.
+   * 
+ * + * string github_label = 104; + * + * @return The bytes for githubLabel. + */ + com.google.protobuf.ByteString getGithubLabelBytes(); + + /** + * + * + *
+   * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+   * containing source code for the client libraries for this API.
+   * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @return A list containing the codeownerGithubTeams. + */ + java.util.List getCodeownerGithubTeamsList(); + /** + * + * + *
+   * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+   * containing source code for the client libraries for this API.
+   * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @return The count of codeownerGithubTeams. + */ + int getCodeownerGithubTeamsCount(); + /** + * + * + *
+   * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+   * containing source code for the client libraries for this API.
+   * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @param index The index of the element to return. + * @return The codeownerGithubTeams at the given index. + */ + java.lang.String getCodeownerGithubTeams(int index); + /** + * + * + *
+   * GitHub teams to be added to CODEOWNERS in the directory in GitHub
+   * containing source code for the client libraries for this API.
+   * 
+ * + * repeated string codeowner_github_teams = 105; + * + * @param index The index of the value to return. + * @return The bytes of the codeownerGithubTeams at the given index. + */ + com.google.protobuf.ByteString getCodeownerGithubTeamsBytes(int index); + + /** + * + * + *
+   * A prefix used in sample code when demarking regions to be included in
+   * documentation.
+   * 
+ * + * string doc_tag_prefix = 106; + * + * @return The docTagPrefix. + */ + java.lang.String getDocTagPrefix(); + /** + * + * + *
+   * A prefix used in sample code when demarking regions to be included in
+   * documentation.
+   * 
+ * + * string doc_tag_prefix = 106; + * + * @return The bytes for docTagPrefix. + */ + com.google.protobuf.ByteString getDocTagPrefixBytes(); + + /** + * + * + *
+   * For whom the client library is being published.
+   * 
+ * + * .google.api.ClientLibraryOrganization organization = 107; + * + * @return The enum numeric value on the wire for organization. + */ + int getOrganizationValue(); + /** + * + * + *
+   * For whom the client library is being published.
+   * 
+ * + * .google.api.ClientLibraryOrganization organization = 107; + * + * @return The organization. + */ + com.google.api.ClientLibraryOrganization getOrganization(); + + /** + * + * + *
+   * Client library settings.  If the same version string appears multiple
+   * times in this list, then the last one wins.  Settings from earlier
+   * settings with the same version string are discarded.
+   * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + java.util.List getLibrarySettingsList(); + /** + * + * + *
+   * Client library settings.  If the same version string appears multiple
+   * times in this list, then the last one wins.  Settings from earlier
+   * settings with the same version string are discarded.
+   * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + com.google.api.ClientLibrarySettings getLibrarySettings(int index); + /** + * + * + *
+   * Client library settings.  If the same version string appears multiple
+   * times in this list, then the last one wins.  Settings from earlier
+   * settings with the same version string are discarded.
+   * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + int getLibrarySettingsCount(); + /** + * + * + *
+   * Client library settings.  If the same version string appears multiple
+   * times in this list, then the last one wins.  Settings from earlier
+   * settings with the same version string are discarded.
+   * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + java.util.List + getLibrarySettingsOrBuilderList(); + /** + * + * + *
+   * Client library settings.  If the same version string appears multiple
+   * times in this list, then the last one wins.  Settings from earlier
+   * settings with the same version string are discarded.
+   * 
+ * + * repeated .google.api.ClientLibrarySettings library_settings = 109; + */ + com.google.api.ClientLibrarySettingsOrBuilder getLibrarySettingsOrBuilder(int index); + + /** + * + * + *
+   * Optional link to proto reference documentation.  Example:
+   * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+   * 
+ * + * string proto_reference_documentation_uri = 110; + * + * @return The protoReferenceDocumentationUri. + */ + java.lang.String getProtoReferenceDocumentationUri(); + /** + * + * + *
+   * Optional link to proto reference documentation.  Example:
+   * https://cloud.google.com/pubsub/lite/docs/reference/rpc
+   * 
+ * + * string proto_reference_documentation_uri = 110; + * + * @return The bytes for protoReferenceDocumentationUri. + */ + com.google.protobuf.ByteString getProtoReferenceDocumentationUriBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PythonSettings.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PythonSettings.java new file mode 100644 index 000000000000..d85062b822e1 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PythonSettings.java @@ -0,0 +1,690 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +/** + * + * + *
+ * Settings for Python client libraries.
+ * 
+ * + * Protobuf type {@code google.api.PythonSettings} + */ +public final class PythonSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.PythonSettings) + PythonSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use PythonSettings.newBuilder() to construct. + private PythonSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PythonSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PythonSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_PythonSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_PythonSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.PythonSettings.class, com.google.api.PythonSettings.Builder.class); + } + + public static final int COMMON_FIELD_NUMBER = 1; + private com.google.api.CommonLanguageSettings common_; + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + @java.lang.Override + public com.google.api.CommonLanguageSettings getCommon() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + @java.lang.Override + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; + } + + 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 (common_ != null) { + output.writeMessage(1, getCommon()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommon()); + } + 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.api.PythonSettings)) { + return super.equals(obj); + } + com.google.api.PythonSettings other = (com.google.api.PythonSettings) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon().equals(other.getCommon())) 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 (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.PythonSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.PythonSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.PythonSettings parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.PythonSettings 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.api.PythonSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.PythonSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.PythonSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.PythonSettings 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.api.PythonSettings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.PythonSettings 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.api.PythonSettings parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.PythonSettings 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.api.PythonSettings 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; + } + /** + * + * + *
+   * Settings for Python client libraries.
+   * 
+ * + * Protobuf type {@code google.api.PythonSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.PythonSettings) + com.google.api.PythonSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ClientProto.internal_static_google_api_PythonSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ClientProto.internal_static_google_api_PythonSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.PythonSettings.class, com.google.api.PythonSettings.Builder.class); + } + + // Construct using com.google.api.PythonSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.ClientProto.internal_static_google_api_PythonSettings_descriptor; + } + + @java.lang.Override + public com.google.api.PythonSettings getDefaultInstanceForType() { + return com.google.api.PythonSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.PythonSettings build() { + com.google.api.PythonSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.PythonSettings buildPartial() { + com.google.api.PythonSettings result = new com.google.api.PythonSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.PythonSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null ? common_ : commonBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.PythonSettings) { + return mergeFrom((com.google.api.PythonSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.PythonSettings other) { + if (other == com.google.api.PythonSettings.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + 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(getCommonFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.api.CommonLanguageSettings common_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + commonBuilder_; + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + public com.google.api.CommonLanguageSettings getCommon() { + if (commonBuilder_ == null) { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder setCommon(com.google.api.CommonLanguageSettings.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder mergeCommon(com.google.api.CommonLanguageSettings value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && common_ != null + && common_ != com.google.api.CommonLanguageSettings.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettings.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null + ? com.google.api.CommonLanguageSettings.getDefaultInstance() + : common_; + } + } + /** + * + * + *
+     * Some settings.
+     * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.CommonLanguageSettings, + com.google.api.CommonLanguageSettings.Builder, + com.google.api.CommonLanguageSettingsOrBuilder>( + getCommon(), getParentForChildren(), isClean()); + common_ = null; + } + return commonBuilder_; + } + + @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.api.PythonSettings) + } + + // @@protoc_insertion_point(class_scope:google.api.PythonSettings) + private static final com.google.api.PythonSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.PythonSettings(); + } + + public static com.google.api.PythonSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PythonSettings 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.api.PythonSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PythonSettingsOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PythonSettingsOrBuilder.java new file mode 100644 index 000000000000..a3f6e1aad6c2 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/PythonSettingsOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/client.proto + +package com.google.api; + +public interface PythonSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.PythonSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + * + * @return The common. + */ + com.google.api.CommonLanguageSettings getCommon(); + /** + * + * + *
+   * Some settings.
+   * 
+ * + * .google.api.CommonLanguageSettings common = 1; + */ + com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Quota.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Quota.java new file mode 100644 index 000000000000..a193e63d0de7 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/Quota.java @@ -0,0 +1,1517 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/quota.proto + +package com.google.api; + +/** + * + * + *
+ * Quota configuration helps to achieve fairness and budgeting in service
+ * usage.
+ *
+ * The metric based quota configuration works this way:
+ * - The service configuration defines a set of metrics.
+ * - For API calls, the quota.metric_rules maps methods to metrics with
+ *   corresponding costs.
+ * - The quota.limits defines limits on the metrics, which will be used for
+ *   quota checks at runtime.
+ *
+ * An example quota configuration in yaml format:
+ *
+ *    quota:
+ *      limits:
+ *
+ *      - name: apiWriteQpsPerProject
+ *        metric: library.googleapis.com/write_calls
+ *        unit: "1/min/{project}"  # rate limit for consumer projects
+ *        values:
+ *          STANDARD: 10000
+ *
+ *
+ *      (The metric rules bind all methods to the read_calls metric,
+ *       except for the UpdateBook and DeleteBook methods. These two methods
+ *       are mapped to the write_calls metric, with the UpdateBook method
+ *       consuming at twice rate as the DeleteBook method.)
+ *      metric_rules:
+ *      - selector: "*"
+ *        metric_costs:
+ *          library.googleapis.com/read_calls: 1
+ *      - selector: google.example.library.v1.LibraryService.UpdateBook
+ *        metric_costs:
+ *          library.googleapis.com/write_calls: 2
+ *      - selector: google.example.library.v1.LibraryService.DeleteBook
+ *        metric_costs:
+ *          library.googleapis.com/write_calls: 1
+ *
+ *  Corresponding Metric definition:
+ *
+ *      metrics:
+ *      - name: library.googleapis.com/read_calls
+ *        display_name: Read requests
+ *        metric_kind: DELTA
+ *        value_type: INT64
+ *
+ *      - name: library.googleapis.com/write_calls
+ *        display_name: Write requests
+ *        metric_kind: DELTA
+ *        value_type: INT64
+ * 
+ * + * Protobuf type {@code google.api.Quota} + */ +public final class Quota extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.Quota) + QuotaOrBuilder { + private static final long serialVersionUID = 0L; + // Use Quota.newBuilder() to construct. + private Quota(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Quota() { + limits_ = java.util.Collections.emptyList(); + metricRules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Quota(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.QuotaProto.internal_static_google_api_Quota_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.QuotaProto.internal_static_google_api_Quota_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Quota.class, com.google.api.Quota.Builder.class); + } + + public static final int LIMITS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List limits_; + /** + * + * + *
+   * List of QuotaLimit definitions for the service.
+   * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + @java.lang.Override + public java.util.List getLimitsList() { + return limits_; + } + /** + * + * + *
+   * List of QuotaLimit definitions for the service.
+   * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + @java.lang.Override + public java.util.List getLimitsOrBuilderList() { + return limits_; + } + /** + * + * + *
+   * List of QuotaLimit definitions for the service.
+   * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + @java.lang.Override + public int getLimitsCount() { + return limits_.size(); + } + /** + * + * + *
+   * List of QuotaLimit definitions for the service.
+   * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + @java.lang.Override + public com.google.api.QuotaLimit getLimits(int index) { + return limits_.get(index); + } + /** + * + * + *
+   * List of QuotaLimit definitions for the service.
+   * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + @java.lang.Override + public com.google.api.QuotaLimitOrBuilder getLimitsOrBuilder(int index) { + return limits_.get(index); + } + + public static final int METRIC_RULES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List metricRules_; + /** + * + * + *
+   * List of MetricRule definitions, each one mapping a selected method to one
+   * or more metrics.
+   * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + @java.lang.Override + public java.util.List getMetricRulesList() { + return metricRules_; + } + /** + * + * + *
+   * List of MetricRule definitions, each one mapping a selected method to one
+   * or more metrics.
+   * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + @java.lang.Override + public java.util.List + getMetricRulesOrBuilderList() { + return metricRules_; + } + /** + * + * + *
+   * List of MetricRule definitions, each one mapping a selected method to one
+   * or more metrics.
+   * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + @java.lang.Override + public int getMetricRulesCount() { + return metricRules_.size(); + } + /** + * + * + *
+   * List of MetricRule definitions, each one mapping a selected method to one
+   * or more metrics.
+   * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + @java.lang.Override + public com.google.api.MetricRule getMetricRules(int index) { + return metricRules_.get(index); + } + /** + * + * + *
+   * List of MetricRule definitions, each one mapping a selected method to one
+   * or more metrics.
+   * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + @java.lang.Override + public com.google.api.MetricRuleOrBuilder getMetricRulesOrBuilder(int index) { + return metricRules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < limits_.size(); i++) { + output.writeMessage(3, limits_.get(i)); + } + for (int i = 0; i < metricRules_.size(); i++) { + output.writeMessage(4, metricRules_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < limits_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, limits_.get(i)); + } + for (int i = 0; i < metricRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, metricRules_.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.api.Quota)) { + return super.equals(obj); + } + com.google.api.Quota other = (com.google.api.Quota) obj; + + if (!getLimitsList().equals(other.getLimitsList())) return false; + if (!getMetricRulesList().equals(other.getMetricRulesList())) 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 (getLimitsCount() > 0) { + hash = (37 * hash) + LIMITS_FIELD_NUMBER; + hash = (53 * hash) + getLimitsList().hashCode(); + } + if (getMetricRulesCount() > 0) { + hash = (37 * hash) + METRIC_RULES_FIELD_NUMBER; + hash = (53 * hash) + getMetricRulesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.Quota parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Quota parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Quota parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Quota 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.api.Quota parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.Quota parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.Quota parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Quota 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.api.Quota parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.Quota 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.api.Quota parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.Quota 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.api.Quota 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; + } + /** + * + * + *
+   * Quota configuration helps to achieve fairness and budgeting in service
+   * usage.
+   *
+   * The metric based quota configuration works this way:
+   * - The service configuration defines a set of metrics.
+   * - For API calls, the quota.metric_rules maps methods to metrics with
+   *   corresponding costs.
+   * - The quota.limits defines limits on the metrics, which will be used for
+   *   quota checks at runtime.
+   *
+   * An example quota configuration in yaml format:
+   *
+   *    quota:
+   *      limits:
+   *
+   *      - name: apiWriteQpsPerProject
+   *        metric: library.googleapis.com/write_calls
+   *        unit: "1/min/{project}"  # rate limit for consumer projects
+   *        values:
+   *          STANDARD: 10000
+   *
+   *
+   *      (The metric rules bind all methods to the read_calls metric,
+   *       except for the UpdateBook and DeleteBook methods. These two methods
+   *       are mapped to the write_calls metric, with the UpdateBook method
+   *       consuming at twice rate as the DeleteBook method.)
+   *      metric_rules:
+   *      - selector: "*"
+   *        metric_costs:
+   *          library.googleapis.com/read_calls: 1
+   *      - selector: google.example.library.v1.LibraryService.UpdateBook
+   *        metric_costs:
+   *          library.googleapis.com/write_calls: 2
+   *      - selector: google.example.library.v1.LibraryService.DeleteBook
+   *        metric_costs:
+   *          library.googleapis.com/write_calls: 1
+   *
+   *  Corresponding Metric definition:
+   *
+   *      metrics:
+   *      - name: library.googleapis.com/read_calls
+   *        display_name: Read requests
+   *        metric_kind: DELTA
+   *        value_type: INT64
+   *
+   *      - name: library.googleapis.com/write_calls
+   *        display_name: Write requests
+   *        metric_kind: DELTA
+   *        value_type: INT64
+   * 
+ * + * Protobuf type {@code google.api.Quota} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.Quota) + com.google.api.QuotaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.QuotaProto.internal_static_google_api_Quota_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.QuotaProto.internal_static_google_api_Quota_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.Quota.class, com.google.api.Quota.Builder.class); + } + + // Construct using com.google.api.Quota.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (limitsBuilder_ == null) { + limits_ = java.util.Collections.emptyList(); + } else { + limits_ = null; + limitsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (metricRulesBuilder_ == null) { + metricRules_ = java.util.Collections.emptyList(); + } else { + metricRules_ = null; + metricRulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.QuotaProto.internal_static_google_api_Quota_descriptor; + } + + @java.lang.Override + public com.google.api.Quota getDefaultInstanceForType() { + return com.google.api.Quota.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.Quota build() { + com.google.api.Quota result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.Quota buildPartial() { + com.google.api.Quota result = new com.google.api.Quota(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.api.Quota result) { + if (limitsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + limits_ = java.util.Collections.unmodifiableList(limits_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.limits_ = limits_; + } else { + result.limits_ = limitsBuilder_.build(); + } + if (metricRulesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + metricRules_ = java.util.Collections.unmodifiableList(metricRules_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metricRules_ = metricRules_; + } else { + result.metricRules_ = metricRulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.api.Quota result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.Quota) { + return mergeFrom((com.google.api.Quota) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.Quota other) { + if (other == com.google.api.Quota.getDefaultInstance()) return this; + if (limitsBuilder_ == null) { + if (!other.limits_.isEmpty()) { + if (limits_.isEmpty()) { + limits_ = other.limits_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLimitsIsMutable(); + limits_.addAll(other.limits_); + } + onChanged(); + } + } else { + if (!other.limits_.isEmpty()) { + if (limitsBuilder_.isEmpty()) { + limitsBuilder_.dispose(); + limitsBuilder_ = null; + limits_ = other.limits_; + bitField0_ = (bitField0_ & ~0x00000001); + limitsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLimitsFieldBuilder() + : null; + } else { + limitsBuilder_.addAllMessages(other.limits_); + } + } + } + if (metricRulesBuilder_ == null) { + if (!other.metricRules_.isEmpty()) { + if (metricRules_.isEmpty()) { + metricRules_ = other.metricRules_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetricRulesIsMutable(); + metricRules_.addAll(other.metricRules_); + } + onChanged(); + } + } else { + if (!other.metricRules_.isEmpty()) { + if (metricRulesBuilder_.isEmpty()) { + metricRulesBuilder_.dispose(); + metricRulesBuilder_ = null; + metricRules_ = other.metricRules_; + bitField0_ = (bitField0_ & ~0x00000002); + metricRulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricRulesFieldBuilder() + : null; + } else { + metricRulesBuilder_.addAllMessages(other.metricRules_); + } + } + } + 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 26: + { + com.google.api.QuotaLimit m = + input.readMessage(com.google.api.QuotaLimit.parser(), extensionRegistry); + if (limitsBuilder_ == null) { + ensureLimitsIsMutable(); + limits_.add(m); + } else { + limitsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.api.MetricRule m = + input.readMessage(com.google.api.MetricRule.parser(), extensionRegistry); + if (metricRulesBuilder_ == null) { + ensureMetricRulesIsMutable(); + metricRules_.add(m); + } else { + metricRulesBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List limits_ = java.util.Collections.emptyList(); + + private void ensureLimitsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + limits_ = new java.util.ArrayList(limits_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.QuotaLimit, + com.google.api.QuotaLimit.Builder, + com.google.api.QuotaLimitOrBuilder> + limitsBuilder_; + + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public java.util.List getLimitsList() { + if (limitsBuilder_ == null) { + return java.util.Collections.unmodifiableList(limits_); + } else { + return limitsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public int getLimitsCount() { + if (limitsBuilder_ == null) { + return limits_.size(); + } else { + return limitsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public com.google.api.QuotaLimit getLimits(int index) { + if (limitsBuilder_ == null) { + return limits_.get(index); + } else { + return limitsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public Builder setLimits(int index, com.google.api.QuotaLimit value) { + if (limitsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLimitsIsMutable(); + limits_.set(index, value); + onChanged(); + } else { + limitsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public Builder setLimits(int index, com.google.api.QuotaLimit.Builder builderForValue) { + if (limitsBuilder_ == null) { + ensureLimitsIsMutable(); + limits_.set(index, builderForValue.build()); + onChanged(); + } else { + limitsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public Builder addLimits(com.google.api.QuotaLimit value) { + if (limitsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLimitsIsMutable(); + limits_.add(value); + onChanged(); + } else { + limitsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public Builder addLimits(int index, com.google.api.QuotaLimit value) { + if (limitsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLimitsIsMutable(); + limits_.add(index, value); + onChanged(); + } else { + limitsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public Builder addLimits(com.google.api.QuotaLimit.Builder builderForValue) { + if (limitsBuilder_ == null) { + ensureLimitsIsMutable(); + limits_.add(builderForValue.build()); + onChanged(); + } else { + limitsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public Builder addLimits(int index, com.google.api.QuotaLimit.Builder builderForValue) { + if (limitsBuilder_ == null) { + ensureLimitsIsMutable(); + limits_.add(index, builderForValue.build()); + onChanged(); + } else { + limitsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public Builder addAllLimits(java.lang.Iterable values) { + if (limitsBuilder_ == null) { + ensureLimitsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, limits_); + onChanged(); + } else { + limitsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public Builder clearLimits() { + if (limitsBuilder_ == null) { + limits_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + limitsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public Builder removeLimits(int index) { + if (limitsBuilder_ == null) { + ensureLimitsIsMutable(); + limits_.remove(index); + onChanged(); + } else { + limitsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public com.google.api.QuotaLimit.Builder getLimitsBuilder(int index) { + return getLimitsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public com.google.api.QuotaLimitOrBuilder getLimitsOrBuilder(int index) { + if (limitsBuilder_ == null) { + return limits_.get(index); + } else { + return limitsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public java.util.List getLimitsOrBuilderList() { + if (limitsBuilder_ != null) { + return limitsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(limits_); + } + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public com.google.api.QuotaLimit.Builder addLimitsBuilder() { + return getLimitsFieldBuilder().addBuilder(com.google.api.QuotaLimit.getDefaultInstance()); + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public com.google.api.QuotaLimit.Builder addLimitsBuilder(int index) { + return getLimitsFieldBuilder() + .addBuilder(index, com.google.api.QuotaLimit.getDefaultInstance()); + } + /** + * + * + *
+     * List of QuotaLimit definitions for the service.
+     * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + public java.util.List getLimitsBuilderList() { + return getLimitsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.QuotaLimit, + com.google.api.QuotaLimit.Builder, + com.google.api.QuotaLimitOrBuilder> + getLimitsFieldBuilder() { + if (limitsBuilder_ == null) { + limitsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.QuotaLimit, + com.google.api.QuotaLimit.Builder, + com.google.api.QuotaLimitOrBuilder>( + limits_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + limits_ = null; + } + return limitsBuilder_; + } + + private java.util.List metricRules_ = + java.util.Collections.emptyList(); + + private void ensureMetricRulesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + metricRules_ = new java.util.ArrayList(metricRules_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.MetricRule, + com.google.api.MetricRule.Builder, + com.google.api.MetricRuleOrBuilder> + metricRulesBuilder_; + + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public java.util.List getMetricRulesList() { + if (metricRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(metricRules_); + } else { + return metricRulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public int getMetricRulesCount() { + if (metricRulesBuilder_ == null) { + return metricRules_.size(); + } else { + return metricRulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public com.google.api.MetricRule getMetricRules(int index) { + if (metricRulesBuilder_ == null) { + return metricRules_.get(index); + } else { + return metricRulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public Builder setMetricRules(int index, com.google.api.MetricRule value) { + if (metricRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricRulesIsMutable(); + metricRules_.set(index, value); + onChanged(); + } else { + metricRulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public Builder setMetricRules(int index, com.google.api.MetricRule.Builder builderForValue) { + if (metricRulesBuilder_ == null) { + ensureMetricRulesIsMutable(); + metricRules_.set(index, builderForValue.build()); + onChanged(); + } else { + metricRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public Builder addMetricRules(com.google.api.MetricRule value) { + if (metricRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricRulesIsMutable(); + metricRules_.add(value); + onChanged(); + } else { + metricRulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public Builder addMetricRules(int index, com.google.api.MetricRule value) { + if (metricRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricRulesIsMutable(); + metricRules_.add(index, value); + onChanged(); + } else { + metricRulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public Builder addMetricRules(com.google.api.MetricRule.Builder builderForValue) { + if (metricRulesBuilder_ == null) { + ensureMetricRulesIsMutable(); + metricRules_.add(builderForValue.build()); + onChanged(); + } else { + metricRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public Builder addMetricRules(int index, com.google.api.MetricRule.Builder builderForValue) { + if (metricRulesBuilder_ == null) { + ensureMetricRulesIsMutable(); + metricRules_.add(index, builderForValue.build()); + onChanged(); + } else { + metricRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public Builder addAllMetricRules( + java.lang.Iterable values) { + if (metricRulesBuilder_ == null) { + ensureMetricRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metricRules_); + onChanged(); + } else { + metricRulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public Builder clearMetricRules() { + if (metricRulesBuilder_ == null) { + metricRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + metricRulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public Builder removeMetricRules(int index) { + if (metricRulesBuilder_ == null) { + ensureMetricRulesIsMutable(); + metricRules_.remove(index); + onChanged(); + } else { + metricRulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public com.google.api.MetricRule.Builder getMetricRulesBuilder(int index) { + return getMetricRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public com.google.api.MetricRuleOrBuilder getMetricRulesOrBuilder(int index) { + if (metricRulesBuilder_ == null) { + return metricRules_.get(index); + } else { + return metricRulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public java.util.List + getMetricRulesOrBuilderList() { + if (metricRulesBuilder_ != null) { + return metricRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metricRules_); + } + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public com.google.api.MetricRule.Builder addMetricRulesBuilder() { + return getMetricRulesFieldBuilder() + .addBuilder(com.google.api.MetricRule.getDefaultInstance()); + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public com.google.api.MetricRule.Builder addMetricRulesBuilder(int index) { + return getMetricRulesFieldBuilder() + .addBuilder(index, com.google.api.MetricRule.getDefaultInstance()); + } + /** + * + * + *
+     * List of MetricRule definitions, each one mapping a selected method to one
+     * or more metrics.
+     * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + public java.util.List getMetricRulesBuilderList() { + return getMetricRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.MetricRule, + com.google.api.MetricRule.Builder, + com.google.api.MetricRuleOrBuilder> + getMetricRulesFieldBuilder() { + if (metricRulesBuilder_ == null) { + metricRulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.MetricRule, + com.google.api.MetricRule.Builder, + com.google.api.MetricRuleOrBuilder>( + metricRules_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + metricRules_ = null; + } + return metricRulesBuilder_; + } + + @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.api.Quota) + } + + // @@protoc_insertion_point(class_scope:google.api.Quota) + private static final com.google.api.Quota DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.Quota(); + } + + public static com.google.api.Quota getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Quota 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.api.Quota getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaLimit.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaLimit.java new file mode 100644 index 000000000000..e8ee2f0037ea --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaLimit.java @@ -0,0 +1,2401 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/quota.proto + +package com.google.api; + +/** + * + * + *
+ * `QuotaLimit` defines a specific limit that applies over a specified duration
+ * for a limit type. There can be at most one limit for a duration and limit
+ * type combination defined within a `QuotaGroup`.
+ * 
+ * + * Protobuf type {@code google.api.QuotaLimit} + */ +public final class QuotaLimit extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.QuotaLimit) + QuotaLimitOrBuilder { + private static final long serialVersionUID = 0L; + // Use QuotaLimit.newBuilder() to construct. + private QuotaLimit(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QuotaLimit() { + name_ = ""; + description_ = ""; + duration_ = ""; + metric_ = ""; + unit_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QuotaLimit(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 10: + return internalGetValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.QuotaLimit.class, com.google.api.QuotaLimit.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Name of the quota limit.
+   *
+   * The name must be provided, and it must be unique within the service. The
+   * name can only include alphanumeric characters as well as '-'.
+   *
+   * The maximum length of the limit name is 64 characters.
+   * 
+ * + * string name = 6; + * + * @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; + } + } + /** + * + * + *
+   * Name of the quota limit.
+   *
+   * The name must be provided, and it must be unique within the service. The
+   * name can only include alphanumeric characters as well as '-'.
+   *
+   * The maximum length of the limit name is 64 characters.
+   * 
+ * + * string name = 6; + * + * @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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. User-visible, extended description for this quota limit.
+   * Should be used only when more context is needed to understand this limit
+   * than provided by the limit's display name (see: `display_name`).
+   * 
+ * + * string description = 2; + * + * @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. User-visible, extended description for this quota limit.
+   * Should be used only when more context is needed to understand this limit
+   * than provided by the limit's display name (see: `display_name`).
+   * 
+ * + * string description = 2; + * + * @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 DEFAULT_LIMIT_FIELD_NUMBER = 3; + private long defaultLimit_ = 0L; + /** + * + * + *
+   * Default number of tokens that can be consumed during the specified
+   * duration. This is the number of tokens assigned when a client
+   * application developer activates the service for his/her project.
+   *
+   * Specifying a value of 0 will block all requests. This can be used if you
+   * are provisioning quota to selected consumers and blocking others.
+   * Similarly, a value of -1 will indicate an unlimited quota. No other
+   * negative values are allowed.
+   *
+   * Used by group-based quotas only.
+   * 
+ * + * int64 default_limit = 3; + * + * @return The defaultLimit. + */ + @java.lang.Override + public long getDefaultLimit() { + return defaultLimit_; + } + + public static final int MAX_LIMIT_FIELD_NUMBER = 4; + private long maxLimit_ = 0L; + /** + * + * + *
+   * Maximum number of tokens that can be consumed during the specified
+   * duration. Client application developers can override the default limit up
+   * to this maximum. If specified, this value cannot be set to a value less
+   * than the default limit. If not specified, it is set to the default limit.
+   *
+   * To allow clients to apply overrides with no upper bound, set this to -1,
+   * indicating unlimited maximum quota.
+   *
+   * Used by group-based quotas only.
+   * 
+ * + * int64 max_limit = 4; + * + * @return The maxLimit. + */ + @java.lang.Override + public long getMaxLimit() { + return maxLimit_; + } + + public static final int FREE_TIER_FIELD_NUMBER = 7; + private long freeTier_ = 0L; + /** + * + * + *
+   * Free tier value displayed in the Developers Console for this limit.
+   * The free tier is the number of tokens that will be subtracted from the
+   * billed amount when billing is enabled.
+   * This field can only be set on a limit with duration "1d", in a billable
+   * group; it is invalid on any other limit. If this field is not set, it
+   * defaults to 0, indicating that there is no free tier for this service.
+   *
+   * Used by group-based quotas only.
+   * 
+ * + * int64 free_tier = 7; + * + * @return The freeTier. + */ + @java.lang.Override + public long getFreeTier() { + return freeTier_; + } + + public static final int DURATION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object duration_ = ""; + /** + * + * + *
+   * Duration of this limit in textual notation. Must be "100s" or "1d".
+   *
+   * Used by group-based quotas only.
+   * 
+ * + * string duration = 5; + * + * @return The duration. + */ + @java.lang.Override + public java.lang.String getDuration() { + java.lang.Object ref = duration_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + duration_ = s; + return s; + } + } + /** + * + * + *
+   * Duration of this limit in textual notation. Must be "100s" or "1d".
+   *
+   * Used by group-based quotas only.
+   * 
+ * + * string duration = 5; + * + * @return The bytes for duration. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDurationBytes() { + java.lang.Object ref = duration_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + duration_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRIC_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object metric_ = ""; + /** + * + * + *
+   * The name of the metric this quota limit applies to. The quota limits with
+   * the same metric will be checked together during runtime. The metric must be
+   * defined within the service config.
+   * 
+ * + * string metric = 8; + * + * @return The metric. + */ + @java.lang.Override + public java.lang.String getMetric() { + java.lang.Object ref = metric_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metric_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the metric this quota limit applies to. The quota limits with
+   * the same metric will be checked together during runtime. The metric must be
+   * defined within the service config.
+   * 
+ * + * string metric = 8; + * + * @return The bytes for metric. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricBytes() { + java.lang.Object ref = metric_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metric_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNIT_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object unit_ = ""; + /** + * + * + *
+   * Specify the unit of the quota limit. It uses the same syntax as
+   * [Metric.unit][]. The supported unit kinds are determined by the quota
+   * backend system.
+   *
+   * Here are some examples:
+   * * "1/min/{project}" for quota per minute per project.
+   *
+   * Note: the order of unit components is insignificant.
+   * The "1" at the beginning is required to follow the metric unit syntax.
+   * 
+ * + * string unit = 9; + * + * @return The unit. + */ + @java.lang.Override + public java.lang.String getUnit() { + java.lang.Object ref = unit_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + unit_ = s; + return s; + } + } + /** + * + * + *
+   * Specify the unit of the quota limit. It uses the same syntax as
+   * [Metric.unit][]. The supported unit kinds are determined by the quota
+   * backend system.
+   *
+   * Here are some examples:
+   * * "1/min/{project}" for quota per minute per project.
+   *
+   * Note: the order of unit components is insignificant.
+   * The "1" at the beginning is required to follow the metric unit syntax.
+   * 
+ * + * string unit = 9; + * + * @return The bytes for unit. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUnitBytes() { + java.lang.Object ref = unit_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + unit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUES_FIELD_NUMBER = 10; + + private static final class ValuesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_ValuesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField values_; + + private com.google.protobuf.MapField internalGetValues() { + if (values_ == null) { + return com.google.protobuf.MapField.emptyMapField(ValuesDefaultEntryHolder.defaultEntry); + } + return values_; + } + + public int getValuesCount() { + return internalGetValues().getMap().size(); + } + /** + * + * + *
+   * Tiered limit values. You must specify this as a key:value pair, with an
+   * integer value that is the maximum number of requests allowed for the
+   * specified unit. Currently only STANDARD is supported.
+   * 
+ * + * map<string, int64> values = 10; + */ + @java.lang.Override + public boolean containsValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetValues().getMap().containsKey(key); + } + /** Use {@link #getValuesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getValues() { + return getValuesMap(); + } + /** + * + * + *
+   * Tiered limit values. You must specify this as a key:value pair, with an
+   * integer value that is the maximum number of requests allowed for the
+   * specified unit. Currently only STANDARD is supported.
+   * 
+ * + * map<string, int64> values = 10; + */ + @java.lang.Override + public java.util.Map getValuesMap() { + return internalGetValues().getMap(); + } + /** + * + * + *
+   * Tiered limit values. You must specify this as a key:value pair, with an
+   * integer value that is the maximum number of requests allowed for the
+   * specified unit. Currently only STANDARD is supported.
+   * 
+ * + * map<string, int64> values = 10; + */ + @java.lang.Override + public long getValuesOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetValues().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Tiered limit values. You must specify this as a key:value pair, with an
+   * integer value that is the maximum number of requests allowed for the
+   * specified unit. Currently only STANDARD is supported.
+   * 
+ * + * map<string, int64> values = 10; + */ + @java.lang.Override + public long getValuesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetValues().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * User-visible display name for this limit.
+   * Optional. If not set, the UI will provide a default display name based on
+   * the quota configuration. This field can be used to override the default
+   * display name generated from the configuration.
+   * 
+ * + * string display_name = 12; + * + * @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; + } + } + /** + * + * + *
+   * User-visible display name for this limit.
+   * Optional. If not set, the UI will provide a default display name based on
+   * the quota configuration. This field can be used to override the default
+   * display name generated from the configuration.
+   * 
+ * + * string display_name = 12; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (defaultLimit_ != 0L) { + output.writeInt64(3, defaultLimit_); + } + if (maxLimit_ != 0L) { + output.writeInt64(4, maxLimit_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(duration_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, duration_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); + } + if (freeTier_ != 0L) { + output.writeInt64(7, freeTier_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metric_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, metric_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, unit_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetValues(), ValuesDefaultEntryHolder.defaultEntry, 10); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, displayName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (defaultLimit_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, defaultLimit_); + } + if (maxLimit_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, maxLimit_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(duration_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, duration_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); + } + if (freeTier_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, freeTier_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metric_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, metric_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, unit_); + } + for (java.util.Map.Entry entry : + internalGetValues().getMap().entrySet()) { + com.google.protobuf.MapEntry values__ = + ValuesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, values__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, displayName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.QuotaLimit)) { + return super.equals(obj); + } + com.google.api.QuotaLimit other = (com.google.api.QuotaLimit) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getDefaultLimit() != other.getDefaultLimit()) return false; + if (getMaxLimit() != other.getMaxLimit()) return false; + if (getFreeTier() != other.getFreeTier()) return false; + if (!getDuration().equals(other.getDuration())) return false; + if (!getMetric().equals(other.getMetric())) return false; + if (!getUnit().equals(other.getUnit())) return false; + if (!internalGetValues().equals(other.internalGetValues())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DEFAULT_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDefaultLimit()); + hash = (37 * hash) + MAX_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxLimit()); + hash = (37 * hash) + FREE_TIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFreeTier()); + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration().hashCode(); + hash = (37 * hash) + METRIC_FIELD_NUMBER; + hash = (53 * hash) + getMetric().hashCode(); + hash = (37 * hash) + UNIT_FIELD_NUMBER; + hash = (53 * hash) + getUnit().hashCode(); + if (!internalGetValues().getMap().isEmpty()) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + internalGetValues().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.QuotaLimit parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.QuotaLimit parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.QuotaLimit parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.QuotaLimit 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.api.QuotaLimit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.QuotaLimit parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.QuotaLimit parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.QuotaLimit 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.api.QuotaLimit parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.QuotaLimit 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.api.QuotaLimit parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.QuotaLimit 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.api.QuotaLimit 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; + } + /** + * + * + *
+   * `QuotaLimit` defines a specific limit that applies over a specified duration
+   * for a limit type. There can be at most one limit for a duration and limit
+   * type combination defined within a `QuotaGroup`.
+   * 
+ * + * Protobuf type {@code google.api.QuotaLimit} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.QuotaLimit) + com.google.api.QuotaLimitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 10: + return internalGetValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 10: + return internalGetMutableValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.QuotaLimit.class, com.google.api.QuotaLimit.Builder.class); + } + + // Construct using com.google.api.QuotaLimit.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + defaultLimit_ = 0L; + maxLimit_ = 0L; + freeTier_ = 0L; + duration_ = ""; + metric_ = ""; + unit_ = ""; + internalGetMutableValues().clear(); + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.QuotaProto.internal_static_google_api_QuotaLimit_descriptor; + } + + @java.lang.Override + public com.google.api.QuotaLimit getDefaultInstanceForType() { + return com.google.api.QuotaLimit.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.QuotaLimit build() { + com.google.api.QuotaLimit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.QuotaLimit buildPartial() { + com.google.api.QuotaLimit result = new com.google.api.QuotaLimit(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.api.QuotaLimit result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.defaultLimit_ = defaultLimit_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.maxLimit_ = maxLimit_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.freeTier_ = freeTier_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.duration_ = duration_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.metric_ = metric_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.unit_ = unit_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.values_ = internalGetValues(); + result.values_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.displayName_ = displayName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.QuotaLimit) { + return mergeFrom((com.google.api.QuotaLimit) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.QuotaLimit other) { + if (other == com.google.api.QuotaLimit.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getDefaultLimit() != 0L) { + setDefaultLimit(other.getDefaultLimit()); + } + if (other.getMaxLimit() != 0L) { + setMaxLimit(other.getMaxLimit()); + } + if (other.getFreeTier() != 0L) { + setFreeTier(other.getFreeTier()); + } + if (!other.getDuration().isEmpty()) { + duration_ = other.duration_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getMetric().isEmpty()) { + metric_ = other.metric_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getUnit().isEmpty()) { + unit_ = other.unit_; + bitField0_ |= 0x00000080; + onChanged(); + } + internalGetMutableValues().mergeFrom(other.internalGetValues()); + bitField0_ |= 0x00000100; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + 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 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + defaultLimit_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + maxLimit_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + duration_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 50 + case 56: + { + freeTier_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 56 + case 66: + { + metric_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 74: + { + unit_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + com.google.protobuf.MapEntry values__ = + input.readMessage( + ValuesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableValues() + .getMutableMap() + .put(values__.getKey(), values__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 98: + { + displayName_ = 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_ = ""; + /** + * + * + *
+     * Name of the quota limit.
+     *
+     * The name must be provided, and it must be unique within the service. The
+     * name can only include alphanumeric characters as well as '-'.
+     *
+     * The maximum length of the limit name is 64 characters.
+     * 
+ * + * string name = 6; + * + * @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; + } + } + /** + * + * + *
+     * Name of the quota limit.
+     *
+     * The name must be provided, and it must be unique within the service. The
+     * name can only include alphanumeric characters as well as '-'.
+     *
+     * The maximum length of the limit name is 64 characters.
+     * 
+ * + * string name = 6; + * + * @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; + } + } + /** + * + * + *
+     * Name of the quota limit.
+     *
+     * The name must be provided, and it must be unique within the service. The
+     * name can only include alphanumeric characters as well as '-'.
+     *
+     * The maximum length of the limit name is 64 characters.
+     * 
+ * + * string name = 6; + * + * @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; + } + /** + * + * + *
+     * Name of the quota limit.
+     *
+     * The name must be provided, and it must be unique within the service. The
+     * name can only include alphanumeric characters as well as '-'.
+     *
+     * The maximum length of the limit name is 64 characters.
+     * 
+ * + * string name = 6; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the quota limit.
+     *
+     * The name must be provided, and it must be unique within the service. The
+     * name can only include alphanumeric characters as well as '-'.
+     *
+     * The maximum length of the limit name is 64 characters.
+     * 
+ * + * string name = 6; + * + * @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 description_ = ""; + /** + * + * + *
+     * Optional. User-visible, extended description for this quota limit.
+     * Should be used only when more context is needed to understand this limit
+     * than provided by the limit's display name (see: `display_name`).
+     * 
+ * + * string description = 2; + * + * @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. User-visible, extended description for this quota limit.
+     * Should be used only when more context is needed to understand this limit
+     * than provided by the limit's display name (see: `display_name`).
+     * 
+ * + * string description = 2; + * + * @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. User-visible, extended description for this quota limit.
+     * Should be used only when more context is needed to understand this limit
+     * than provided by the limit's display name (see: `display_name`).
+     * 
+ * + * string description = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-visible, extended description for this quota limit.
+     * Should be used only when more context is needed to understand this limit
+     * than provided by the limit's display name (see: `display_name`).
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-visible, extended description for this quota limit.
+     * Should be used only when more context is needed to understand this limit
+     * than provided by the limit's display name (see: `display_name`).
+     * 
+ * + * string description = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private long defaultLimit_; + /** + * + * + *
+     * Default number of tokens that can be consumed during the specified
+     * duration. This is the number of tokens assigned when a client
+     * application developer activates the service for his/her project.
+     *
+     * Specifying a value of 0 will block all requests. This can be used if you
+     * are provisioning quota to selected consumers and blocking others.
+     * Similarly, a value of -1 will indicate an unlimited quota. No other
+     * negative values are allowed.
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * int64 default_limit = 3; + * + * @return The defaultLimit. + */ + @java.lang.Override + public long getDefaultLimit() { + return defaultLimit_; + } + /** + * + * + *
+     * Default number of tokens that can be consumed during the specified
+     * duration. This is the number of tokens assigned when a client
+     * application developer activates the service for his/her project.
+     *
+     * Specifying a value of 0 will block all requests. This can be used if you
+     * are provisioning quota to selected consumers and blocking others.
+     * Similarly, a value of -1 will indicate an unlimited quota. No other
+     * negative values are allowed.
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * int64 default_limit = 3; + * + * @param value The defaultLimit to set. + * @return This builder for chaining. + */ + public Builder setDefaultLimit(long value) { + + defaultLimit_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Default number of tokens that can be consumed during the specified
+     * duration. This is the number of tokens assigned when a client
+     * application developer activates the service for his/her project.
+     *
+     * Specifying a value of 0 will block all requests. This can be used if you
+     * are provisioning quota to selected consumers and blocking others.
+     * Similarly, a value of -1 will indicate an unlimited quota. No other
+     * negative values are allowed.
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * int64 default_limit = 3; + * + * @return This builder for chaining. + */ + public Builder clearDefaultLimit() { + bitField0_ = (bitField0_ & ~0x00000004); + defaultLimit_ = 0L; + onChanged(); + return this; + } + + private long maxLimit_; + /** + * + * + *
+     * Maximum number of tokens that can be consumed during the specified
+     * duration. Client application developers can override the default limit up
+     * to this maximum. If specified, this value cannot be set to a value less
+     * than the default limit. If not specified, it is set to the default limit.
+     *
+     * To allow clients to apply overrides with no upper bound, set this to -1,
+     * indicating unlimited maximum quota.
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * int64 max_limit = 4; + * + * @return The maxLimit. + */ + @java.lang.Override + public long getMaxLimit() { + return maxLimit_; + } + /** + * + * + *
+     * Maximum number of tokens that can be consumed during the specified
+     * duration. Client application developers can override the default limit up
+     * to this maximum. If specified, this value cannot be set to a value less
+     * than the default limit. If not specified, it is set to the default limit.
+     *
+     * To allow clients to apply overrides with no upper bound, set this to -1,
+     * indicating unlimited maximum quota.
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * int64 max_limit = 4; + * + * @param value The maxLimit to set. + * @return This builder for chaining. + */ + public Builder setMaxLimit(long value) { + + maxLimit_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of tokens that can be consumed during the specified
+     * duration. Client application developers can override the default limit up
+     * to this maximum. If specified, this value cannot be set to a value less
+     * than the default limit. If not specified, it is set to the default limit.
+     *
+     * To allow clients to apply overrides with no upper bound, set this to -1,
+     * indicating unlimited maximum quota.
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * int64 max_limit = 4; + * + * @return This builder for chaining. + */ + public Builder clearMaxLimit() { + bitField0_ = (bitField0_ & ~0x00000008); + maxLimit_ = 0L; + onChanged(); + return this; + } + + private long freeTier_; + /** + * + * + *
+     * Free tier value displayed in the Developers Console for this limit.
+     * The free tier is the number of tokens that will be subtracted from the
+     * billed amount when billing is enabled.
+     * This field can only be set on a limit with duration "1d", in a billable
+     * group; it is invalid on any other limit. If this field is not set, it
+     * defaults to 0, indicating that there is no free tier for this service.
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * int64 free_tier = 7; + * + * @return The freeTier. + */ + @java.lang.Override + public long getFreeTier() { + return freeTier_; + } + /** + * + * + *
+     * Free tier value displayed in the Developers Console for this limit.
+     * The free tier is the number of tokens that will be subtracted from the
+     * billed amount when billing is enabled.
+     * This field can only be set on a limit with duration "1d", in a billable
+     * group; it is invalid on any other limit. If this field is not set, it
+     * defaults to 0, indicating that there is no free tier for this service.
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * int64 free_tier = 7; + * + * @param value The freeTier to set. + * @return This builder for chaining. + */ + public Builder setFreeTier(long value) { + + freeTier_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Free tier value displayed in the Developers Console for this limit.
+     * The free tier is the number of tokens that will be subtracted from the
+     * billed amount when billing is enabled.
+     * This field can only be set on a limit with duration "1d", in a billable
+     * group; it is invalid on any other limit. If this field is not set, it
+     * defaults to 0, indicating that there is no free tier for this service.
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * int64 free_tier = 7; + * + * @return This builder for chaining. + */ + public Builder clearFreeTier() { + bitField0_ = (bitField0_ & ~0x00000010); + freeTier_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object duration_ = ""; + /** + * + * + *
+     * Duration of this limit in textual notation. Must be "100s" or "1d".
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * string duration = 5; + * + * @return The duration. + */ + public java.lang.String getDuration() { + java.lang.Object ref = duration_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + duration_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Duration of this limit in textual notation. Must be "100s" or "1d".
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * string duration = 5; + * + * @return The bytes for duration. + */ + public com.google.protobuf.ByteString getDurationBytes() { + java.lang.Object ref = duration_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + duration_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Duration of this limit in textual notation. Must be "100s" or "1d".
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * string duration = 5; + * + * @param value The duration to set. + * @return This builder for chaining. + */ + public Builder setDuration(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + duration_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Duration of this limit in textual notation. Must be "100s" or "1d".
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * string duration = 5; + * + * @return This builder for chaining. + */ + public Builder clearDuration() { + duration_ = getDefaultInstance().getDuration(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Duration of this limit in textual notation. Must be "100s" or "1d".
+     *
+     * Used by group-based quotas only.
+     * 
+ * + * string duration = 5; + * + * @param value The bytes for duration to set. + * @return This builder for chaining. + */ + public Builder setDurationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + duration_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object metric_ = ""; + /** + * + * + *
+     * The name of the metric this quota limit applies to. The quota limits with
+     * the same metric will be checked together during runtime. The metric must be
+     * defined within the service config.
+     * 
+ * + * string metric = 8; + * + * @return The metric. + */ + public java.lang.String getMetric() { + java.lang.Object ref = metric_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metric_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the metric this quota limit applies to. The quota limits with
+     * the same metric will be checked together during runtime. The metric must be
+     * defined within the service config.
+     * 
+ * + * string metric = 8; + * + * @return The bytes for metric. + */ + public com.google.protobuf.ByteString getMetricBytes() { + java.lang.Object ref = metric_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metric_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the metric this quota limit applies to. The quota limits with
+     * the same metric will be checked together during runtime. The metric must be
+     * defined within the service config.
+     * 
+ * + * string metric = 8; + * + * @param value The metric to set. + * @return This builder for chaining. + */ + public Builder setMetric(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + metric_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the metric this quota limit applies to. The quota limits with
+     * the same metric will be checked together during runtime. The metric must be
+     * defined within the service config.
+     * 
+ * + * string metric = 8; + * + * @return This builder for chaining. + */ + public Builder clearMetric() { + metric_ = getDefaultInstance().getMetric(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the metric this quota limit applies to. The quota limits with
+     * the same metric will be checked together during runtime. The metric must be
+     * defined within the service config.
+     * 
+ * + * string metric = 8; + * + * @param value The bytes for metric to set. + * @return This builder for chaining. + */ + public Builder setMetricBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + metric_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object unit_ = ""; + /** + * + * + *
+     * Specify the unit of the quota limit. It uses the same syntax as
+     * [Metric.unit][]. The supported unit kinds are determined by the quota
+     * backend system.
+     *
+     * Here are some examples:
+     * * "1/min/{project}" for quota per minute per project.
+     *
+     * Note: the order of unit components is insignificant.
+     * The "1" at the beginning is required to follow the metric unit syntax.
+     * 
+ * + * string unit = 9; + * + * @return The unit. + */ + public java.lang.String getUnit() { + java.lang.Object ref = unit_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + unit_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specify the unit of the quota limit. It uses the same syntax as
+     * [Metric.unit][]. The supported unit kinds are determined by the quota
+     * backend system.
+     *
+     * Here are some examples:
+     * * "1/min/{project}" for quota per minute per project.
+     *
+     * Note: the order of unit components is insignificant.
+     * The "1" at the beginning is required to follow the metric unit syntax.
+     * 
+ * + * string unit = 9; + * + * @return The bytes for unit. + */ + public com.google.protobuf.ByteString getUnitBytes() { + java.lang.Object ref = unit_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + unit_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specify the unit of the quota limit. It uses the same syntax as
+     * [Metric.unit][]. The supported unit kinds are determined by the quota
+     * backend system.
+     *
+     * Here are some examples:
+     * * "1/min/{project}" for quota per minute per project.
+     *
+     * Note: the order of unit components is insignificant.
+     * The "1" at the beginning is required to follow the metric unit syntax.
+     * 
+ * + * string unit = 9; + * + * @param value The unit to set. + * @return This builder for chaining. + */ + public Builder setUnit(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + unit_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Specify the unit of the quota limit. It uses the same syntax as
+     * [Metric.unit][]. The supported unit kinds are determined by the quota
+     * backend system.
+     *
+     * Here are some examples:
+     * * "1/min/{project}" for quota per minute per project.
+     *
+     * Note: the order of unit components is insignificant.
+     * The "1" at the beginning is required to follow the metric unit syntax.
+     * 
+ * + * string unit = 9; + * + * @return This builder for chaining. + */ + public Builder clearUnit() { + unit_ = getDefaultInstance().getUnit(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Specify the unit of the quota limit. It uses the same syntax as
+     * [Metric.unit][]. The supported unit kinds are determined by the quota
+     * backend system.
+     *
+     * Here are some examples:
+     * * "1/min/{project}" for quota per minute per project.
+     *
+     * Note: the order of unit components is insignificant.
+     * The "1" at the beginning is required to follow the metric unit syntax.
+     * 
+ * + * string unit = 9; + * + * @param value The bytes for unit to set. + * @return This builder for chaining. + */ + public Builder setUnitBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + unit_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.MapField values_; + + private com.google.protobuf.MapField internalGetValues() { + if (values_ == null) { + return com.google.protobuf.MapField.emptyMapField(ValuesDefaultEntryHolder.defaultEntry); + } + return values_; + } + + private com.google.protobuf.MapField + internalGetMutableValues() { + if (values_ == null) { + values_ = com.google.protobuf.MapField.newMapField(ValuesDefaultEntryHolder.defaultEntry); + } + if (!values_.isMutable()) { + values_ = values_.copy(); + } + bitField0_ |= 0x00000100; + onChanged(); + return values_; + } + + public int getValuesCount() { + return internalGetValues().getMap().size(); + } + /** + * + * + *
+     * Tiered limit values. You must specify this as a key:value pair, with an
+     * integer value that is the maximum number of requests allowed for the
+     * specified unit. Currently only STANDARD is supported.
+     * 
+ * + * map<string, int64> values = 10; + */ + @java.lang.Override + public boolean containsValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetValues().getMap().containsKey(key); + } + /** Use {@link #getValuesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getValues() { + return getValuesMap(); + } + /** + * + * + *
+     * Tiered limit values. You must specify this as a key:value pair, with an
+     * integer value that is the maximum number of requests allowed for the
+     * specified unit. Currently only STANDARD is supported.
+     * 
+ * + * map<string, int64> values = 10; + */ + @java.lang.Override + public java.util.Map getValuesMap() { + return internalGetValues().getMap(); + } + /** + * + * + *
+     * Tiered limit values. You must specify this as a key:value pair, with an
+     * integer value that is the maximum number of requests allowed for the
+     * specified unit. Currently only STANDARD is supported.
+     * 
+ * + * map<string, int64> values = 10; + */ + @java.lang.Override + public long getValuesOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetValues().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Tiered limit values. You must specify this as a key:value pair, with an
+     * integer value that is the maximum number of requests allowed for the
+     * specified unit. Currently only STANDARD is supported.
+     * 
+ * + * map<string, int64> values = 10; + */ + @java.lang.Override + public long getValuesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetValues().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearValues() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableValues().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Tiered limit values. You must specify this as a key:value pair, with an
+     * integer value that is the maximum number of requests allowed for the
+     * specified unit. Currently only STANDARD is supported.
+     * 
+ * + * map<string, int64> values = 10; + */ + public Builder removeValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableValues().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableValues() { + bitField0_ |= 0x00000100; + return internalGetMutableValues().getMutableMap(); + } + /** + * + * + *
+     * Tiered limit values. You must specify this as a key:value pair, with an
+     * integer value that is the maximum number of requests allowed for the
+     * specified unit. Currently only STANDARD is supported.
+     * 
+ * + * map<string, int64> values = 10; + */ + public Builder putValues(java.lang.String key, long value) { + if (key == null) { + throw new NullPointerException("map key"); + } + + internalGetMutableValues().getMutableMap().put(key, value); + bitField0_ |= 0x00000100; + return this; + } + /** + * + * + *
+     * Tiered limit values. You must specify this as a key:value pair, with an
+     * integer value that is the maximum number of requests allowed for the
+     * specified unit. Currently only STANDARD is supported.
+     * 
+ * + * map<string, int64> values = 10; + */ + public Builder putAllValues(java.util.Map values) { + internalGetMutableValues().getMutableMap().putAll(values); + bitField0_ |= 0x00000100; + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * User-visible display name for this limit.
+     * Optional. If not set, the UI will provide a default display name based on
+     * the quota configuration. This field can be used to override the default
+     * display name generated from the configuration.
+     * 
+ * + * string display_name = 12; + * + * @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; + } + } + /** + * + * + *
+     * User-visible display name for this limit.
+     * Optional. If not set, the UI will provide a default display name based on
+     * the quota configuration. This field can be used to override the default
+     * display name generated from the configuration.
+     * 
+ * + * string display_name = 12; + * + * @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; + } + } + /** + * + * + *
+     * User-visible display name for this limit.
+     * Optional. If not set, the UI will provide a default display name based on
+     * the quota configuration. This field can be used to override the default
+     * display name generated from the configuration.
+     * 
+ * + * string display_name = 12; + * + * @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_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * User-visible display name for this limit.
+     * Optional. If not set, the UI will provide a default display name based on
+     * the quota configuration. This field can be used to override the default
+     * display name generated from the configuration.
+     * 
+ * + * string display_name = 12; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * User-visible display name for this limit.
+     * Optional. If not set, the UI will provide a default display name based on
+     * the quota configuration. This field can be used to override the default
+     * display name generated from the configuration.
+     * 
+ * + * string display_name = 12; + * + * @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_ |= 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.api.QuotaLimit) + } + + // @@protoc_insertion_point(class_scope:google.api.QuotaLimit) + private static final com.google.api.QuotaLimit DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.QuotaLimit(); + } + + public static com.google.api.QuotaLimit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QuotaLimit 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.api.QuotaLimit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaLimitOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaLimitOrBuilder.java new file mode 100644 index 000000000000..e88fd25a776c --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaLimitOrBuilder.java @@ -0,0 +1,346 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/quota.proto + +package com.google.api; + +public interface QuotaLimitOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.QuotaLimit) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the quota limit.
+   *
+   * The name must be provided, and it must be unique within the service. The
+   * name can only include alphanumeric characters as well as '-'.
+   *
+   * The maximum length of the limit name is 64 characters.
+   * 
+ * + * string name = 6; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the quota limit.
+   *
+   * The name must be provided, and it must be unique within the service. The
+   * name can only include alphanumeric characters as well as '-'.
+   *
+   * The maximum length of the limit name is 64 characters.
+   * 
+ * + * string name = 6; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. User-visible, extended description for this quota limit.
+   * Should be used only when more context is needed to understand this limit
+   * than provided by the limit's display name (see: `display_name`).
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. User-visible, extended description for this quota limit.
+   * Should be used only when more context is needed to understand this limit
+   * than provided by the limit's display name (see: `display_name`).
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Default number of tokens that can be consumed during the specified
+   * duration. This is the number of tokens assigned when a client
+   * application developer activates the service for his/her project.
+   *
+   * Specifying a value of 0 will block all requests. This can be used if you
+   * are provisioning quota to selected consumers and blocking others.
+   * Similarly, a value of -1 will indicate an unlimited quota. No other
+   * negative values are allowed.
+   *
+   * Used by group-based quotas only.
+   * 
+ * + * int64 default_limit = 3; + * + * @return The defaultLimit. + */ + long getDefaultLimit(); + + /** + * + * + *
+   * Maximum number of tokens that can be consumed during the specified
+   * duration. Client application developers can override the default limit up
+   * to this maximum. If specified, this value cannot be set to a value less
+   * than the default limit. If not specified, it is set to the default limit.
+   *
+   * To allow clients to apply overrides with no upper bound, set this to -1,
+   * indicating unlimited maximum quota.
+   *
+   * Used by group-based quotas only.
+   * 
+ * + * int64 max_limit = 4; + * + * @return The maxLimit. + */ + long getMaxLimit(); + + /** + * + * + *
+   * Free tier value displayed in the Developers Console for this limit.
+   * The free tier is the number of tokens that will be subtracted from the
+   * billed amount when billing is enabled.
+   * This field can only be set on a limit with duration "1d", in a billable
+   * group; it is invalid on any other limit. If this field is not set, it
+   * defaults to 0, indicating that there is no free tier for this service.
+   *
+   * Used by group-based quotas only.
+   * 
+ * + * int64 free_tier = 7; + * + * @return The freeTier. + */ + long getFreeTier(); + + /** + * + * + *
+   * Duration of this limit in textual notation. Must be "100s" or "1d".
+   *
+   * Used by group-based quotas only.
+   * 
+ * + * string duration = 5; + * + * @return The duration. + */ + java.lang.String getDuration(); + /** + * + * + *
+   * Duration of this limit in textual notation. Must be "100s" or "1d".
+   *
+   * Used by group-based quotas only.
+   * 
+ * + * string duration = 5; + * + * @return The bytes for duration. + */ + com.google.protobuf.ByteString getDurationBytes(); + + /** + * + * + *
+   * The name of the metric this quota limit applies to. The quota limits with
+   * the same metric will be checked together during runtime. The metric must be
+   * defined within the service config.
+   * 
+ * + * string metric = 8; + * + * @return The metric. + */ + java.lang.String getMetric(); + /** + * + * + *
+   * The name of the metric this quota limit applies to. The quota limits with
+   * the same metric will be checked together during runtime. The metric must be
+   * defined within the service config.
+   * 
+ * + * string metric = 8; + * + * @return The bytes for metric. + */ + com.google.protobuf.ByteString getMetricBytes(); + + /** + * + * + *
+   * Specify the unit of the quota limit. It uses the same syntax as
+   * [Metric.unit][]. The supported unit kinds are determined by the quota
+   * backend system.
+   *
+   * Here are some examples:
+   * * "1/min/{project}" for quota per minute per project.
+   *
+   * Note: the order of unit components is insignificant.
+   * The "1" at the beginning is required to follow the metric unit syntax.
+   * 
+ * + * string unit = 9; + * + * @return The unit. + */ + java.lang.String getUnit(); + /** + * + * + *
+   * Specify the unit of the quota limit. It uses the same syntax as
+   * [Metric.unit][]. The supported unit kinds are determined by the quota
+   * backend system.
+   *
+   * Here are some examples:
+   * * "1/min/{project}" for quota per minute per project.
+   *
+   * Note: the order of unit components is insignificant.
+   * The "1" at the beginning is required to follow the metric unit syntax.
+   * 
+ * + * string unit = 9; + * + * @return The bytes for unit. + */ + com.google.protobuf.ByteString getUnitBytes(); + + /** + * + * + *
+   * Tiered limit values. You must specify this as a key:value pair, with an
+   * integer value that is the maximum number of requests allowed for the
+   * specified unit. Currently only STANDARD is supported.
+   * 
+ * + * map<string, int64> values = 10; + */ + int getValuesCount(); + /** + * + * + *
+   * Tiered limit values. You must specify this as a key:value pair, with an
+   * integer value that is the maximum number of requests allowed for the
+   * specified unit. Currently only STANDARD is supported.
+   * 
+ * + * map<string, int64> values = 10; + */ + boolean containsValues(java.lang.String key); + /** Use {@link #getValuesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getValues(); + /** + * + * + *
+   * Tiered limit values. You must specify this as a key:value pair, with an
+   * integer value that is the maximum number of requests allowed for the
+   * specified unit. Currently only STANDARD is supported.
+   * 
+ * + * map<string, int64> values = 10; + */ + java.util.Map getValuesMap(); + /** + * + * + *
+   * Tiered limit values. You must specify this as a key:value pair, with an
+   * integer value that is the maximum number of requests allowed for the
+   * specified unit. Currently only STANDARD is supported.
+   * 
+ * + * map<string, int64> values = 10; + */ + long getValuesOrDefault(java.lang.String key, long defaultValue); + /** + * + * + *
+   * Tiered limit values. You must specify this as a key:value pair, with an
+   * integer value that is the maximum number of requests allowed for the
+   * specified unit. Currently only STANDARD is supported.
+   * 
+ * + * map<string, int64> values = 10; + */ + long getValuesOrThrow(java.lang.String key); + + /** + * + * + *
+   * User-visible display name for this limit.
+   * Optional. If not set, the UI will provide a default display name based on
+   * the quota configuration. This field can be used to override the default
+   * display name generated from the configuration.
+   * 
+ * + * string display_name = 12; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * User-visible display name for this limit.
+   * Optional. If not set, the UI will provide a default display name based on
+   * the quota configuration. This field can be used to override the default
+   * display name generated from the configuration.
+   * 
+ * + * string display_name = 12; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaOrBuilder.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaOrBuilder.java new file mode 100644 index 000000000000..63396094b1d3 --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaOrBuilder.java @@ -0,0 +1,132 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/quota.proto + +package com.google.api; + +public interface QuotaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.Quota) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of QuotaLimit definitions for the service.
+   * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + java.util.List getLimitsList(); + /** + * + * + *
+   * List of QuotaLimit definitions for the service.
+   * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + com.google.api.QuotaLimit getLimits(int index); + /** + * + * + *
+   * List of QuotaLimit definitions for the service.
+   * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + int getLimitsCount(); + /** + * + * + *
+   * List of QuotaLimit definitions for the service.
+   * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + java.util.List getLimitsOrBuilderList(); + /** + * + * + *
+   * List of QuotaLimit definitions for the service.
+   * 
+ * + * repeated .google.api.QuotaLimit limits = 3; + */ + com.google.api.QuotaLimitOrBuilder getLimitsOrBuilder(int index); + + /** + * + * + *
+   * List of MetricRule definitions, each one mapping a selected method to one
+   * or more metrics.
+   * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + java.util.List getMetricRulesList(); + /** + * + * + *
+   * List of MetricRule definitions, each one mapping a selected method to one
+   * or more metrics.
+   * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + com.google.api.MetricRule getMetricRules(int index); + /** + * + * + *
+   * List of MetricRule definitions, each one mapping a selected method to one
+   * or more metrics.
+   * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + int getMetricRulesCount(); + /** + * + * + *
+   * List of MetricRule definitions, each one mapping a selected method to one
+   * or more metrics.
+   * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + java.util.List getMetricRulesOrBuilderList(); + /** + * + * + *
+   * List of MetricRule definitions, each one mapping a selected method to one
+   * or more metrics.
+   * 
+ * + * repeated .google.api.MetricRule metric_rules = 4; + */ + com.google.api.MetricRuleOrBuilder getMetricRulesOrBuilder(int index); +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaProto.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaProto.java new file mode 100644 index 000000000000..a3d668deba5d --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/QuotaProto.java @@ -0,0 +1,129 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/quota.proto + +package com.google.api; + +public final class QuotaProto { + private QuotaProto() {} + + 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_api_Quota_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_Quota_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MetricRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MetricRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_MetricRule_MetricCostsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_MetricRule_MetricCostsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_QuotaLimit_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_QuotaLimit_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_QuotaLimit_ValuesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_QuotaLimit_ValuesEntry_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\026google/api/quota.proto\022\ngoogle.api\"]\n\005" + + "Quota\022&\n\006limits\030\003 \003(\0132\026.google.api.Quota" + + "Limit\022,\n\014metric_rules\030\004 \003(\0132\026.google.api" + + ".MetricRule\"\221\001\n\nMetricRule\022\020\n\010selector\030\001" + + " \001(\t\022=\n\014metric_costs\030\002 \003(\0132\'.google.api." + + "MetricRule.MetricCostsEntry\0322\n\020MetricCos" + + "tsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\0028\001\"" + + "\225\002\n\nQuotaLimit\022\014\n\004name\030\006 \001(\t\022\023\n\013descript" + + "ion\030\002 \001(\t\022\025\n\rdefault_limit\030\003 \001(\003\022\021\n\tmax_" + + "limit\030\004 \001(\003\022\021\n\tfree_tier\030\007 \001(\003\022\020\n\010durati" + + "on\030\005 \001(\t\022\016\n\006metric\030\010 \001(\t\022\014\n\004unit\030\t \001(\t\0222" + + "\n\006values\030\n \003(\0132\".google.api.QuotaLimit.V" + + "aluesEntry\022\024\n\014display_name\030\014 \001(\t\032-\n\013Valu" + + "esEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\0028\001B" + + "l\n\016com.google.apiB\nQuotaProtoP\001ZEgoogle." + + "golang.org/genproto/googleapis/api/servi" + + "ceconfig;serviceconfig\242\002\004GAPIb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_api_Quota_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_api_Quota_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_Quota_descriptor, + new java.lang.String[] { + "Limits", "MetricRules", + }); + internal_static_google_api_MetricRule_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_api_MetricRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MetricRule_descriptor, + new java.lang.String[] { + "Selector", "MetricCosts", + }); + internal_static_google_api_MetricRule_MetricCostsEntry_descriptor = + internal_static_google_api_MetricRule_descriptor.getNestedTypes().get(0); + internal_static_google_api_MetricRule_MetricCostsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_MetricRule_MetricCostsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_api_QuotaLimit_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_google_api_QuotaLimit_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_QuotaLimit_descriptor, + new java.lang.String[] { + "Name", + "Description", + "DefaultLimit", + "MaxLimit", + "FreeTier", + "Duration", + "Metric", + "Unit", + "Values", + "DisplayName", + }); + internal_static_google_api_QuotaLimit_ValuesEntry_descriptor = + internal_static_google_api_QuotaLimit_descriptor.getNestedTypes().get(0); + internal_static_google_api_QuotaLimit_ValuesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_QuotaLimit_ValuesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ResourceDescriptor.java b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ResourceDescriptor.java new file mode 100644 index 000000000000..55f64742a3ca --- /dev/null +++ b/java-merchantapi/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/api/ResourceDescriptor.java @@ -0,0 +1,2875 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/resource.proto + +package com.google.api; + +/** + * + * + *
+ * A simple descriptor of a resource type.
+ *
+ * ResourceDescriptor annotates a resource message (either by means of a
+ * protobuf annotation or use in the service config), and associates the
+ * resource's schema, the resource type, and the pattern of the resource name.
+ *
+ * Example:
+ *
+ *     message Topic {
+ *       // Indicates this message defines a resource schema.
+ *       // Declares the resource type in the format of {service}/{kind}.
+ *       // For Kubernetes resources, the format is {api group}/{kind}.
+ *       option (google.api.resource) = {
+ *         type: "pubsub.googleapis.com/Topic"
+ *         pattern: "projects/{project}/topics/{topic}"
+ *       };
+ *     }
+ *
+ * The ResourceDescriptor Yaml config will look like:
+ *
+ *     resources:
+ *     - type: "pubsub.googleapis.com/Topic"
+ *       pattern: "projects/{project}/topics/{topic}"
+ *
+ * Sometimes, resources have multiple patterns, typically because they can
+ * live under multiple parents.
+ *
+ * Example:
+ *
+ *     message LogEntry {
+ *       option (google.api.resource) = {
+ *         type: "logging.googleapis.com/LogEntry"
+ *         pattern: "projects/{project}/logs/{log}"
+ *         pattern: "folders/{folder}/logs/{log}"
+ *         pattern: "organizations/{organization}/logs/{log}"
+ *         pattern: "billingAccounts/{billing_account}/logs/{log}"
+ *       };
+ *     }
+ *
+ * The ResourceDescriptor Yaml config will look like:
+ *
+ *     resources:
+ *     - type: 'logging.googleapis.com/LogEntry'
+ *       pattern: "projects/{project}/logs/{log}"
+ *       pattern: "folders/{folder}/logs/{log}"
+ *       pattern: "organizations/{organization}/logs/{log}"
+ *       pattern: "billingAccounts/{billing_account}/logs/{log}"
+ * 
+ * + * Protobuf type {@code google.api.ResourceDescriptor} + */ +public final class ResourceDescriptor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.ResourceDescriptor) + ResourceDescriptorOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceDescriptor.newBuilder() to construct. + private ResourceDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceDescriptor() { + type_ = ""; + pattern_ = com.google.protobuf.LazyStringArrayList.emptyList(); + nameField_ = ""; + history_ = 0; + plural_ = ""; + singular_ = ""; + style_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceDescriptor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.ResourceProto.internal_static_google_api_ResourceDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.ResourceProto + .internal_static_google_api_ResourceDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.ResourceDescriptor.class, + com.google.api.ResourceDescriptor.Builder.class); + } + + /** + * + * + *
+   * A description of the historical or future-looking state of the
+   * resource pattern.
+   * 
+ * + * Protobuf enum {@code google.api.ResourceDescriptor.History} + */ + public enum History implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The "unset" value.
+     * 
+ * + * HISTORY_UNSPECIFIED = 0; + */ + HISTORY_UNSPECIFIED(0), + /** + * + * + *
+     * The resource originally had one pattern and launched as such, and
+     * additional patterns were added later.
+     * 
+ * + * ORIGINALLY_SINGLE_PATTERN = 1; + */ + ORIGINALLY_SINGLE_PATTERN(1), + /** + * + * + *
+     * The resource has one pattern, but the API owner expects to add more
+     * later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
+     * that from being necessary once there are multiple patterns.)
+     * 
+ * + * FUTURE_MULTI_PATTERN = 2; + */ + FUTURE_MULTI_PATTERN(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The "unset" value.
+     * 
+ * + * HISTORY_UNSPECIFIED = 0; + */ + public static final int HISTORY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The resource originally had one pattern and launched as such, and
+     * additional patterns were added later.
+     * 
+ * + * ORIGINALLY_SINGLE_PATTERN = 1; + */ + public static final int ORIGINALLY_SINGLE_PATTERN_VALUE = 1; + /** + * + * + *
+     * The resource has one pattern, but the API owner expects to add more
+     * later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
+     * that from being necessary once there are multiple patterns.)
+     * 
+ * + * FUTURE_MULTI_PATTERN = 2; + */ + public static final int FUTURE_MULTI_PATTERN_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 History 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 History forNumber(int value) { + switch (value) { + case 0: + return HISTORY_UNSPECIFIED; + case 1: + return ORIGINALLY_SINGLE_PATTERN; + case 2: + return FUTURE_MULTI_PATTERN; + 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 History findValueByNumber(int number) { + return History.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.api.ResourceDescriptor.getDescriptor().getEnumTypes().get(0); + } + + private static final History[] VALUES = values(); + + public static History 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 History(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.ResourceDescriptor.History) + } + + /** + * + * + *
+   * A flag representing a specific style that a resource claims to conform to.
+   * 
+ * + * Protobuf enum {@code google.api.ResourceDescriptor.Style} + */ + public enum Style implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The unspecified value. Do not use.
+     * 
+ * + * STYLE_UNSPECIFIED = 0; + */ + STYLE_UNSPECIFIED(0), + /** + * + * + *
+     * This resource is intended to be "declarative-friendly".
+     *
+     * Declarative-friendly resources must be more strictly consistent, and
+     * setting this to true communicates to tools that this resource should
+     * adhere to declarative-friendly expectations.
+     *
+     * Note: This is used by the API linter (linter.aip.dev) to enable
+     * additional checks.
+     * 
+ * + * DECLARATIVE_FRIENDLY = 1; + */ + DECLARATIVE_FRIENDLY(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The unspecified value. Do not use.
+     * 
+ * + * STYLE_UNSPECIFIED = 0; + */ + public static final int STYLE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * This resource is intended to be "declarative-friendly".
+     *
+     * Declarative-friendly resources must be more strictly consistent, and
+     * setting this to true communicates to tools that this resource should
+     * adhere to declarative-friendly expectations.
+     *
+     * Note: This is used by the API linter (linter.aip.dev) to enable
+     * additional checks.
+     * 
+ * + * DECLARATIVE_FRIENDLY = 1; + */ + public static final int DECLARATIVE_FRIENDLY_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 Style 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 Style forNumber(int value) { + switch (value) { + case 0: + return STYLE_UNSPECIFIED; + case 1: + return DECLARATIVE_FRIENDLY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap