diff --git a/.python-version b/.python-version new file mode 100644 index 000000000000..21af9507e0c9 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.9.13 diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index abf2a0cf7513..7e3e5abe964e 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -609,6 +609,13 @@ pom import + + com.google.cloud + google-cloud-infra-manager-bom + 0.0.1-SNAPSHOT + pom + import + com.google.cloud google-cloud-iot-bom diff --git a/java-infra-manager/.OwlBot.yaml b/java-infra-manager/.OwlBot.yaml new file mode 100644 index 000000000000..d556d4228b2b --- /dev/null +++ b/java-infra-manager/.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-infra-manager/grpc-google-.*/src" +- "/java-infra-manager/proto-google-.*/src" +- "/java-infra-manager/google-.*/src" +- "/java-infra-manager/samples/snippets/generated" + +deep-preserve-regex: +- "/java-infra-manager/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/config/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-infra-manager/$1/proto-google-cloud-infra-manager-$1/src" +- source: "/google/cloud/config/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-infra-manager/$1/grpc-google-cloud-infra-manager-$1/src" +- source: "/google/cloud/config/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-infra-manager/$1/google-cloud-infra-manager/src" +- source: "/google/cloud/config/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-infra-manager/$1/samples/snippets/generated" + + +api-name: infra-manager \ No newline at end of file diff --git a/java-infra-manager/.repo-metadata.json b/java-infra-manager/.repo-metadata.json new file mode 100644 index 000000000000..a5cbcc1d0983 --- /dev/null +++ b/java-infra-manager/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "infra-manager", + "name_pretty": "Infrastructure Manager API", + "product_documentation": "https://cloud.google.com/infrastructure-manager/docs/overview", + "api_description": "Creates and manages Google Cloud Platform resources and infrastructure.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-infra-manager/latest/overview", + "release_level": "preview", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-infra-manager", + "repo_short": "java-infra-manager", + "distribution_name": "com.google.cloud:google-cloud-infra-manager", + "api_id": "infra-manager.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-infra-manager/README.md b/java-infra-manager/README.md new file mode 100644 index 000000000000..cc814cddcd84 --- /dev/null +++ b/java-infra-manager/README.md @@ -0,0 +1,225 @@ +# Google Infrastructure Manager API Client for Java + +Java idiomatic client for [Infrastructure Manager API][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.22.0 + pom + import + + + + + + + com.google.cloud + google-cloud-infra-manager + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + + +```xml + + com.google.cloud + google-cloud-infra-manager + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-infra-manager:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-infra-manager" % "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 Infrastructure Manager API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Infrastructure Manager API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Infrastructure Manager API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Infrastructure Manager API. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-infra-manager` library. See the [Quickstart](#quickstart) section +to add `google-cloud-infra-manager` as a dependency in your code. + +## About Infrastructure Manager API + + +[Infrastructure Manager API][product-docs] Creates and manages Google Cloud Platform resources and infrastructure. + +See the [Infrastructure Manager API client library docs][javadocs] to learn how to +use this Infrastructure Manager API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Infrastructure Manager 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://cloud.google.com/infrastructure-manager/docs/overview +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-infra-manager/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-infra-manager/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-infra-manager/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-infra-manager/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-infra-manager/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-infra-manager/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-infra-manager/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-infra-manager/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-infra-manager/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-infra-manager/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-infra-manager/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-infra-manager.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-infra-manager/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-infra-manager/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-infra-manager/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-infra-manager/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=infra-manager.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-infra-manager/google-cloud-infra-manager-bom/pom.xml b/java-infra-manager/google-cloud-infra-manager-bom/pom.xml new file mode 100644 index 000000000000..d27f4ea4c3e1 --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager-bom/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + com.google.cloud + google-cloud-infra-manager-bom + 0.0.1-SNAPSHOT + pom + + + com.google.cloud + google-cloud-pom-parent + 1.18.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Infrastructure Manager API BOM + + BOM for Infrastructure Manager API + + + + true + + + + + + com.google.cloud + google-cloud-infra-manager + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-infra-manager-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-infra-manager-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-infra-manager/google-cloud-infra-manager/pom.xml b/java-infra-manager/google-cloud-infra-manager/pom.xml new file mode 100644 index 000000000000..0906d608c24c --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.cloud + google-cloud-infra-manager + 0.0.1-SNAPSHOT + jar + Google Infrastructure Manager API + Infrastructure Manager API Creates and manages Google Cloud Platform resources and infrastructure. + + com.google.cloud + google-cloud-infra-manager-parent + 0.0.1-SNAPSHOT + + + google-cloud-infra-manager + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-infra-manager-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + grpc-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + org.threeten + threetenbp + + + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-infra-manager-v1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + diff --git a/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/ConfigClient.java b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/ConfigClient.java new file mode 100644 index 000000000000..bcd8919648ed --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/ConfigClient.java @@ -0,0 +1,2967 @@ +/* + * 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.cloud.config.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.config.v1.stub.ConfigStub; +import com.google.cloud.config.v1.stub.ConfigStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Infrastructure Manager is a managed service that automates the deployment + * and management of Google Cloud infrastructure resources. + * + *

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

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

Note: close() needs to be called on the ConfigClient 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 ConfigSettings 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
+ * ConfigSettings configSettings =
+ *     ConfigSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ConfigClient configClient = ConfigClient.create(configSettings);
+ * }
+ * + *

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
+ * ConfigSettings configSettings = ConfigSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ConfigClient configClient = ConfigClient.create(configSettings);
+ * }
+ * + *

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
+ * ConfigSettings configSettings = ConfigSettings.newHttpJsonBuilder().build();
+ * ConfigClient configClient = ConfigClient.create(configSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Deployment element : configClient.listDeployments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent in whose context the Deployments are listed. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeploymentsPagedResponse listDeployments(LocationName parent) { + ListDeploymentsRequest request = + ListDeploymentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDeployments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Deployment element : configClient.listDeployments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent in whose context the Deployments are listed. The parent + * value is in the format: 'projects/{project_id}/locations/{location}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeploymentsPagedResponse listDeployments(String parent) { + ListDeploymentsRequest request = ListDeploymentsRequest.newBuilder().setParent(parent).build(); + return listDeployments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project and location. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   GetDeploymentRequest request =
+   *       GetDeploymentRequest.newBuilder()
+   *           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .build();
+   *   Deployment response = configClient.getDeployment(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Deployment getDeployment(GetDeploymentRequest request) { + return getDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a [Deployment][google.cloud.config.v1.Deployment]. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Deployment deployment = Deployment.newBuilder().build();
+   *   String deploymentId = "deploymentId-136894784";
+   *   Deployment response =
+   *       configClient.createDeploymentAsync(parent, deployment, deploymentId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent in whose context the Deployment is created. The parent value + * is in the format: 'projects/{project_id}/locations/{location}'. + * @param deployment Required. [Deployment][google.cloud.config.v1.Deployment] resource to be + * created. + * @param deploymentId Required. The Deployment ID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDeploymentAsync( + LocationName parent, Deployment deployment, String deploymentId) { + CreateDeploymentRequest request = + CreateDeploymentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDeployment(deployment) + .setDeploymentId(deploymentId) + .build(); + return createDeploymentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Deployment][google.cloud.config.v1.Deployment]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Deployment deployment = Deployment.newBuilder().build();
+   *   String deploymentId = "deploymentId-136894784";
+   *   Deployment response =
+   *       configClient.createDeploymentAsync(parent, deployment, deploymentId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent in whose context the Deployment is created. The parent value + * is in the format: 'projects/{project_id}/locations/{location}'. + * @param deployment Required. [Deployment][google.cloud.config.v1.Deployment] resource to be + * created. + * @param deploymentId Required. The Deployment ID. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDeploymentAsync( + String parent, Deployment deployment, String deploymentId) { + CreateDeploymentRequest request = + CreateDeploymentRequest.newBuilder() + .setParent(parent) + .setDeployment(deployment) + .setDeploymentId(deploymentId) + .build(); + return createDeploymentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Deployment][google.cloud.config.v1.Deployment]. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

The deployment's `name` field is used to identify the resource to be updated. Format: + * `projects/{project}/locations/{location}/deployments/{deployment}` + * @param updateMask Optional. Field mask used to specify the fields to be overwritten in the + * Deployment resource by the update. + *

The fields specified in the update_mask are relative to the resource, not the full + * request. A field will be overwritten if it is in the mask. If the user does not provide a + * mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDeploymentAsync( + Deployment deployment, FieldMask updateMask) { + UpdateDeploymentRequest request = + UpdateDeploymentRequest.newBuilder() + .setDeployment(deployment) + .setUpdateMask(updateMask) + .build(); + return updateDeploymentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a [Deployment][google.cloud.config.v1.Deployment]. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+   *   for (Revision element : configClient.listRevisions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent in whose context the Revisions are listed. The parent value + * is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRevisionsPagedResponse listRevisions(DeploymentName parent) { + ListRevisionsRequest request = + ListRevisionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRevisions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [Revision][google.cloud.config.v1.Revision]s of a deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
+   *   for (Revision element : configClient.listRevisions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent in whose context the Revisions are listed. The parent value + * is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRevisionsPagedResponse listRevisions(String parent) { + ListRevisionsRequest request = ListRevisionsRequest.newBuilder().setParent(parent).build(); + return listRevisions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [Revision][google.cloud.config.v1.Revision]s of a deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ListRevisionsRequest request =
+   *       ListRevisionsRequest.newBuilder()
+   *           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Revision element : configClient.listRevisions(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 ListRevisionsPagedResponse listRevisions(ListRevisionsRequest request) { + return listRevisionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [Revision][google.cloud.config.v1.Revision]s of a deployment. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   RevisionName name = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]");
+   *   Revision response = configClient.getRevision(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Revision in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Revision getRevision(RevisionName name) { + GetRevisionRequest request = + GetRevisionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRevision(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a [Revision][google.cloud.config.v1.Revision]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String name =
+   *       RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString();
+   *   Revision response = configClient.getRevision(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Revision in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Revision getRevision(String name) { + GetRevisionRequest request = GetRevisionRequest.newBuilder().setName(name).build(); + return getRevision(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a [Revision][google.cloud.config.v1.Revision]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   GetRevisionRequest request =
+   *       GetRevisionRequest.newBuilder()
+   *           .setName(
+   *               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
+   *                   .toString())
+   *           .build();
+   *   Revision response = configClient.getRevision(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Revision getRevision(GetRevisionRequest request) { + return getRevisionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a [Revision][google.cloud.config.v1.Revision]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   GetRevisionRequest request =
+   *       GetRevisionRequest.newBuilder()
+   *           .setName(
+   *               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = configClient.getRevisionCallable().futureCall(request);
+   *   // Do something.
+   *   Revision response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRevisionCallable() { + return stub.getRevisionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ResourceName name =
+   *       ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]");
+   *   Resource response = configClient.getResource(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Resource in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resource getResource(ResourceName name) { + GetResourceRequest request = + GetResourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getResource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String name =
+   *       ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]")
+   *           .toString();
+   *   Resource response = configClient.getResource(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Resource in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resource getResource(String name) { + GetResourceRequest request = GetResourceRequest.newBuilder().setName(name).build(); + return getResource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   GetResourceRequest request =
+   *       GetResourceRequest.newBuilder()
+   *           .setName(
+   *               ResourceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   Resource response = configClient.getResource(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resource getResource(GetResourceRequest request) { + return getResourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a [Resource][google.cloud.config.v1.Resource] deployed by Infra Manager. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   GetResourceRequest request =
+   *       GetResourceRequest.newBuilder()
+   *           .setName(
+   *               ResourceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = configClient.getResourceCallable().futureCall(request);
+   *   // Do something.
+   *   Resource response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getResourceCallable() { + return stub.getResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [Resource][google.cloud.config.v1.Resource]s in a given revision. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   RevisionName parent =
+   *       RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]");
+   *   for (Resource element : configClient.listResources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent in whose context the Resources are listed. The parent value + * is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListResourcesPagedResponse listResources(RevisionName parent) { + ListResourcesRequest request = + ListResourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [Resource][google.cloud.config.v1.Resource]s in a given revision. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent =
+   *       RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString();
+   *   for (Resource element : configClient.listResources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent in whose context the Resources are listed. The parent value + * is in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListResourcesPagedResponse listResources(String parent) { + ListResourcesRequest request = ListResourcesRequest.newBuilder().setParent(parent).build(); + return listResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [Resource][google.cloud.config.v1.Resource]s in a given revision. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ListResourcesRequest request =
+   *       ListResourcesRequest.newBuilder()
+   *           .setParent(
+   *               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListResourcesResponse response = configClient.listResourcesCallable().call(request);
+   *     for (Resource element : response.getResourcesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listResourcesCallable() { + return stub.listResourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports Terraform state file from a given deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ExportDeploymentStatefileRequest request =
+   *       ExportDeploymentStatefileRequest.newBuilder()
+   *           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setDraft(true)
+   *           .build();
+   *   Statefile response = configClient.exportDeploymentStatefile(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Statefile exportDeploymentStatefile(ExportDeploymentStatefileRequest request) { + return exportDeploymentStatefileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports Terraform state file from a given deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ExportDeploymentStatefileRequest request =
+   *       ExportDeploymentStatefileRequest.newBuilder()
+   *           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setDraft(true)
+   *           .build();
+   *   ApiFuture future =
+   *       configClient.exportDeploymentStatefileCallable().futureCall(request);
+   *   // Do something.
+   *   Statefile response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + exportDeploymentStatefileCallable() { + return stub.exportDeploymentStatefileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports Terraform state file from a given revision. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ExportRevisionStatefileRequest request =
+   *       ExportRevisionStatefileRequest.newBuilder()
+   *           .setParent(
+   *               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
+   *                   .toString())
+   *           .build();
+   *   Statefile response = configClient.exportRevisionStatefile(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Statefile exportRevisionStatefile(ExportRevisionStatefileRequest request) { + return exportRevisionStatefileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports Terraform state file from a given revision. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ExportRevisionStatefileRequest request =
+   *       ExportRevisionStatefileRequest.newBuilder()
+   *           .setParent(
+   *               RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       configClient.exportRevisionStatefileCallable().futureCall(request);
+   *   // Do something.
+   *   Statefile response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + exportRevisionStatefileCallable() { + return stub.exportRevisionStatefileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports Terraform state file in a given deployment. The state file does not take effect until + * the Deployment has been unlocked. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+   *   long lockId = 338696367;
+   *   Statefile response = configClient.importStatefile(parent, lockId);
+   * }
+   * }
+ * + * @param parent Required. The parent in whose context the statefile is listed. The parent value + * is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param lockId Required. Lock ID of the lock file to verify that the user who is importing the + * state file previously locked the Deployment. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Statefile importStatefile(DeploymentName parent, long lockId) { + ImportStatefileRequest request = + ImportStatefileRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setLockId(lockId) + .build(); + return importStatefile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports Terraform state file in a given deployment. The state file does not take effect until + * the Deployment has been unlocked. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
+   *   long lockId = 338696367;
+   *   Statefile response = configClient.importStatefile(parent, lockId);
+   * }
+   * }
+ * + * @param parent Required. The parent in whose context the statefile is listed. The parent value + * is in the format: 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param lockId Required. Lock ID of the lock file to verify that the user who is importing the + * state file previously locked the Deployment. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Statefile importStatefile(String parent, long lockId) { + ImportStatefileRequest request = + ImportStatefileRequest.newBuilder().setParent(parent).setLockId(lockId).build(); + return importStatefile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports Terraform state file in a given deployment. The state file does not take effect until + * the Deployment has been unlocked. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ImportStatefileRequest request =
+   *       ImportStatefileRequest.newBuilder()
+   *           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setLockId(338696367)
+   *           .setSkipDraft(true)
+   *           .build();
+   *   Statefile response = configClient.importStatefile(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Statefile importStatefile(ImportStatefileRequest request) { + return importStatefileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports Terraform state file in a given deployment. The state file does not take effect until + * the Deployment has been unlocked. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ImportStatefileRequest request =
+   *       ImportStatefileRequest.newBuilder()
+   *           .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setLockId(338696367)
+   *           .setSkipDraft(true)
+   *           .build();
+   *   ApiFuture future = configClient.importStatefileCallable().futureCall(request);
+   *   // Do something.
+   *   Statefile response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importStatefileCallable() { + return stub.importStatefileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes Terraform state file in a given deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+   *   configClient.deleteStatefile(name);
+   * }
+   * }
+ * + * @param name Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteStatefile(DeploymentName name) { + DeleteStatefileRequest request = + DeleteStatefileRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteStatefile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes Terraform state file in a given deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
+   *   configClient.deleteStatefile(name);
+   * }
+   * }
+ * + * @param name Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteStatefile(String name) { + DeleteStatefileRequest request = DeleteStatefileRequest.newBuilder().setName(name).build(); + deleteStatefile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes Terraform state file in a given deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   DeleteStatefileRequest request =
+   *       DeleteStatefileRequest.newBuilder()
+   *           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setLockId(338696367)
+   *           .build();
+   *   configClient.deleteStatefile(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteStatefile(DeleteStatefileRequest request) { + deleteStatefileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes Terraform state file in a given deployment. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+   *   long lockId = 338696367;
+   *   Deployment response = configClient.unlockDeploymentAsync(name, lockId).get();
+   * }
+   * }
+ * + * @param name Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param lockId Required. Lock ID of the lock file to be unlocked. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture unlockDeploymentAsync( + DeploymentName name, long lockId) { + UnlockDeploymentRequest request = + UnlockDeploymentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setLockId(lockId) + .build(); + return unlockDeploymentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Unlocks a locked deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
+   *   long lockId = 338696367;
+   *   Deployment response = configClient.unlockDeploymentAsync(name, lockId).get();
+   * }
+   * }
+ * + * @param name Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @param lockId Required. Lock ID of the lock file to be unlocked. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture unlockDeploymentAsync( + String name, long lockId) { + UnlockDeploymentRequest request = + UnlockDeploymentRequest.newBuilder().setName(name).setLockId(lockId).build(); + return unlockDeploymentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Unlocks a locked deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   UnlockDeploymentRequest request =
+   *       UnlockDeploymentRequest.newBuilder()
+   *           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setLockId(338696367)
+   *           .build();
+   *   Deployment response = configClient.unlockDeploymentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture unlockDeploymentAsync( + UnlockDeploymentRequest request) { + return unlockDeploymentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Unlocks a locked deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   UnlockDeploymentRequest request =
+   *       UnlockDeploymentRequest.newBuilder()
+   *           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setLockId(338696367)
+   *           .build();
+   *   OperationFuture future =
+   *       configClient.unlockDeploymentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Deployment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + unlockDeploymentOperationCallable() { + return stub.unlockDeploymentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Unlocks a locked deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   UnlockDeploymentRequest request =
+   *       UnlockDeploymentRequest.newBuilder()
+   *           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setLockId(338696367)
+   *           .build();
+   *   ApiFuture future = configClient.unlockDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable unlockDeploymentCallable() { + return stub.unlockDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the lock info on a locked deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+   *   LockInfo response = configClient.exportLockInfo(name);
+   * }
+   * }
+ * + * @param name Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LockInfo exportLockInfo(DeploymentName name) { + ExportLockInfoRequest request = + ExportLockInfoRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return exportLockInfo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the lock info on a locked deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString();
+   *   LockInfo response = configClient.exportLockInfo(name);
+   * }
+   * }
+ * + * @param name Required. The name of the deployment in the format: + * 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LockInfo exportLockInfo(String name) { + ExportLockInfoRequest request = ExportLockInfoRequest.newBuilder().setName(name).build(); + return exportLockInfo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the lock info on a locked deployment. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   ExportLockInfoRequest request =
+   *       ExportLockInfoRequest.newBuilder()
+   *           .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .build();
+   *   LockInfo response = configClient.exportLockInfo(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LockInfo exportLockInfo(ExportLockInfoRequest request) { + return exportLockInfoCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the lock info on a locked deployment. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = configClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = configClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = configClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = configClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = configClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = configClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       configClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @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 ListDeploymentsPagedResponse + extends AbstractPagedListResponse< + ListDeploymentsRequest, + ListDeploymentsResponse, + Deployment, + ListDeploymentsPage, + ListDeploymentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDeploymentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDeploymentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDeploymentsPagedResponse(ListDeploymentsPage page) { + super(page, ListDeploymentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDeploymentsPage + extends AbstractPage< + ListDeploymentsRequest, ListDeploymentsResponse, Deployment, ListDeploymentsPage> { + + private ListDeploymentsPage( + PageContext context, + ListDeploymentsResponse response) { + super(context, response); + } + + private static ListDeploymentsPage createEmptyPage() { + return new ListDeploymentsPage(null, null); + } + + @Override + protected ListDeploymentsPage createPage( + PageContext context, + ListDeploymentsResponse response) { + return new ListDeploymentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDeploymentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDeploymentsRequest, + ListDeploymentsResponse, + Deployment, + ListDeploymentsPage, + ListDeploymentsFixedSizeCollection> { + + private ListDeploymentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDeploymentsFixedSizeCollection createEmptyCollection() { + return new ListDeploymentsFixedSizeCollection(null, 0); + } + + @Override + protected ListDeploymentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDeploymentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRevisionsPagedResponse + extends AbstractPagedListResponse< + ListRevisionsRequest, + ListRevisionsResponse, + Revision, + ListRevisionsPage, + ListRevisionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRevisionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRevisionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRevisionsPagedResponse(ListRevisionsPage page) { + super(page, ListRevisionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRevisionsPage + extends AbstractPage< + ListRevisionsRequest, ListRevisionsResponse, Revision, ListRevisionsPage> { + + private ListRevisionsPage( + PageContext context, + ListRevisionsResponse response) { + super(context, response); + } + + private static ListRevisionsPage createEmptyPage() { + return new ListRevisionsPage(null, null); + } + + @Override + protected ListRevisionsPage createPage( + PageContext context, + ListRevisionsResponse response) { + return new ListRevisionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRevisionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRevisionsRequest, + ListRevisionsResponse, + Revision, + ListRevisionsPage, + ListRevisionsFixedSizeCollection> { + + private ListRevisionsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRevisionsFixedSizeCollection createEmptyCollection() { + return new ListRevisionsFixedSizeCollection(null, 0); + } + + @Override + protected ListRevisionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRevisionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListResourcesPagedResponse + extends AbstractPagedListResponse< + ListResourcesRequest, + ListResourcesResponse, + Resource, + ListResourcesPage, + ListResourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListResourcesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListResourcesPagedResponse(ListResourcesPage page) { + super(page, ListResourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListResourcesPage + extends AbstractPage< + ListResourcesRequest, ListResourcesResponse, Resource, ListResourcesPage> { + + private ListResourcesPage( + PageContext context, + ListResourcesResponse response) { + super(context, response); + } + + private static ListResourcesPage createEmptyPage() { + return new ListResourcesPage(null, null); + } + + @Override + protected ListResourcesPage createPage( + PageContext context, + ListResourcesResponse response) { + return new ListResourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListResourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListResourcesRequest, + ListResourcesResponse, + Resource, + ListResourcesPage, + ListResourcesFixedSizeCollection> { + + private ListResourcesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListResourcesFixedSizeCollection createEmptyCollection() { + return new ListResourcesFixedSizeCollection(null, 0); + } + + @Override + protected ListResourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListResourcesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/ConfigSettings.java b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/ConfigSettings.java new file mode 100644 index 000000000000..9128e0658af4 --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/ConfigSettings.java @@ -0,0 +1,504 @@ +/* + * 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.cloud.config.v1; + +import static com.google.cloud.config.v1.ConfigClient.ListDeploymentsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListLocationsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListResourcesPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListRevisionsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.config.v1.stub.ConfigStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ConfigClient}. + * + *

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

    + *
  • The default service address (config.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 getDeployment 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
+ * ConfigSettings.Builder configSettingsBuilder = ConfigSettings.newBuilder();
+ * configSettingsBuilder
+ *     .getDeploymentSettings()
+ *     .setRetrySettings(
+ *         configSettingsBuilder
+ *             .getDeploymentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ConfigSettings configSettings = configSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ConfigSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listDeployments. */ + public PagedCallSettings< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings() { + return ((ConfigStubSettings) getStubSettings()).listDeploymentsSettings(); + } + + /** Returns the object with the settings used for calls to getDeployment. */ + public UnaryCallSettings getDeploymentSettings() { + return ((ConfigStubSettings) getStubSettings()).getDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to createDeployment. */ + public UnaryCallSettings createDeploymentSettings() { + return ((ConfigStubSettings) getStubSettings()).createDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to createDeployment. */ + public OperationCallSettings + createDeploymentOperationSettings() { + return ((ConfigStubSettings) getStubSettings()).createDeploymentOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDeployment. */ + public UnaryCallSettings updateDeploymentSettings() { + return ((ConfigStubSettings) getStubSettings()).updateDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to updateDeployment. */ + public OperationCallSettings + updateDeploymentOperationSettings() { + return ((ConfigStubSettings) getStubSettings()).updateDeploymentOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDeployment. */ + public UnaryCallSettings deleteDeploymentSettings() { + return ((ConfigStubSettings) getStubSettings()).deleteDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to deleteDeployment. */ + public OperationCallSettings + deleteDeploymentOperationSettings() { + return ((ConfigStubSettings) getStubSettings()).deleteDeploymentOperationSettings(); + } + + /** Returns the object with the settings used for calls to listRevisions. */ + public PagedCallSettings + listRevisionsSettings() { + return ((ConfigStubSettings) getStubSettings()).listRevisionsSettings(); + } + + /** Returns the object with the settings used for calls to getRevision. */ + public UnaryCallSettings getRevisionSettings() { + return ((ConfigStubSettings) getStubSettings()).getRevisionSettings(); + } + + /** Returns the object with the settings used for calls to getResource. */ + public UnaryCallSettings getResourceSettings() { + return ((ConfigStubSettings) getStubSettings()).getResourceSettings(); + } + + /** Returns the object with the settings used for calls to listResources. */ + public PagedCallSettings + listResourcesSettings() { + return ((ConfigStubSettings) getStubSettings()).listResourcesSettings(); + } + + /** Returns the object with the settings used for calls to exportDeploymentStatefile. */ + public UnaryCallSettings + exportDeploymentStatefileSettings() { + return ((ConfigStubSettings) getStubSettings()).exportDeploymentStatefileSettings(); + } + + /** Returns the object with the settings used for calls to exportRevisionStatefile. */ + public UnaryCallSettings + exportRevisionStatefileSettings() { + return ((ConfigStubSettings) getStubSettings()).exportRevisionStatefileSettings(); + } + + /** Returns the object with the settings used for calls to importStatefile. */ + public UnaryCallSettings importStatefileSettings() { + return ((ConfigStubSettings) getStubSettings()).importStatefileSettings(); + } + + /** Returns the object with the settings used for calls to deleteStatefile. */ + public UnaryCallSettings deleteStatefileSettings() { + return ((ConfigStubSettings) getStubSettings()).deleteStatefileSettings(); + } + + /** Returns the object with the settings used for calls to lockDeployment. */ + public UnaryCallSettings lockDeploymentSettings() { + return ((ConfigStubSettings) getStubSettings()).lockDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to lockDeployment. */ + public OperationCallSettings + lockDeploymentOperationSettings() { + return ((ConfigStubSettings) getStubSettings()).lockDeploymentOperationSettings(); + } + + /** Returns the object with the settings used for calls to unlockDeployment. */ + public UnaryCallSettings unlockDeploymentSettings() { + return ((ConfigStubSettings) getStubSettings()).unlockDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to unlockDeployment. */ + public OperationCallSettings + unlockDeploymentOperationSettings() { + return ((ConfigStubSettings) getStubSettings()).unlockDeploymentOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportLockInfo. */ + public UnaryCallSettings exportLockInfoSettings() { + return ((ConfigStubSettings) getStubSettings()).exportLockInfoSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ConfigStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ConfigStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((ConfigStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((ConfigStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((ConfigStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final ConfigSettings create(ConfigStubSettings stub) throws IOException { + return new ConfigSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ConfigStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ConfigStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ConfigStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ConfigStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ConfigStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ConfigStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ConfigStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ConfigStubSettings.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 ConfigSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ConfigSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ConfigStubSettings.newBuilder(clientContext)); + } + + protected Builder(ConfigSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ConfigStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ConfigStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ConfigStubSettings.newHttpJsonBuilder()); + } + + public ConfigStubSettings.Builder getStubSettingsBuilder() { + return ((ConfigStubSettings.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 listDeployments. */ + public PagedCallSettings.Builder< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings() { + return getStubSettingsBuilder().listDeploymentsSettings(); + } + + /** Returns the builder for the settings used for calls to getDeployment. */ + public UnaryCallSettings.Builder getDeploymentSettings() { + return getStubSettingsBuilder().getDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to createDeployment. */ + public UnaryCallSettings.Builder + createDeploymentSettings() { + return getStubSettingsBuilder().createDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to createDeployment. */ + public OperationCallSettings.Builder + createDeploymentOperationSettings() { + return getStubSettingsBuilder().createDeploymentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDeployment. */ + public UnaryCallSettings.Builder + updateDeploymentSettings() { + return getStubSettingsBuilder().updateDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to updateDeployment. */ + public OperationCallSettings.Builder + updateDeploymentOperationSettings() { + return getStubSettingsBuilder().updateDeploymentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDeployment. */ + public UnaryCallSettings.Builder + deleteDeploymentSettings() { + return getStubSettingsBuilder().deleteDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDeployment. */ + public OperationCallSettings.Builder + deleteDeploymentOperationSettings() { + return getStubSettingsBuilder().deleteDeploymentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listRevisions. */ + public PagedCallSettings.Builder< + ListRevisionsRequest, ListRevisionsResponse, ListRevisionsPagedResponse> + listRevisionsSettings() { + return getStubSettingsBuilder().listRevisionsSettings(); + } + + /** Returns the builder for the settings used for calls to getRevision. */ + public UnaryCallSettings.Builder getRevisionSettings() { + return getStubSettingsBuilder().getRevisionSettings(); + } + + /** Returns the builder for the settings used for calls to getResource. */ + public UnaryCallSettings.Builder getResourceSettings() { + return getStubSettingsBuilder().getResourceSettings(); + } + + /** Returns the builder for the settings used for calls to listResources. */ + public PagedCallSettings.Builder< + ListResourcesRequest, ListResourcesResponse, ListResourcesPagedResponse> + listResourcesSettings() { + return getStubSettingsBuilder().listResourcesSettings(); + } + + /** Returns the builder for the settings used for calls to exportDeploymentStatefile. */ + public UnaryCallSettings.Builder + exportDeploymentStatefileSettings() { + return getStubSettingsBuilder().exportDeploymentStatefileSettings(); + } + + /** Returns the builder for the settings used for calls to exportRevisionStatefile. */ + public UnaryCallSettings.Builder + exportRevisionStatefileSettings() { + return getStubSettingsBuilder().exportRevisionStatefileSettings(); + } + + /** Returns the builder for the settings used for calls to importStatefile. */ + public UnaryCallSettings.Builder importStatefileSettings() { + return getStubSettingsBuilder().importStatefileSettings(); + } + + /** Returns the builder for the settings used for calls to deleteStatefile. */ + public UnaryCallSettings.Builder deleteStatefileSettings() { + return getStubSettingsBuilder().deleteStatefileSettings(); + } + + /** Returns the builder for the settings used for calls to lockDeployment. */ + public UnaryCallSettings.Builder lockDeploymentSettings() { + return getStubSettingsBuilder().lockDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to lockDeployment. */ + public OperationCallSettings.Builder + lockDeploymentOperationSettings() { + return getStubSettingsBuilder().lockDeploymentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to unlockDeployment. */ + public UnaryCallSettings.Builder + unlockDeploymentSettings() { + return getStubSettingsBuilder().unlockDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to unlockDeployment. */ + public OperationCallSettings.Builder + unlockDeploymentOperationSettings() { + return getStubSettingsBuilder().unlockDeploymentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportLockInfo. */ + public UnaryCallSettings.Builder exportLockInfoSettings() { + return getStubSettingsBuilder().exportLockInfoSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public ConfigSettings build() throws IOException { + return new ConfigSettings(this); + } + } +} diff --git a/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/gapic_metadata.json b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/gapic_metadata.json new file mode 100644 index 000000000000..4cd77fb770b2 --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/gapic_metadata.json @@ -0,0 +1,81 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.config.v1", + "libraryPackage": "com.google.cloud.config.v1", + "services": { + "Config": { + "clients": { + "grpc": { + "libraryClient": "ConfigClient", + "rpcs": { + "CreateDeployment": { + "methods": ["createDeploymentAsync", "createDeploymentAsync", "createDeploymentAsync", "createDeploymentOperationCallable", "createDeploymentCallable"] + }, + "DeleteDeployment": { + "methods": ["deleteDeploymentAsync", "deleteDeploymentAsync", "deleteDeploymentAsync", "deleteDeploymentOperationCallable", "deleteDeploymentCallable"] + }, + "DeleteStatefile": { + "methods": ["deleteStatefile", "deleteStatefile", "deleteStatefile", "deleteStatefileCallable"] + }, + "ExportDeploymentStatefile": { + "methods": ["exportDeploymentStatefile", "exportDeploymentStatefileCallable"] + }, + "ExportLockInfo": { + "methods": ["exportLockInfo", "exportLockInfo", "exportLockInfo", "exportLockInfoCallable"] + }, + "ExportRevisionStatefile": { + "methods": ["exportRevisionStatefile", "exportRevisionStatefileCallable"] + }, + "GetDeployment": { + "methods": ["getDeployment", "getDeployment", "getDeployment", "getDeploymentCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetResource": { + "methods": ["getResource", "getResource", "getResource", "getResourceCallable"] + }, + "GetRevision": { + "methods": ["getRevision", "getRevision", "getRevision", "getRevisionCallable"] + }, + "ImportStatefile": { + "methods": ["importStatefile", "importStatefile", "importStatefile", "importStatefileCallable"] + }, + "ListDeployments": { + "methods": ["listDeployments", "listDeployments", "listDeployments", "listDeploymentsPagedCallable", "listDeploymentsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListResources": { + "methods": ["listResources", "listResources", "listResources", "listResourcesPagedCallable", "listResourcesCallable"] + }, + "ListRevisions": { + "methods": ["listRevisions", "listRevisions", "listRevisions", "listRevisionsPagedCallable", "listRevisionsCallable"] + }, + "LockDeployment": { + "methods": ["lockDeploymentAsync", "lockDeploymentAsync", "lockDeploymentAsync", "lockDeploymentOperationCallable", "lockDeploymentCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UnlockDeployment": { + "methods": ["unlockDeploymentAsync", "unlockDeploymentAsync", "unlockDeploymentAsync", "unlockDeploymentOperationCallable", "unlockDeploymentCallable"] + }, + "UpdateDeployment": { + "methods": ["updateDeploymentAsync", "updateDeploymentAsync", "updateDeploymentOperationCallable", "updateDeploymentCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/package-info.java b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/package-info.java new file mode 100644 index 000000000000..69e671ebae8c --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/package-info.java @@ -0,0 +1,44 @@ +/* + * 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 Infrastructure Manager API + * + *

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

======================= ConfigClient ======================= + * + *

Service Description: Infrastructure Manager is a managed service that automates the deployment + * and management of Google Cloud infrastructure resources. + * + *

Sample for ConfigClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConfigClient configClient = ConfigClient.create()) {
+ *   DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]");
+ *   Deployment response = configClient.getDeployment(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.config.v1; + +import javax.annotation.Generated; diff --git a/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/ConfigStub.java b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/ConfigStub.java new file mode 100644 index 000000000000..e75e815867ff --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/ConfigStub.java @@ -0,0 +1,217 @@ +/* + * 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.cloud.config.v1.stub; + +import static com.google.cloud.config.v1.ConfigClient.ListDeploymentsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListLocationsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListResourcesPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListRevisionsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.config.v1.CreateDeploymentRequest; +import com.google.cloud.config.v1.DeleteDeploymentRequest; +import com.google.cloud.config.v1.DeleteStatefileRequest; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.ExportDeploymentStatefileRequest; +import com.google.cloud.config.v1.ExportLockInfoRequest; +import com.google.cloud.config.v1.ExportRevisionStatefileRequest; +import com.google.cloud.config.v1.GetDeploymentRequest; +import com.google.cloud.config.v1.GetResourceRequest; +import com.google.cloud.config.v1.GetRevisionRequest; +import com.google.cloud.config.v1.ImportStatefileRequest; +import com.google.cloud.config.v1.ListDeploymentsRequest; +import com.google.cloud.config.v1.ListDeploymentsResponse; +import com.google.cloud.config.v1.ListResourcesRequest; +import com.google.cloud.config.v1.ListResourcesResponse; +import com.google.cloud.config.v1.ListRevisionsRequest; +import com.google.cloud.config.v1.ListRevisionsResponse; +import com.google.cloud.config.v1.LockDeploymentRequest; +import com.google.cloud.config.v1.LockInfo; +import com.google.cloud.config.v1.OperationMetadata; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.Revision; +import com.google.cloud.config.v1.Statefile; +import com.google.cloud.config.v1.UnlockDeploymentRequest; +import com.google.cloud.config.v1.UpdateDeploymentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Config service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ConfigStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + listDeploymentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDeploymentsPagedCallable()"); + } + + public UnaryCallable listDeploymentsCallable() { + throw new UnsupportedOperationException("Not implemented: listDeploymentsCallable()"); + } + + public UnaryCallable getDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: getDeploymentCallable()"); + } + + public OperationCallable + createDeploymentOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createDeploymentOperationCallable()"); + } + + public UnaryCallable createDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: createDeploymentCallable()"); + } + + public OperationCallable + updateDeploymentOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateDeploymentOperationCallable()"); + } + + public UnaryCallable updateDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: updateDeploymentCallable()"); + } + + public OperationCallable + deleteDeploymentOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDeploymentOperationCallable()"); + } + + public UnaryCallable deleteDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDeploymentCallable()"); + } + + public UnaryCallable + listRevisionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRevisionsPagedCallable()"); + } + + public UnaryCallable listRevisionsCallable() { + throw new UnsupportedOperationException("Not implemented: listRevisionsCallable()"); + } + + public UnaryCallable getRevisionCallable() { + throw new UnsupportedOperationException("Not implemented: getRevisionCallable()"); + } + + public UnaryCallable getResourceCallable() { + throw new UnsupportedOperationException("Not implemented: getResourceCallable()"); + } + + public UnaryCallable + listResourcesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listResourcesPagedCallable()"); + } + + public UnaryCallable listResourcesCallable() { + throw new UnsupportedOperationException("Not implemented: listResourcesCallable()"); + } + + public UnaryCallable + exportDeploymentStatefileCallable() { + throw new UnsupportedOperationException("Not implemented: exportDeploymentStatefileCallable()"); + } + + public UnaryCallable + exportRevisionStatefileCallable() { + throw new UnsupportedOperationException("Not implemented: exportRevisionStatefileCallable()"); + } + + public UnaryCallable importStatefileCallable() { + throw new UnsupportedOperationException("Not implemented: importStatefileCallable()"); + } + + public UnaryCallable deleteStatefileCallable() { + throw new UnsupportedOperationException("Not implemented: deleteStatefileCallable()"); + } + + public OperationCallable + lockDeploymentOperationCallable() { + throw new UnsupportedOperationException("Not implemented: lockDeploymentOperationCallable()"); + } + + public UnaryCallable lockDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: lockDeploymentCallable()"); + } + + public OperationCallable + unlockDeploymentOperationCallable() { + throw new UnsupportedOperationException("Not implemented: unlockDeploymentOperationCallable()"); + } + + public UnaryCallable unlockDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: unlockDeploymentCallable()"); + } + + public UnaryCallable exportLockInfoCallable() { + throw new UnsupportedOperationException("Not implemented: exportLockInfoCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/ConfigStubSettings.java b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/ConfigStubSettings.java new file mode 100644 index 000000000000..4c68b08b3169 --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/ConfigStubSettings.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. + */ + +package com.google.cloud.config.v1.stub; + +import static com.google.cloud.config.v1.ConfigClient.ListDeploymentsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListLocationsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListResourcesPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListRevisionsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.config.v1.CreateDeploymentRequest; +import com.google.cloud.config.v1.DeleteDeploymentRequest; +import com.google.cloud.config.v1.DeleteStatefileRequest; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.ExportDeploymentStatefileRequest; +import com.google.cloud.config.v1.ExportLockInfoRequest; +import com.google.cloud.config.v1.ExportRevisionStatefileRequest; +import com.google.cloud.config.v1.GetDeploymentRequest; +import com.google.cloud.config.v1.GetResourceRequest; +import com.google.cloud.config.v1.GetRevisionRequest; +import com.google.cloud.config.v1.ImportStatefileRequest; +import com.google.cloud.config.v1.ListDeploymentsRequest; +import com.google.cloud.config.v1.ListDeploymentsResponse; +import com.google.cloud.config.v1.ListResourcesRequest; +import com.google.cloud.config.v1.ListResourcesResponse; +import com.google.cloud.config.v1.ListRevisionsRequest; +import com.google.cloud.config.v1.ListRevisionsResponse; +import com.google.cloud.config.v1.LockDeploymentRequest; +import com.google.cloud.config.v1.LockInfo; +import com.google.cloud.config.v1.OperationMetadata; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.Revision; +import com.google.cloud.config.v1.Statefile; +import com.google.cloud.config.v1.UnlockDeploymentRequest; +import com.google.cloud.config.v1.UpdateDeploymentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ConfigStub}. + * + *

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

    + *
  • The default service address (config.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 getDeployment 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
+ * ConfigStubSettings.Builder configSettingsBuilder = ConfigStubSettings.newBuilder();
+ * configSettingsBuilder
+ *     .getDeploymentSettings()
+ *     .setRetrySettings(
+ *         configSettingsBuilder
+ *             .getDeploymentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ConfigStubSettings configSettings = configSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ConfigStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings; + private final UnaryCallSettings getDeploymentSettings; + private final UnaryCallSettings createDeploymentSettings; + private final OperationCallSettings + createDeploymentOperationSettings; + private final UnaryCallSettings updateDeploymentSettings; + private final OperationCallSettings + updateDeploymentOperationSettings; + private final UnaryCallSettings deleteDeploymentSettings; + private final OperationCallSettings + deleteDeploymentOperationSettings; + private final PagedCallSettings< + ListRevisionsRequest, ListRevisionsResponse, ListRevisionsPagedResponse> + listRevisionsSettings; + private final UnaryCallSettings getRevisionSettings; + private final UnaryCallSettings getResourceSettings; + private final PagedCallSettings< + ListResourcesRequest, ListResourcesResponse, ListResourcesPagedResponse> + listResourcesSettings; + private final UnaryCallSettings + exportDeploymentStatefileSettings; + private final UnaryCallSettings + exportRevisionStatefileSettings; + private final UnaryCallSettings importStatefileSettings; + private final UnaryCallSettings deleteStatefileSettings; + private final UnaryCallSettings lockDeploymentSettings; + private final OperationCallSettings + lockDeploymentOperationSettings; + private final UnaryCallSettings unlockDeploymentSettings; + private final OperationCallSettings + unlockDeploymentOperationSettings; + private final UnaryCallSettings exportLockInfoSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListDeploymentsRequest, ListDeploymentsResponse, Deployment> + LIST_DEPLOYMENTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDeploymentsRequest injectToken( + ListDeploymentsRequest payload, String token) { + return ListDeploymentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDeploymentsRequest injectPageSize( + ListDeploymentsRequest payload, int pageSize) { + return ListDeploymentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDeploymentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDeploymentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDeploymentsResponse payload) { + return payload.getDeploymentsList() == null + ? ImmutableList.of() + : payload.getDeploymentsList(); + } + }; + + private static final PagedListDescriptor + LIST_REVISIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRevisionsRequest injectToken(ListRevisionsRequest payload, String token) { + return ListRevisionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRevisionsRequest injectPageSize(ListRevisionsRequest payload, int pageSize) { + return ListRevisionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRevisionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRevisionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRevisionsResponse payload) { + return payload.getRevisionsList() == null + ? ImmutableList.of() + : payload.getRevisionsList(); + } + }; + + private static final PagedListDescriptor + LIST_RESOURCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListResourcesRequest injectToken(ListResourcesRequest payload, String token) { + return ListResourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListResourcesRequest injectPageSize(ListResourcesRequest payload, int pageSize) { + return ListResourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListResourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListResourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListResourcesResponse payload) { + return payload.getResourcesList() == null + ? ImmutableList.of() + : payload.getResourcesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + LIST_DEPLOYMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDeploymentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DEPLOYMENTS_PAGE_STR_DESC, request, context); + return ListDeploymentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRevisionsRequest, ListRevisionsResponse, ListRevisionsPagedResponse> + LIST_REVISIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRevisionsRequest, ListRevisionsResponse, ListRevisionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRevisionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_REVISIONS_PAGE_STR_DESC, request, context); + return ListRevisionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListResourcesRequest, ListResourcesResponse, ListResourcesPagedResponse> + LIST_RESOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListResourcesRequest, ListResourcesResponse, ListResourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListResourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_RESOURCES_PAGE_STR_DESC, request, context); + return ListResourcesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listDeployments. */ + public PagedCallSettings< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings() { + return listDeploymentsSettings; + } + + /** Returns the object with the settings used for calls to getDeployment. */ + public UnaryCallSettings getDeploymentSettings() { + return getDeploymentSettings; + } + + /** Returns the object with the settings used for calls to createDeployment. */ + public UnaryCallSettings createDeploymentSettings() { + return createDeploymentSettings; + } + + /** Returns the object with the settings used for calls to createDeployment. */ + public OperationCallSettings + createDeploymentOperationSettings() { + return createDeploymentOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDeployment. */ + public UnaryCallSettings updateDeploymentSettings() { + return updateDeploymentSettings; + } + + /** Returns the object with the settings used for calls to updateDeployment. */ + public OperationCallSettings + updateDeploymentOperationSettings() { + return updateDeploymentOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteDeployment. */ + public UnaryCallSettings deleteDeploymentSettings() { + return deleteDeploymentSettings; + } + + /** Returns the object with the settings used for calls to deleteDeployment. */ + public OperationCallSettings + deleteDeploymentOperationSettings() { + return deleteDeploymentOperationSettings; + } + + /** Returns the object with the settings used for calls to listRevisions. */ + public PagedCallSettings + listRevisionsSettings() { + return listRevisionsSettings; + } + + /** Returns the object with the settings used for calls to getRevision. */ + public UnaryCallSettings getRevisionSettings() { + return getRevisionSettings; + } + + /** Returns the object with the settings used for calls to getResource. */ + public UnaryCallSettings getResourceSettings() { + return getResourceSettings; + } + + /** Returns the object with the settings used for calls to listResources. */ + public PagedCallSettings + listResourcesSettings() { + return listResourcesSettings; + } + + /** Returns the object with the settings used for calls to exportDeploymentStatefile. */ + public UnaryCallSettings + exportDeploymentStatefileSettings() { + return exportDeploymentStatefileSettings; + } + + /** Returns the object with the settings used for calls to exportRevisionStatefile. */ + public UnaryCallSettings + exportRevisionStatefileSettings() { + return exportRevisionStatefileSettings; + } + + /** Returns the object with the settings used for calls to importStatefile. */ + public UnaryCallSettings importStatefileSettings() { + return importStatefileSettings; + } + + /** Returns the object with the settings used for calls to deleteStatefile. */ + public UnaryCallSettings deleteStatefileSettings() { + return deleteStatefileSettings; + } + + /** Returns the object with the settings used for calls to lockDeployment. */ + public UnaryCallSettings lockDeploymentSettings() { + return lockDeploymentSettings; + } + + /** Returns the object with the settings used for calls to lockDeployment. */ + public OperationCallSettings + lockDeploymentOperationSettings() { + return lockDeploymentOperationSettings; + } + + /** Returns the object with the settings used for calls to unlockDeployment. */ + public UnaryCallSettings unlockDeploymentSettings() { + return unlockDeploymentSettings; + } + + /** Returns the object with the settings used for calls to unlockDeployment. */ + public OperationCallSettings + unlockDeploymentOperationSettings() { + return unlockDeploymentOperationSettings; + } + + /** Returns the object with the settings used for calls to exportLockInfo. */ + public UnaryCallSettings exportLockInfoSettings() { + return exportLockInfoSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public ConfigStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcConfigStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonConfigStub.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 "config.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "config.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(ConfigStubSettings.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(ConfigStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ConfigStubSettings.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 ConfigStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listDeploymentsSettings = settingsBuilder.listDeploymentsSettings().build(); + getDeploymentSettings = settingsBuilder.getDeploymentSettings().build(); + createDeploymentSettings = settingsBuilder.createDeploymentSettings().build(); + createDeploymentOperationSettings = settingsBuilder.createDeploymentOperationSettings().build(); + updateDeploymentSettings = settingsBuilder.updateDeploymentSettings().build(); + updateDeploymentOperationSettings = settingsBuilder.updateDeploymentOperationSettings().build(); + deleteDeploymentSettings = settingsBuilder.deleteDeploymentSettings().build(); + deleteDeploymentOperationSettings = settingsBuilder.deleteDeploymentOperationSettings().build(); + listRevisionsSettings = settingsBuilder.listRevisionsSettings().build(); + getRevisionSettings = settingsBuilder.getRevisionSettings().build(); + getResourceSettings = settingsBuilder.getResourceSettings().build(); + listResourcesSettings = settingsBuilder.listResourcesSettings().build(); + exportDeploymentStatefileSettings = settingsBuilder.exportDeploymentStatefileSettings().build(); + exportRevisionStatefileSettings = settingsBuilder.exportRevisionStatefileSettings().build(); + importStatefileSettings = settingsBuilder.importStatefileSettings().build(); + deleteStatefileSettings = settingsBuilder.deleteStatefileSettings().build(); + lockDeploymentSettings = settingsBuilder.lockDeploymentSettings().build(); + lockDeploymentOperationSettings = settingsBuilder.lockDeploymentOperationSettings().build(); + unlockDeploymentSettings = settingsBuilder.unlockDeploymentSettings().build(); + unlockDeploymentOperationSettings = settingsBuilder.unlockDeploymentOperationSettings().build(); + exportLockInfoSettings = settingsBuilder.exportLockInfoSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for ConfigStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings; + private final UnaryCallSettings.Builder getDeploymentSettings; + private final UnaryCallSettings.Builder + createDeploymentSettings; + private final OperationCallSettings.Builder< + CreateDeploymentRequest, Deployment, OperationMetadata> + createDeploymentOperationSettings; + private final UnaryCallSettings.Builder + updateDeploymentSettings; + private final OperationCallSettings.Builder< + UpdateDeploymentRequest, Deployment, OperationMetadata> + updateDeploymentOperationSettings; + private final UnaryCallSettings.Builder + deleteDeploymentSettings; + private final OperationCallSettings.Builder< + DeleteDeploymentRequest, Deployment, OperationMetadata> + deleteDeploymentOperationSettings; + private final PagedCallSettings.Builder< + ListRevisionsRequest, ListRevisionsResponse, ListRevisionsPagedResponse> + listRevisionsSettings; + private final UnaryCallSettings.Builder getRevisionSettings; + private final UnaryCallSettings.Builder getResourceSettings; + private final PagedCallSettings.Builder< + ListResourcesRequest, ListResourcesResponse, ListResourcesPagedResponse> + listResourcesSettings; + private final UnaryCallSettings.Builder + exportDeploymentStatefileSettings; + private final UnaryCallSettings.Builder + exportRevisionStatefileSettings; + private final UnaryCallSettings.Builder + importStatefileSettings; + private final UnaryCallSettings.Builder deleteStatefileSettings; + private final UnaryCallSettings.Builder + lockDeploymentSettings; + private final OperationCallSettings.Builder< + LockDeploymentRequest, Deployment, OperationMetadata> + lockDeploymentOperationSettings; + private final UnaryCallSettings.Builder + unlockDeploymentSettings; + private final OperationCallSettings.Builder< + UnlockDeploymentRequest, Deployment, OperationMetadata> + unlockDeploymentOperationSettings; + private final UnaryCallSettings.Builder exportLockInfoSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listDeploymentsSettings = PagedCallSettings.newBuilder(LIST_DEPLOYMENTS_PAGE_STR_FACT); + getDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDeploymentOperationSettings = OperationCallSettings.newBuilder(); + updateDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDeploymentOperationSettings = OperationCallSettings.newBuilder(); + deleteDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDeploymentOperationSettings = OperationCallSettings.newBuilder(); + listRevisionsSettings = PagedCallSettings.newBuilder(LIST_REVISIONS_PAGE_STR_FACT); + getRevisionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listResourcesSettings = PagedCallSettings.newBuilder(LIST_RESOURCES_PAGE_STR_FACT); + exportDeploymentStatefileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportRevisionStatefileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importStatefileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteStatefileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + lockDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + lockDeploymentOperationSettings = OperationCallSettings.newBuilder(); + unlockDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + unlockDeploymentOperationSettings = OperationCallSettings.newBuilder(); + exportLockInfoSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDeploymentsSettings, + getDeploymentSettings, + createDeploymentSettings, + updateDeploymentSettings, + deleteDeploymentSettings, + listRevisionsSettings, + getRevisionSettings, + getResourceSettings, + listResourcesSettings, + exportDeploymentStatefileSettings, + exportRevisionStatefileSettings, + importStatefileSettings, + deleteStatefileSettings, + lockDeploymentSettings, + unlockDeploymentSettings, + exportLockInfoSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(ConfigStubSettings settings) { + super(settings); + + listDeploymentsSettings = settings.listDeploymentsSettings.toBuilder(); + getDeploymentSettings = settings.getDeploymentSettings.toBuilder(); + createDeploymentSettings = settings.createDeploymentSettings.toBuilder(); + createDeploymentOperationSettings = settings.createDeploymentOperationSettings.toBuilder(); + updateDeploymentSettings = settings.updateDeploymentSettings.toBuilder(); + updateDeploymentOperationSettings = settings.updateDeploymentOperationSettings.toBuilder(); + deleteDeploymentSettings = settings.deleteDeploymentSettings.toBuilder(); + deleteDeploymentOperationSettings = settings.deleteDeploymentOperationSettings.toBuilder(); + listRevisionsSettings = settings.listRevisionsSettings.toBuilder(); + getRevisionSettings = settings.getRevisionSettings.toBuilder(); + getResourceSettings = settings.getResourceSettings.toBuilder(); + listResourcesSettings = settings.listResourcesSettings.toBuilder(); + exportDeploymentStatefileSettings = settings.exportDeploymentStatefileSettings.toBuilder(); + exportRevisionStatefileSettings = settings.exportRevisionStatefileSettings.toBuilder(); + importStatefileSettings = settings.importStatefileSettings.toBuilder(); + deleteStatefileSettings = settings.deleteStatefileSettings.toBuilder(); + lockDeploymentSettings = settings.lockDeploymentSettings.toBuilder(); + lockDeploymentOperationSettings = settings.lockDeploymentOperationSettings.toBuilder(); + unlockDeploymentSettings = settings.unlockDeploymentSettings.toBuilder(); + unlockDeploymentOperationSettings = settings.unlockDeploymentOperationSettings.toBuilder(); + exportLockInfoSettings = settings.exportLockInfoSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listDeploymentsSettings, + getDeploymentSettings, + createDeploymentSettings, + updateDeploymentSettings, + deleteDeploymentSettings, + listRevisionsSettings, + getRevisionSettings, + getResourceSettings, + listResourcesSettings, + exportDeploymentStatefileSettings, + exportRevisionStatefileSettings, + importStatefileSettings, + deleteStatefileSettings, + lockDeploymentSettings, + unlockDeploymentSettings, + exportLockInfoSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + 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 + .listDeploymentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listRevisionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getRevisionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listResourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .exportDeploymentStatefileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .exportRevisionStatefileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .importStatefileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteStatefileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .lockDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .unlockDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .exportLockInfoSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createDeploymentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Deployment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(300000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(3600000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(43200000L)) + .build())); + + builder + .updateDeploymentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Deployment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(300000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(3600000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(43200000L)) + .build())); + + builder + .deleteDeploymentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Deployment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(300000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(3600000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(43200000L)) + .build())); + + builder + .lockDeploymentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Deployment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .unlockDeploymentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Deployment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listDeployments. */ + public PagedCallSettings.Builder< + ListDeploymentsRequest, ListDeploymentsResponse, ListDeploymentsPagedResponse> + listDeploymentsSettings() { + return listDeploymentsSettings; + } + + /** Returns the builder for the settings used for calls to getDeployment. */ + public UnaryCallSettings.Builder getDeploymentSettings() { + return getDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to createDeployment. */ + public UnaryCallSettings.Builder + createDeploymentSettings() { + return createDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to createDeployment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createDeploymentOperationSettings() { + return createDeploymentOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDeployment. */ + public UnaryCallSettings.Builder + updateDeploymentSettings() { + return updateDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to updateDeployment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateDeploymentOperationSettings() { + return updateDeploymentOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDeployment. */ + public UnaryCallSettings.Builder + deleteDeploymentSettings() { + return deleteDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to deleteDeployment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteDeploymentOperationSettings() { + return deleteDeploymentOperationSettings; + } + + /** Returns the builder for the settings used for calls to listRevisions. */ + public PagedCallSettings.Builder< + ListRevisionsRequest, ListRevisionsResponse, ListRevisionsPagedResponse> + listRevisionsSettings() { + return listRevisionsSettings; + } + + /** Returns the builder for the settings used for calls to getRevision. */ + public UnaryCallSettings.Builder getRevisionSettings() { + return getRevisionSettings; + } + + /** Returns the builder for the settings used for calls to getResource. */ + public UnaryCallSettings.Builder getResourceSettings() { + return getResourceSettings; + } + + /** Returns the builder for the settings used for calls to listResources. */ + public PagedCallSettings.Builder< + ListResourcesRequest, ListResourcesResponse, ListResourcesPagedResponse> + listResourcesSettings() { + return listResourcesSettings; + } + + /** Returns the builder for the settings used for calls to exportDeploymentStatefile. */ + public UnaryCallSettings.Builder + exportDeploymentStatefileSettings() { + return exportDeploymentStatefileSettings; + } + + /** Returns the builder for the settings used for calls to exportRevisionStatefile. */ + public UnaryCallSettings.Builder + exportRevisionStatefileSettings() { + return exportRevisionStatefileSettings; + } + + /** Returns the builder for the settings used for calls to importStatefile. */ + public UnaryCallSettings.Builder importStatefileSettings() { + return importStatefileSettings; + } + + /** Returns the builder for the settings used for calls to deleteStatefile. */ + public UnaryCallSettings.Builder deleteStatefileSettings() { + return deleteStatefileSettings; + } + + /** Returns the builder for the settings used for calls to lockDeployment. */ + public UnaryCallSettings.Builder lockDeploymentSettings() { + return lockDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to lockDeployment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + lockDeploymentOperationSettings() { + return lockDeploymentOperationSettings; + } + + /** Returns the builder for the settings used for calls to unlockDeployment. */ + public UnaryCallSettings.Builder + unlockDeploymentSettings() { + return unlockDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to unlockDeployment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + unlockDeploymentOperationSettings() { + return unlockDeploymentOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportLockInfo. */ + public UnaryCallSettings.Builder exportLockInfoSettings() { + return exportLockInfoSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public ConfigStubSettings build() throws IOException { + return new ConfigStubSettings(this); + } + } +} diff --git a/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/GrpcConfigCallableFactory.java b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/GrpcConfigCallableFactory.java new file mode 100644 index 000000000000..1c588ea5ae6e --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/GrpcConfigCallableFactory.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. + */ + +package com.google.cloud.config.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Config service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcConfigCallableFactory 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-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/GrpcConfigStub.java b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/GrpcConfigStub.java new file mode 100644 index 000000000000..062e9625acbe --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/GrpcConfigStub.java @@ -0,0 +1,903 @@ +/* + * 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.cloud.config.v1.stub; + +import static com.google.cloud.config.v1.ConfigClient.ListDeploymentsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListLocationsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListResourcesPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListRevisionsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.config.v1.CreateDeploymentRequest; +import com.google.cloud.config.v1.DeleteDeploymentRequest; +import com.google.cloud.config.v1.DeleteStatefileRequest; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.ExportDeploymentStatefileRequest; +import com.google.cloud.config.v1.ExportLockInfoRequest; +import com.google.cloud.config.v1.ExportRevisionStatefileRequest; +import com.google.cloud.config.v1.GetDeploymentRequest; +import com.google.cloud.config.v1.GetResourceRequest; +import com.google.cloud.config.v1.GetRevisionRequest; +import com.google.cloud.config.v1.ImportStatefileRequest; +import com.google.cloud.config.v1.ListDeploymentsRequest; +import com.google.cloud.config.v1.ListDeploymentsResponse; +import com.google.cloud.config.v1.ListResourcesRequest; +import com.google.cloud.config.v1.ListResourcesResponse; +import com.google.cloud.config.v1.ListRevisionsRequest; +import com.google.cloud.config.v1.ListRevisionsResponse; +import com.google.cloud.config.v1.LockDeploymentRequest; +import com.google.cloud.config.v1.LockInfo; +import com.google.cloud.config.v1.OperationMetadata; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.Revision; +import com.google.cloud.config.v1.Statefile; +import com.google.cloud.config.v1.UnlockDeploymentRequest; +import com.google.cloud.config.v1.UpdateDeploymentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Config service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcConfigStub extends ConfigStub { + private static final MethodDescriptor + listDeploymentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/ListDeployments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDeploymentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDeploymentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/GetDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Deployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/CreateDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/UpdateDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/DeleteDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listRevisionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/ListRevisions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListRevisionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRevisionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getRevisionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/GetRevision") + .setRequestMarshaller(ProtoUtils.marshaller(GetRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Revision.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/GetResource") + .setRequestMarshaller(ProtoUtils.marshaller(GetResourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Resource.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listResourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/ListResources") + .setRequestMarshaller( + ProtoUtils.marshaller(ListResourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListResourcesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + exportDeploymentStatefileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/ExportDeploymentStatefile") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportDeploymentStatefileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Statefile.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + exportRevisionStatefileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/ExportRevisionStatefile") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportRevisionStatefileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Statefile.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importStatefileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/ImportStatefile") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportStatefileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Statefile.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteStatefileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/DeleteStatefile") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteStatefileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + lockDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/LockDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(LockDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + unlockDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/UnlockDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller(UnlockDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + exportLockInfoMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.config.v1.Config/ExportLockInfo") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportLockInfoRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LockInfo.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + listDeploymentsCallable; + private final UnaryCallable + listDeploymentsPagedCallable; + private final UnaryCallable getDeploymentCallable; + private final UnaryCallable createDeploymentCallable; + private final OperationCallable + createDeploymentOperationCallable; + private final UnaryCallable updateDeploymentCallable; + private final OperationCallable + updateDeploymentOperationCallable; + private final UnaryCallable deleteDeploymentCallable; + private final OperationCallable + deleteDeploymentOperationCallable; + private final UnaryCallable listRevisionsCallable; + private final UnaryCallable + listRevisionsPagedCallable; + private final UnaryCallable getRevisionCallable; + private final UnaryCallable getResourceCallable; + private final UnaryCallable listResourcesCallable; + private final UnaryCallable + listResourcesPagedCallable; + private final UnaryCallable + exportDeploymentStatefileCallable; + private final UnaryCallable + exportRevisionStatefileCallable; + private final UnaryCallable importStatefileCallable; + private final UnaryCallable deleteStatefileCallable; + private final UnaryCallable lockDeploymentCallable; + private final OperationCallable + lockDeploymentOperationCallable; + private final UnaryCallable unlockDeploymentCallable; + private final OperationCallable + unlockDeploymentOperationCallable; + private final UnaryCallable exportLockInfoCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcConfigStub create(ConfigStubSettings settings) throws IOException { + return new GrpcConfigStub(settings, ClientContext.create(settings)); + } + + public static final GrpcConfigStub create(ClientContext clientContext) throws IOException { + return new GrpcConfigStub(ConfigStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcConfigStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcConfigStub( + ConfigStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcConfigStub, 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 GrpcConfigStub(ConfigStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcConfigCallableFactory()); + } + + /** + * Constructs an instance of GrpcConfigStub, 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 GrpcConfigStub( + ConfigStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listDeploymentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDeploymentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("deployment.name", String.valueOf(request.getDeployment().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listRevisionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRevisionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getRevisionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRevisionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getResourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getResourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listResourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listResourcesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + exportDeploymentStatefileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportDeploymentStatefileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + exportRevisionStatefileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportRevisionStatefileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings importStatefileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importStatefileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteStatefileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteStatefileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings lockDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(lockDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings unlockDeploymentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(unlockDeploymentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings exportLockInfoTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportLockInfoMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.listDeploymentsCallable = + callableFactory.createUnaryCallable( + listDeploymentsTransportSettings, settings.listDeploymentsSettings(), clientContext); + this.listDeploymentsPagedCallable = + callableFactory.createPagedCallable( + listDeploymentsTransportSettings, settings.listDeploymentsSettings(), clientContext); + this.getDeploymentCallable = + callableFactory.createUnaryCallable( + getDeploymentTransportSettings, settings.getDeploymentSettings(), clientContext); + this.createDeploymentCallable = + callableFactory.createUnaryCallable( + createDeploymentTransportSettings, settings.createDeploymentSettings(), clientContext); + this.createDeploymentOperationCallable = + callableFactory.createOperationCallable( + createDeploymentTransportSettings, + settings.createDeploymentOperationSettings(), + clientContext, + operationsStub); + this.updateDeploymentCallable = + callableFactory.createUnaryCallable( + updateDeploymentTransportSettings, settings.updateDeploymentSettings(), clientContext); + this.updateDeploymentOperationCallable = + callableFactory.createOperationCallable( + updateDeploymentTransportSettings, + settings.updateDeploymentOperationSettings(), + clientContext, + operationsStub); + this.deleteDeploymentCallable = + callableFactory.createUnaryCallable( + deleteDeploymentTransportSettings, settings.deleteDeploymentSettings(), clientContext); + this.deleteDeploymentOperationCallable = + callableFactory.createOperationCallable( + deleteDeploymentTransportSettings, + settings.deleteDeploymentOperationSettings(), + clientContext, + operationsStub); + this.listRevisionsCallable = + callableFactory.createUnaryCallable( + listRevisionsTransportSettings, settings.listRevisionsSettings(), clientContext); + this.listRevisionsPagedCallable = + callableFactory.createPagedCallable( + listRevisionsTransportSettings, settings.listRevisionsSettings(), clientContext); + this.getRevisionCallable = + callableFactory.createUnaryCallable( + getRevisionTransportSettings, settings.getRevisionSettings(), clientContext); + this.getResourceCallable = + callableFactory.createUnaryCallable( + getResourceTransportSettings, settings.getResourceSettings(), clientContext); + this.listResourcesCallable = + callableFactory.createUnaryCallable( + listResourcesTransportSettings, settings.listResourcesSettings(), clientContext); + this.listResourcesPagedCallable = + callableFactory.createPagedCallable( + listResourcesTransportSettings, settings.listResourcesSettings(), clientContext); + this.exportDeploymentStatefileCallable = + callableFactory.createUnaryCallable( + exportDeploymentStatefileTransportSettings, + settings.exportDeploymentStatefileSettings(), + clientContext); + this.exportRevisionStatefileCallable = + callableFactory.createUnaryCallable( + exportRevisionStatefileTransportSettings, + settings.exportRevisionStatefileSettings(), + clientContext); + this.importStatefileCallable = + callableFactory.createUnaryCallable( + importStatefileTransportSettings, settings.importStatefileSettings(), clientContext); + this.deleteStatefileCallable = + callableFactory.createUnaryCallable( + deleteStatefileTransportSettings, settings.deleteStatefileSettings(), clientContext); + this.lockDeploymentCallable = + callableFactory.createUnaryCallable( + lockDeploymentTransportSettings, settings.lockDeploymentSettings(), clientContext); + this.lockDeploymentOperationCallable = + callableFactory.createOperationCallable( + lockDeploymentTransportSettings, + settings.lockDeploymentOperationSettings(), + clientContext, + operationsStub); + this.unlockDeploymentCallable = + callableFactory.createUnaryCallable( + unlockDeploymentTransportSettings, settings.unlockDeploymentSettings(), clientContext); + this.unlockDeploymentOperationCallable = + callableFactory.createOperationCallable( + unlockDeploymentTransportSettings, + settings.unlockDeploymentOperationSettings(), + clientContext, + operationsStub); + this.exportLockInfoCallable = + callableFactory.createUnaryCallable( + exportLockInfoTransportSettings, settings.exportLockInfoSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listDeploymentsCallable() { + return listDeploymentsCallable; + } + + @Override + public UnaryCallable + listDeploymentsPagedCallable() { + return listDeploymentsPagedCallable; + } + + @Override + public UnaryCallable getDeploymentCallable() { + return getDeploymentCallable; + } + + @Override + public UnaryCallable createDeploymentCallable() { + return createDeploymentCallable; + } + + @Override + public OperationCallable + createDeploymentOperationCallable() { + return createDeploymentOperationCallable; + } + + @Override + public UnaryCallable updateDeploymentCallable() { + return updateDeploymentCallable; + } + + @Override + public OperationCallable + updateDeploymentOperationCallable() { + return updateDeploymentOperationCallable; + } + + @Override + public UnaryCallable deleteDeploymentCallable() { + return deleteDeploymentCallable; + } + + @Override + public OperationCallable + deleteDeploymentOperationCallable() { + return deleteDeploymentOperationCallable; + } + + @Override + public UnaryCallable listRevisionsCallable() { + return listRevisionsCallable; + } + + @Override + public UnaryCallable + listRevisionsPagedCallable() { + return listRevisionsPagedCallable; + } + + @Override + public UnaryCallable getRevisionCallable() { + return getRevisionCallable; + } + + @Override + public UnaryCallable getResourceCallable() { + return getResourceCallable; + } + + @Override + public UnaryCallable listResourcesCallable() { + return listResourcesCallable; + } + + @Override + public UnaryCallable + listResourcesPagedCallable() { + return listResourcesPagedCallable; + } + + @Override + public UnaryCallable + exportDeploymentStatefileCallable() { + return exportDeploymentStatefileCallable; + } + + @Override + public UnaryCallable + exportRevisionStatefileCallable() { + return exportRevisionStatefileCallable; + } + + @Override + public UnaryCallable importStatefileCallable() { + return importStatefileCallable; + } + + @Override + public UnaryCallable deleteStatefileCallable() { + return deleteStatefileCallable; + } + + @Override + public UnaryCallable lockDeploymentCallable() { + return lockDeploymentCallable; + } + + @Override + public OperationCallable + lockDeploymentOperationCallable() { + return lockDeploymentOperationCallable; + } + + @Override + public UnaryCallable unlockDeploymentCallable() { + return unlockDeploymentCallable; + } + + @Override + public OperationCallable + unlockDeploymentOperationCallable() { + return unlockDeploymentOperationCallable; + } + + @Override + public UnaryCallable exportLockInfoCallable() { + return exportLockInfoCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/HttpJsonConfigCallableFactory.java b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/HttpJsonConfigCallableFactory.java new file mode 100644 index 000000000000..c262bc442ea0 --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/HttpJsonConfigCallableFactory.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.cloud.config.v1.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 Config service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonConfigCallableFactory + 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-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/HttpJsonConfigStub.java b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/HttpJsonConfigStub.java new file mode 100644 index 000000000000..f1c5b5bb9af5 --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/java/com/google/cloud/config/v1/stub/HttpJsonConfigStub.java @@ -0,0 +1,1577 @@ +/* + * 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.cloud.config.v1.stub; + +import static com.google.cloud.config.v1.ConfigClient.ListDeploymentsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListLocationsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListResourcesPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListRevisionsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.config.v1.CreateDeploymentRequest; +import com.google.cloud.config.v1.DeleteDeploymentRequest; +import com.google.cloud.config.v1.DeleteStatefileRequest; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.ExportDeploymentStatefileRequest; +import com.google.cloud.config.v1.ExportLockInfoRequest; +import com.google.cloud.config.v1.ExportRevisionStatefileRequest; +import com.google.cloud.config.v1.GetDeploymentRequest; +import com.google.cloud.config.v1.GetResourceRequest; +import com.google.cloud.config.v1.GetRevisionRequest; +import com.google.cloud.config.v1.ImportStatefileRequest; +import com.google.cloud.config.v1.ListDeploymentsRequest; +import com.google.cloud.config.v1.ListDeploymentsResponse; +import com.google.cloud.config.v1.ListResourcesRequest; +import com.google.cloud.config.v1.ListResourcesResponse; +import com.google.cloud.config.v1.ListRevisionsRequest; +import com.google.cloud.config.v1.ListRevisionsResponse; +import com.google.cloud.config.v1.LockDeploymentRequest; +import com.google.cloud.config.v1.LockInfo; +import com.google.cloud.config.v1.OperationMetadata; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.Revision; +import com.google.cloud.config.v1.Statefile; +import com.google.cloud.config.v1.UnlockDeploymentRequest; +import com.google.cloud.config.v1.UpdateDeploymentRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Config service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonConfigStub extends ConfigStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Deployment.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listDeploymentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/ListDeployments") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/deployments", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDeploymentsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/GetDeployment") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deployments/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Deployment.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/CreateDeployment") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/deployments", + 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, "deploymentId", request.getDeploymentId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("deployment", request.getDeployment(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateDeploymentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/UpdateDeployment") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{deployment.name=projects/*/locations/*/deployments/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "deployment.name", request.getDeployment().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("deployment", request.getDeployment(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateDeploymentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/DeleteDeployment") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deployments/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "deletePolicy", request.getDeletePolicyValue()); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteDeploymentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listRevisionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/ListRevisions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/deployments/*}/revisions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListRevisionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getRevisionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/GetRevision") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deployments/*/revisions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Revision.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getResourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/GetResource") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Resource.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listResourcesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/ListResources") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListResourcesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + exportDeploymentStatefileMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/ExportDeploymentStatefile") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/deployments/*}:exportState", + 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(Statefile.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + exportRevisionStatefileMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/ExportRevisionStatefile") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState", + 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(Statefile.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + importStatefileMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/ImportStatefile") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/deployments/*}:importState", + 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(Statefile.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteStatefileMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/DeleteStatefile") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deployments/*}:deleteState", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + lockDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/LockDeployment") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deployments/*}:lock", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (LockDeploymentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + unlockDeploymentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/UnlockDeployment") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deployments/*}:unlock", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UnlockDeploymentRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + exportLockInfoMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.config.v1.Config/ExportLockInfo") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deployments/*}:exportLock", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(LockInfo.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/deployments/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + 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().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/deployments/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/deployments/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + 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().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + listDeploymentsCallable; + private final UnaryCallable + listDeploymentsPagedCallable; + private final UnaryCallable getDeploymentCallable; + private final UnaryCallable createDeploymentCallable; + private final OperationCallable + createDeploymentOperationCallable; + private final UnaryCallable updateDeploymentCallable; + private final OperationCallable + updateDeploymentOperationCallable; + private final UnaryCallable deleteDeploymentCallable; + private final OperationCallable + deleteDeploymentOperationCallable; + private final UnaryCallable listRevisionsCallable; + private final UnaryCallable + listRevisionsPagedCallable; + private final UnaryCallable getRevisionCallable; + private final UnaryCallable getResourceCallable; + private final UnaryCallable listResourcesCallable; + private final UnaryCallable + listResourcesPagedCallable; + private final UnaryCallable + exportDeploymentStatefileCallable; + private final UnaryCallable + exportRevisionStatefileCallable; + private final UnaryCallable importStatefileCallable; + private final UnaryCallable deleteStatefileCallable; + private final UnaryCallable lockDeploymentCallable; + private final OperationCallable + lockDeploymentOperationCallable; + private final UnaryCallable unlockDeploymentCallable; + private final OperationCallable + unlockDeploymentOperationCallable; + private final UnaryCallable exportLockInfoCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonConfigStub create(ConfigStubSettings settings) throws IOException { + return new HttpJsonConfigStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonConfigStub create(ClientContext clientContext) throws IOException { + return new HttpJsonConfigStub(ConfigStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonConfigStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonConfigStub( + ConfigStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonConfigStub, 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 HttpJsonConfigStub(ConfigStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonConfigCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonConfigStub, 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 HttpJsonConfigStub( + ConfigStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + listDeploymentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDeploymentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("deployment.name", String.valueOf(request.getDeployment().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listRevisionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listRevisionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getRevisionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getRevisionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getResourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getResourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listResourcesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listResourcesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + exportDeploymentStatefileTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportDeploymentStatefileMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + exportRevisionStatefileTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportRevisionStatefileMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings importStatefileTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importStatefileMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteStatefileTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteStatefileMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings lockDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(lockDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings unlockDeploymentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(unlockDeploymentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings exportLockInfoTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportLockInfoMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.listDeploymentsCallable = + callableFactory.createUnaryCallable( + listDeploymentsTransportSettings, settings.listDeploymentsSettings(), clientContext); + this.listDeploymentsPagedCallable = + callableFactory.createPagedCallable( + listDeploymentsTransportSettings, settings.listDeploymentsSettings(), clientContext); + this.getDeploymentCallable = + callableFactory.createUnaryCallable( + getDeploymentTransportSettings, settings.getDeploymentSettings(), clientContext); + this.createDeploymentCallable = + callableFactory.createUnaryCallable( + createDeploymentTransportSettings, settings.createDeploymentSettings(), clientContext); + this.createDeploymentOperationCallable = + callableFactory.createOperationCallable( + createDeploymentTransportSettings, + settings.createDeploymentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateDeploymentCallable = + callableFactory.createUnaryCallable( + updateDeploymentTransportSettings, settings.updateDeploymentSettings(), clientContext); + this.updateDeploymentOperationCallable = + callableFactory.createOperationCallable( + updateDeploymentTransportSettings, + settings.updateDeploymentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteDeploymentCallable = + callableFactory.createUnaryCallable( + deleteDeploymentTransportSettings, settings.deleteDeploymentSettings(), clientContext); + this.deleteDeploymentOperationCallable = + callableFactory.createOperationCallable( + deleteDeploymentTransportSettings, + settings.deleteDeploymentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listRevisionsCallable = + callableFactory.createUnaryCallable( + listRevisionsTransportSettings, settings.listRevisionsSettings(), clientContext); + this.listRevisionsPagedCallable = + callableFactory.createPagedCallable( + listRevisionsTransportSettings, settings.listRevisionsSettings(), clientContext); + this.getRevisionCallable = + callableFactory.createUnaryCallable( + getRevisionTransportSettings, settings.getRevisionSettings(), clientContext); + this.getResourceCallable = + callableFactory.createUnaryCallable( + getResourceTransportSettings, settings.getResourceSettings(), clientContext); + this.listResourcesCallable = + callableFactory.createUnaryCallable( + listResourcesTransportSettings, settings.listResourcesSettings(), clientContext); + this.listResourcesPagedCallable = + callableFactory.createPagedCallable( + listResourcesTransportSettings, settings.listResourcesSettings(), clientContext); + this.exportDeploymentStatefileCallable = + callableFactory.createUnaryCallable( + exportDeploymentStatefileTransportSettings, + settings.exportDeploymentStatefileSettings(), + clientContext); + this.exportRevisionStatefileCallable = + callableFactory.createUnaryCallable( + exportRevisionStatefileTransportSettings, + settings.exportRevisionStatefileSettings(), + clientContext); + this.importStatefileCallable = + callableFactory.createUnaryCallable( + importStatefileTransportSettings, settings.importStatefileSettings(), clientContext); + this.deleteStatefileCallable = + callableFactory.createUnaryCallable( + deleteStatefileTransportSettings, settings.deleteStatefileSettings(), clientContext); + this.lockDeploymentCallable = + callableFactory.createUnaryCallable( + lockDeploymentTransportSettings, settings.lockDeploymentSettings(), clientContext); + this.lockDeploymentOperationCallable = + callableFactory.createOperationCallable( + lockDeploymentTransportSettings, + settings.lockDeploymentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.unlockDeploymentCallable = + callableFactory.createUnaryCallable( + unlockDeploymentTransportSettings, settings.unlockDeploymentSettings(), clientContext); + this.unlockDeploymentOperationCallable = + callableFactory.createOperationCallable( + unlockDeploymentTransportSettings, + settings.unlockDeploymentOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.exportLockInfoCallable = + callableFactory.createUnaryCallable( + exportLockInfoTransportSettings, settings.exportLockInfoSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listDeploymentsMethodDescriptor); + methodDescriptors.add(getDeploymentMethodDescriptor); + methodDescriptors.add(createDeploymentMethodDescriptor); + methodDescriptors.add(updateDeploymentMethodDescriptor); + methodDescriptors.add(deleteDeploymentMethodDescriptor); + methodDescriptors.add(listRevisionsMethodDescriptor); + methodDescriptors.add(getRevisionMethodDescriptor); + methodDescriptors.add(getResourceMethodDescriptor); + methodDescriptors.add(listResourcesMethodDescriptor); + methodDescriptors.add(exportDeploymentStatefileMethodDescriptor); + methodDescriptors.add(exportRevisionStatefileMethodDescriptor); + methodDescriptors.add(importStatefileMethodDescriptor); + methodDescriptors.add(deleteStatefileMethodDescriptor); + methodDescriptors.add(lockDeploymentMethodDescriptor); + methodDescriptors.add(unlockDeploymentMethodDescriptor); + methodDescriptors.add(exportLockInfoMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listDeploymentsCallable() { + return listDeploymentsCallable; + } + + @Override + public UnaryCallable + listDeploymentsPagedCallable() { + return listDeploymentsPagedCallable; + } + + @Override + public UnaryCallable getDeploymentCallable() { + return getDeploymentCallable; + } + + @Override + public UnaryCallable createDeploymentCallable() { + return createDeploymentCallable; + } + + @Override + public OperationCallable + createDeploymentOperationCallable() { + return createDeploymentOperationCallable; + } + + @Override + public UnaryCallable updateDeploymentCallable() { + return updateDeploymentCallable; + } + + @Override + public OperationCallable + updateDeploymentOperationCallable() { + return updateDeploymentOperationCallable; + } + + @Override + public UnaryCallable deleteDeploymentCallable() { + return deleteDeploymentCallable; + } + + @Override + public OperationCallable + deleteDeploymentOperationCallable() { + return deleteDeploymentOperationCallable; + } + + @Override + public UnaryCallable listRevisionsCallable() { + return listRevisionsCallable; + } + + @Override + public UnaryCallable + listRevisionsPagedCallable() { + return listRevisionsPagedCallable; + } + + @Override + public UnaryCallable getRevisionCallable() { + return getRevisionCallable; + } + + @Override + public UnaryCallable getResourceCallable() { + return getResourceCallable; + } + + @Override + public UnaryCallable listResourcesCallable() { + return listResourcesCallable; + } + + @Override + public UnaryCallable + listResourcesPagedCallable() { + return listResourcesPagedCallable; + } + + @Override + public UnaryCallable + exportDeploymentStatefileCallable() { + return exportDeploymentStatefileCallable; + } + + @Override + public UnaryCallable + exportRevisionStatefileCallable() { + return exportRevisionStatefileCallable; + } + + @Override + public UnaryCallable importStatefileCallable() { + return importStatefileCallable; + } + + @Override + public UnaryCallable deleteStatefileCallable() { + return deleteStatefileCallable; + } + + @Override + public UnaryCallable lockDeploymentCallable() { + return lockDeploymentCallable; + } + + @Override + public OperationCallable + lockDeploymentOperationCallable() { + return lockDeploymentOperationCallable; + } + + @Override + public UnaryCallable unlockDeploymentCallable() { + return unlockDeploymentCallable; + } + + @Override + public OperationCallable + unlockDeploymentOperationCallable() { + return unlockDeploymentOperationCallable; + } + + @Override + public UnaryCallable exportLockInfoCallable() { + return exportLockInfoCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @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-infra-manager/google-cloud-infra-manager/src/main/resources/META-INF/native-image/com.google.cloud.config.v1/reflect-config.json b/java-infra-manager/google-cloud-infra-manager/src/main/resources/META-INF/native-image/com.google.cloud.config.v1/reflect-config.json new file mode 100644 index 000000000000..98fab26c006d --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/main/resources/META-INF/native-image/com.google.cloud.config.v1/reflect-config.json @@ -0,0 +1,2324 @@ +[ + { + "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.cloud.config.v1.ApplyResults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ApplyResults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.CreateDeploymentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.CreateDeploymentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.DeleteDeploymentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.DeleteDeploymentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.DeleteDeploymentRequest$DeletePolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.DeleteStatefileRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.DeleteStatefileRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Deployment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Deployment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Deployment$ErrorCode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Deployment$LockState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Deployment$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.DeploymentOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.DeploymentOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.DeploymentOperationMetadata$DeploymentStep", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ExportDeploymentStatefileRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ExportDeploymentStatefileRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ExportLockInfoRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ExportLockInfoRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ExportRevisionStatefileRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ExportRevisionStatefileRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.GetDeploymentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.GetDeploymentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.GetResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.GetResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.GetRevisionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.GetRevisionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.GitSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.GitSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ImportStatefileRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ImportStatefileRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListDeploymentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListDeploymentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListDeploymentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListDeploymentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListResourcesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListResourcesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListResourcesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListResourcesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListRevisionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListRevisionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListRevisionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ListRevisionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.LockDeploymentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.LockDeploymentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.LockInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.LockInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Resource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Resource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Resource$Intent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Resource$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ResourceCAIInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ResourceCAIInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ResourceTerraformInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.ResourceTerraformInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Revision", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Revision$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Revision$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Revision$ErrorCode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Revision$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Statefile", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.Statefile$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.TerraformBlueprint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.TerraformBlueprint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.TerraformError", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.TerraformError$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.TerraformOutput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.TerraformOutput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.TerraformVariable", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.TerraformVariable$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.UnlockDeploymentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.UnlockDeploymentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.UpdateDeploymentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.config.v1.UpdateDeploymentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$LogType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$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.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.NullValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct$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.protobuf.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/ConfigClientHttpJsonTest.java b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/ConfigClientHttpJsonTest.java new file mode 100644 index 000000000000..e197f0b3b866 --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/ConfigClientHttpJsonTest.java @@ -0,0 +1,1993 @@ +/* + * 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.cloud.config.v1; + +import static com.google.cloud.config.v1.ConfigClient.ListDeploymentsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListLocationsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListResourcesPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListRevisionsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.config.v1.stub.HttpJsonConfigStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ConfigClientHttpJsonTest { + private static MockHttpService mockService; + private static ConfigClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonConfigStub.getMethodDescriptors(), ConfigSettings.getDefaultEndpoint()); + ConfigSettings settings = + ConfigSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ConfigSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ConfigClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listDeploymentsTest() throws Exception { + Deployment responsesElement = Deployment.newBuilder().build(); + ListDeploymentsResponse expectedResponse = + ListDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllDeployments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDeploymentsPagedResponse pagedListResponse = client.listDeployments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeploymentsList().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 listDeploymentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDeployments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeploymentsTest2() throws Exception { + Deployment responsesElement = Deployment.newBuilder().build(); + ListDeploymentsResponse expectedResponse = + ListDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllDeployments(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListDeploymentsPagedResponse pagedListResponse = client.listDeployments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeploymentsList().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 listDeploymentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listDeployments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + mockService.addResponse(expectedResponse); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + Deployment actualResponse = client.getDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.getDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + + Deployment actualResponse = client.getDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDeploymentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + client.getDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Deployment deployment = Deployment.newBuilder().build(); + String deploymentId = "deploymentId-136894784"; + + Deployment actualResponse = + client.createDeploymentAsync(parent, deployment, deploymentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Deployment deployment = Deployment.newBuilder().build(); + String deploymentId = "deploymentId-136894784"; + client.createDeploymentAsync(parent, deployment, deploymentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Deployment deployment = Deployment.newBuilder().build(); + String deploymentId = "deploymentId-136894784"; + + Deployment actualResponse = + client.createDeploymentAsync(parent, deployment, deploymentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDeploymentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Deployment deployment = Deployment.newBuilder().build(); + String deploymentId = "deploymentId-136894784"; + client.createDeploymentAsync(parent, deployment, deploymentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Deployment deployment = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Deployment actualResponse = client.updateDeploymentAsync(deployment, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Deployment deployment = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDeploymentAsync(deployment, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + Deployment actualResponse = client.deleteDeploymentAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.deleteDeploymentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + + Deployment actualResponse = client.deleteDeploymentAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDeploymentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + client.deleteDeploymentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listRevisionsTest() throws Exception { + Revision responsesElement = Revision.newBuilder().build(); + ListRevisionsResponse expectedResponse = + ListRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllRevisions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + ListRevisionsPagedResponse pagedListResponse = client.listRevisions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRevisionsList().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 listRevisionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.listRevisions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRevisionsTest2() throws Exception { + Revision responsesElement = Revision.newBuilder().build(); + ListRevisionsResponse expectedResponse = + ListRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllRevisions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2099/locations/location-2099/deployments/deployment-2099"; + + ListRevisionsPagedResponse pagedListResponse = client.listRevisions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRevisionsList().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 listRevisionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2099/locations/location-2099/deployments/deployment-2099"; + client.listRevisions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRevisionTest() throws Exception { + Revision expectedResponse = + Revision.newBuilder() + .setName( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setApplyResults(ApplyResults.newBuilder().build()) + .setStateDetail("stateDetail748574786") + .setBuild("build94094958") + .setLogs("logs3327407") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + mockService.addResponse(expectedResponse); + + RevisionName name = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); + + Revision actualResponse = client.getRevision(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getRevisionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RevisionName name = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); + client.getRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRevisionTest2() throws Exception { + Revision expectedResponse = + Revision.newBuilder() + .setName( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setApplyResults(ApplyResults.newBuilder().build()) + .setStateDetail("stateDetail748574786") + .setBuild("build94094958") + .setLogs("logs3327407") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6392/locations/location-6392/deployments/deployment-6392/revisions/revision-6392"; + + Revision actualResponse = client.getRevision(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getRevisionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6392/locations/location-6392/deployments/deployment-6392/revisions/revision-6392"; + client.getRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getResourceTest() throws Exception { + Resource expectedResponse = + Resource.newBuilder() + .setName( + ResourceName.of( + "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]") + .toString()) + .setTerraformInfo(ResourceTerraformInfo.newBuilder().build()) + .putAllCaiAssets(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ResourceName name = + ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]"); + + Resource actualResponse = client.getResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getResourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceName name = + ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]"); + client.getResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getResourceTest2() throws Exception { + Resource expectedResponse = + Resource.newBuilder() + .setName( + ResourceName.of( + "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]") + .toString()) + .setTerraformInfo(ResourceTerraformInfo.newBuilder().build()) + .putAllCaiAssets(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3735/locations/location-3735/deployments/deployment-3735/revisions/revision-3735/resources/resource-3735"; + + Resource actualResponse = client.getResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getResourceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3735/locations/location-3735/deployments/deployment-3735/revisions/revision-3735/resources/resource-3735"; + client.getResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listResourcesTest() throws Exception { + Resource responsesElement = Resource.newBuilder().build(); + ListResourcesResponse expectedResponse = + ListResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllResources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + RevisionName parent = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); + + ListResourcesPagedResponse pagedListResponse = client.listResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourcesList().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 listResourcesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RevisionName parent = + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); + client.listResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listResourcesTest2() throws Exception { + Resource responsesElement = Resource.newBuilder().build(); + ListResourcesResponse expectedResponse = + ListResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllResources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-9641/locations/location-9641/deployments/deployment-9641/revisions/revision-9641"; + + ListResourcesPagedResponse pagedListResponse = client.listResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourcesList().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 listResourcesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-9641/locations/location-9641/deployments/deployment-9641/revisions/revision-9641"; + client.listResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportDeploymentStatefileTest() throws Exception { + Statefile expectedResponse = Statefile.newBuilder().setSignedUri("signedUri1076770992").build(); + mockService.addResponse(expectedResponse); + + ExportDeploymentStatefileRequest request = + ExportDeploymentStatefileRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setDraft(true) + .build(); + + Statefile actualResponse = client.exportDeploymentStatefile(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportDeploymentStatefileExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportDeploymentStatefileRequest request = + ExportDeploymentStatefileRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setDraft(true) + .build(); + client.exportDeploymentStatefile(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportRevisionStatefileTest() throws Exception { + Statefile expectedResponse = Statefile.newBuilder().setSignedUri("signedUri1076770992").build(); + mockService.addResponse(expectedResponse); + + ExportRevisionStatefileRequest request = + ExportRevisionStatefileRequest.newBuilder() + .setParent( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString()) + .build(); + + Statefile actualResponse = client.exportRevisionStatefile(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportRevisionStatefileExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportRevisionStatefileRequest request = + ExportRevisionStatefileRequest.newBuilder() + .setParent( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") + .toString()) + .build(); + client.exportRevisionStatefile(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importStatefileTest() throws Exception { + Statefile expectedResponse = Statefile.newBuilder().setSignedUri("signedUri1076770992").build(); + mockService.addResponse(expectedResponse); + + DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + long lockId = 338696367; + + Statefile actualResponse = client.importStatefile(parent, lockId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importStatefileExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + long lockId = 338696367; + client.importStatefile(parent, lockId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importStatefileTest2() throws Exception { + Statefile expectedResponse = Statefile.newBuilder().setSignedUri("signedUri1076770992").build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2099/locations/location-2099/deployments/deployment-2099"; + long lockId = 338696367; + + Statefile actualResponse = client.importStatefile(parent, lockId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importStatefileExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2099/locations/location-2099/deployments/deployment-2099"; + long lockId = 338696367; + client.importStatefile(parent, lockId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteStatefileTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + client.deleteStatefile(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteStatefileExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.deleteStatefile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteStatefileTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + + client.deleteStatefile(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteStatefileExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + client.deleteStatefile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void lockDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("lockDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + Deployment actualResponse = client.lockDeploymentAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void lockDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.lockDeploymentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void lockDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("lockDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + + Deployment actualResponse = client.lockDeploymentAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void lockDeploymentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + client.lockDeploymentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void unlockDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("unlockDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + long lockId = 338696367; + + Deployment actualResponse = client.unlockDeploymentAsync(name, lockId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void unlockDeploymentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + long lockId = 338696367; + client.unlockDeploymentAsync(name, lockId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void unlockDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("unlockDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + long lockId = 338696367; + + Deployment actualResponse = client.unlockDeploymentAsync(name, lockId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void unlockDeploymentExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + long lockId = 338696367; + client.unlockDeploymentAsync(name, lockId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void exportLockInfoTest() throws Exception { + LockInfo expectedResponse = + LockInfo.newBuilder() + .setLockId(338696367) + .setOperation("operation1662702951") + .setInfo("info3237038") + .setWho("who117694") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + LockInfo actualResponse = client.exportLockInfo(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportLockInfoExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.exportLockInfo(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportLockInfoTest2() throws Exception { + LockInfo expectedResponse = + LockInfo.newBuilder() + .setLockId(338696367) + .setOperation("operation1662702951") + .setInfo("info3237038") + .setWho("who117694") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + + LockInfo actualResponse = client.exportLockInfo(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportLockInfoExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4348/locations/location-4348/deployments/deployment-4348"; + client.exportLockInfo(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/ConfigClientTest.java b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/ConfigClientTest.java new file mode 100644 index 000000000000..51a5e3166a9c --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/ConfigClientTest.java @@ -0,0 +1,1799 @@ +/* + * 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.cloud.config.v1; + +import static com.google.cloud.config.v1.ConfigClient.ListDeploymentsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListLocationsPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListResourcesPagedResponse; +import static com.google.cloud.config.v1.ConfigClient.ListRevisionsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ConfigClientTest { + private static MockConfig mockConfig; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ConfigClient client; + + @BeforeClass + public static void startStaticServer() { + mockConfig = new MockConfig(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockConfig, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ConfigSettings settings = + ConfigSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ConfigClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listDeploymentsTest() throws Exception { + Deployment responsesElement = Deployment.newBuilder().build(); + ListDeploymentsResponse expectedResponse = + ListDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllDeployments(Arrays.asList(responsesElement)) + .build(); + mockConfig.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDeploymentsPagedResponse pagedListResponse = client.listDeployments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeploymentsList().get(0), resources.get(0)); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeploymentsRequest actualRequest = ((ListDeploymentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeploymentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDeployments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeploymentsTest2() throws Exception { + Deployment responsesElement = Deployment.newBuilder().build(); + ListDeploymentsResponse expectedResponse = + ListDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllDeployments(Arrays.asList(responsesElement)) + .build(); + mockConfig.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDeploymentsPagedResponse pagedListResponse = client.listDeployments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeploymentsList().get(0), resources.get(0)); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeploymentsRequest actualRequest = ((ListDeploymentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeploymentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDeployments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + mockConfig.addResponse(expectedResponse); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + Deployment actualResponse = client.getDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeploymentRequest actualRequest = ((GetDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.getDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + mockConfig.addResponse(expectedResponse); + + String name = "name3373707"; + + Deployment actualResponse = client.getDeployment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeploymentRequest actualRequest = ((GetDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String name = "name3373707"; + client.getDeployment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockConfig.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Deployment deployment = Deployment.newBuilder().build(); + String deploymentId = "deploymentId-136894784"; + + Deployment actualResponse = + client.createDeploymentAsync(parent, deployment, deploymentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeploymentRequest actualRequest = ((CreateDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(deployment, actualRequest.getDeployment()); + Assert.assertEquals(deploymentId, actualRequest.getDeploymentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Deployment deployment = Deployment.newBuilder().build(); + String deploymentId = "deploymentId-136894784"; + client.createDeploymentAsync(parent, deployment, deploymentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockConfig.addResponse(resultOperation); + + String parent = "parent-995424086"; + Deployment deployment = Deployment.newBuilder().build(); + String deploymentId = "deploymentId-136894784"; + + Deployment actualResponse = + client.createDeploymentAsync(parent, deployment, deploymentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeploymentRequest actualRequest = ((CreateDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(deployment, actualRequest.getDeployment()); + Assert.assertEquals(deploymentId, actualRequest.getDeploymentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String parent = "parent-995424086"; + Deployment deployment = Deployment.newBuilder().build(); + String deploymentId = "deploymentId-136894784"; + client.createDeploymentAsync(parent, deployment, deploymentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockConfig.addResponse(resultOperation); + + Deployment deployment = Deployment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Deployment actualResponse = client.updateDeploymentAsync(deployment, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDeploymentRequest actualRequest = ((UpdateDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(deployment, actualRequest.getDeployment()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + Deployment deployment = Deployment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDeploymentAsync(deployment, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockConfig.addResponse(resultOperation); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + Deployment actualResponse = client.deleteDeploymentAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDeploymentRequest actualRequest = ((DeleteDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.deleteDeploymentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockConfig.addResponse(resultOperation); + + String name = "name3373707"; + + Deployment actualResponse = client.deleteDeploymentAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDeploymentRequest actualRequest = ((DeleteDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String name = "name3373707"; + client.deleteDeploymentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listRevisionsTest() throws Exception { + Revision responsesElement = Revision.newBuilder().build(); + ListRevisionsResponse expectedResponse = + ListRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllRevisions(Arrays.asList(responsesElement)) + .build(); + mockConfig.addResponse(expectedResponse); + + DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + ListRevisionsPagedResponse pagedListResponse = client.listRevisions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRevisionsList().get(0), resources.get(0)); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRevisionsRequest actualRequest = ((ListRevisionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRevisionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.listRevisions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRevisionsTest2() throws Exception { + Revision responsesElement = Revision.newBuilder().build(); + ListRevisionsResponse expectedResponse = + ListRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllRevisions(Arrays.asList(responsesElement)) + .build(); + mockConfig.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRevisionsPagedResponse pagedListResponse = client.listRevisions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRevisionsList().get(0), resources.get(0)); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRevisionsRequest actualRequest = ((ListRevisionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRevisionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRevisions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRevisionTest() throws Exception { + Revision expectedResponse = + Revision.newBuilder() + .setName( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setApplyResults(ApplyResults.newBuilder().build()) + .setStateDetail("stateDetail748574786") + .setBuild("build94094958") + .setLogs("logs3327407") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + mockConfig.addResponse(expectedResponse); + + RevisionName name = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); + + Revision actualResponse = client.getRevision(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRevisionRequest actualRequest = ((GetRevisionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRevisionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + RevisionName name = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); + client.getRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRevisionTest2() throws Exception { + Revision expectedResponse = + Revision.newBuilder() + .setName( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setApplyResults(ApplyResults.newBuilder().build()) + .setStateDetail("stateDetail748574786") + .setBuild("build94094958") + .setLogs("logs3327407") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + mockConfig.addResponse(expectedResponse); + + String name = "name3373707"; + + Revision actualResponse = client.getRevision(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRevisionRequest actualRequest = ((GetRevisionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRevisionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String name = "name3373707"; + client.getRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getResourceTest() throws Exception { + Resource expectedResponse = + Resource.newBuilder() + .setName( + ResourceName.of( + "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]") + .toString()) + .setTerraformInfo(ResourceTerraformInfo.newBuilder().build()) + .putAllCaiAssets(new HashMap()) + .build(); + mockConfig.addResponse(expectedResponse); + + ResourceName name = + ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]"); + + Resource actualResponse = client.getResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetResourceRequest actualRequest = ((GetResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + ResourceName name = + ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]"); + client.getResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getResourceTest2() throws Exception { + Resource expectedResponse = + Resource.newBuilder() + .setName( + ResourceName.of( + "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]") + .toString()) + .setTerraformInfo(ResourceTerraformInfo.newBuilder().build()) + .putAllCaiAssets(new HashMap()) + .build(); + mockConfig.addResponse(expectedResponse); + + String name = "name3373707"; + + Resource actualResponse = client.getResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetResourceRequest actualRequest = ((GetResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String name = "name3373707"; + client.getResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listResourcesTest() throws Exception { + Resource responsesElement = Resource.newBuilder().build(); + ListResourcesResponse expectedResponse = + ListResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllResources(Arrays.asList(responsesElement)) + .build(); + mockConfig.addResponse(expectedResponse); + + RevisionName parent = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); + + ListResourcesPagedResponse pagedListResponse = client.listResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourcesList().get(0), resources.get(0)); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListResourcesRequest actualRequest = ((ListResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listResourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + RevisionName parent = + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); + client.listResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listResourcesTest2() throws Exception { + Resource responsesElement = Resource.newBuilder().build(); + ListResourcesResponse expectedResponse = + ListResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllResources(Arrays.asList(responsesElement)) + .build(); + mockConfig.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListResourcesPagedResponse pagedListResponse = client.listResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourcesList().get(0), resources.get(0)); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListResourcesRequest actualRequest = ((ListResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listResourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String parent = "parent-995424086"; + client.listResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportDeploymentStatefileTest() throws Exception { + Statefile expectedResponse = Statefile.newBuilder().setSignedUri("signedUri1076770992").build(); + mockConfig.addResponse(expectedResponse); + + ExportDeploymentStatefileRequest request = + ExportDeploymentStatefileRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setDraft(true) + .build(); + + Statefile actualResponse = client.exportDeploymentStatefile(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportDeploymentStatefileRequest actualRequest = + ((ExportDeploymentStatefileRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getDraft(), actualRequest.getDraft()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportDeploymentStatefileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + ExportDeploymentStatefileRequest request = + ExportDeploymentStatefileRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setDraft(true) + .build(); + client.exportDeploymentStatefile(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportRevisionStatefileTest() throws Exception { + Statefile expectedResponse = Statefile.newBuilder().setSignedUri("signedUri1076770992").build(); + mockConfig.addResponse(expectedResponse); + + ExportRevisionStatefileRequest request = + ExportRevisionStatefileRequest.newBuilder() + .setParent( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString()) + .build(); + + Statefile actualResponse = client.exportRevisionStatefile(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportRevisionStatefileRequest actualRequest = + ((ExportRevisionStatefileRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportRevisionStatefileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + ExportRevisionStatefileRequest request = + ExportRevisionStatefileRequest.newBuilder() + .setParent( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") + .toString()) + .build(); + client.exportRevisionStatefile(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importStatefileTest() throws Exception { + Statefile expectedResponse = Statefile.newBuilder().setSignedUri("signedUri1076770992").build(); + mockConfig.addResponse(expectedResponse); + + DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + long lockId = 338696367; + + Statefile actualResponse = client.importStatefile(parent, lockId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportStatefileRequest actualRequest = ((ImportStatefileRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(lockId, actualRequest.getLockId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importStatefileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + long lockId = 338696367; + client.importStatefile(parent, lockId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importStatefileTest2() throws Exception { + Statefile expectedResponse = Statefile.newBuilder().setSignedUri("signedUri1076770992").build(); + mockConfig.addResponse(expectedResponse); + + String parent = "parent-995424086"; + long lockId = 338696367; + + Statefile actualResponse = client.importStatefile(parent, lockId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportStatefileRequest actualRequest = ((ImportStatefileRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(lockId, actualRequest.getLockId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importStatefileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String parent = "parent-995424086"; + long lockId = 338696367; + client.importStatefile(parent, lockId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteStatefileTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockConfig.addResponse(expectedResponse); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + client.deleteStatefile(name); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteStatefileRequest actualRequest = ((DeleteStatefileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteStatefileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.deleteStatefile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteStatefileTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockConfig.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteStatefile(name); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteStatefileRequest actualRequest = ((DeleteStatefileRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteStatefileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String name = "name3373707"; + client.deleteStatefile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void lockDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("lockDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockConfig.addResponse(resultOperation); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + Deployment actualResponse = client.lockDeploymentAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + LockDeploymentRequest actualRequest = ((LockDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void lockDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.lockDeploymentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void lockDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("lockDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockConfig.addResponse(resultOperation); + + String name = "name3373707"; + + Deployment actualResponse = client.lockDeploymentAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + LockDeploymentRequest actualRequest = ((LockDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void lockDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String name = "name3373707"; + client.lockDeploymentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void unlockDeploymentTest() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("unlockDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockConfig.addResponse(resultOperation); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + long lockId = 338696367; + + Deployment actualResponse = client.unlockDeploymentAsync(name, lockId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UnlockDeploymentRequest actualRequest = ((UnlockDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(lockId, actualRequest.getLockId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void unlockDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + long lockId = 338696367; + client.unlockDeploymentAsync(name, lockId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void unlockDeploymentTest2() throws Exception { + Deployment expectedResponse = + Deployment.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setLatestRevision("latestRevision-1002490750") + .setStateDetail("stateDetail748574786") + .setDeleteResults(ApplyResults.newBuilder().build()) + .setDeleteBuild("deleteBuild-1148574845") + .setDeleteLogs("deleteLogs1764356602") + .addAllTfErrors(new ArrayList()) + .setErrorLogs("errorLogs329304023") + .setArtifactsGcsBucket("artifactsGcsBucket-1978454016") + .setServiceAccount("serviceAccount1079137720") + .setImportExistingResources(true) + .setWorkerPool("workerPool-384405318") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("unlockDeploymentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockConfig.addResponse(resultOperation); + + String name = "name3373707"; + long lockId = 338696367; + + Deployment actualResponse = client.unlockDeploymentAsync(name, lockId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UnlockDeploymentRequest actualRequest = ((UnlockDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(lockId, actualRequest.getLockId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void unlockDeploymentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String name = "name3373707"; + long lockId = 338696367; + client.unlockDeploymentAsync(name, lockId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void exportLockInfoTest() throws Exception { + LockInfo expectedResponse = + LockInfo.newBuilder() + .setLockId(338696367) + .setOperation("operation1662702951") + .setInfo("info3237038") + .setWho("who117694") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockConfig.addResponse(expectedResponse); + + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + + LockInfo actualResponse = client.exportLockInfo(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportLockInfoRequest actualRequest = ((ExportLockInfoRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportLockInfoExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + client.exportLockInfo(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportLockInfoTest2() throws Exception { + LockInfo expectedResponse = + LockInfo.newBuilder() + .setLockId(338696367) + .setOperation("operation1662702951") + .setInfo("info3237038") + .setWho("who117694") + .setVersion("version351608024") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockConfig.addResponse(expectedResponse); + + String name = "name3373707"; + + LockInfo actualResponse = client.exportLockInfo(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConfig.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportLockInfoRequest actualRequest = ((ExportLockInfoRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportLockInfoExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConfig.addException(exception); + + try { + String name = "name3373707"; + client.exportLockInfo(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockConfig.java b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockConfig.java new file mode 100644 index 000000000000..c32467579731 --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockConfig.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.cloud.config.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockConfig implements MockGrpcService { + private final MockConfigImpl serviceImpl; + + public MockConfig() { + serviceImpl = new MockConfigImpl(); + } + + @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-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockConfigImpl.java b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockConfigImpl.java new file mode 100644 index 000000000000..a3c7a6a3201c --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockConfigImpl.java @@ -0,0 +1,396 @@ +/* + * 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.cloud.config.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.config.v1.ConfigGrpc.ConfigImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +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 MockConfigImpl extends ConfigImplBase { + private List requests; + private Queue responses; + + public MockConfigImpl() { + 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 listDeployments( + ListDeploymentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDeploymentsResponse) { + requests.add(request); + responseObserver.onNext(((ListDeploymentsResponse) 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 ListDeployments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDeploymentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDeployment( + GetDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Deployment) { + requests.add(request); + responseObserver.onNext(((Deployment) 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 GetDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Deployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDeployment( + CreateDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDeployment( + UpdateDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDeployment( + DeleteDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRevisions( + ListRevisionsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRevisionsResponse) { + requests.add(request); + responseObserver.onNext(((ListRevisionsResponse) 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 ListRevisions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRevisionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRevision(GetRevisionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Revision) { + requests.add(request); + responseObserver.onNext(((Revision) 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 GetRevision, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Revision.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getResource(GetResourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Resource) { + requests.add(request); + responseObserver.onNext(((Resource) 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 GetResource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Resource.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listResources( + ListResourcesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListResourcesResponse) { + requests.add(request); + responseObserver.onNext(((ListResourcesResponse) 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 ListResources, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListResourcesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void exportDeploymentStatefile( + ExportDeploymentStatefileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Statefile) { + requests.add(request); + responseObserver.onNext(((Statefile) 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 ExportDeploymentStatefile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Statefile.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void exportRevisionStatefile( + ExportRevisionStatefileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Statefile) { + requests.add(request); + responseObserver.onNext(((Statefile) 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 ExportRevisionStatefile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Statefile.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importStatefile( + ImportStatefileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Statefile) { + requests.add(request); + responseObserver.onNext(((Statefile) 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 ImportStatefile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Statefile.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteStatefile( + DeleteStatefileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) 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 DeleteStatefile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void lockDeployment( + LockDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method LockDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void unlockDeployment( + UnlockDeploymentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UnlockDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void exportLockInfo( + ExportLockInfoRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LockInfo) { + requests.add(request); + responseObserver.onNext(((LockInfo) 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 ExportLockInfo, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LockInfo.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockIAMPolicy.java b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockIAMPolicy.java new file mode 100644 index 000000000000..55f5b07d2af1 --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockIAMPolicy.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.cloud.config.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicy implements MockGrpcService { + private final MockIAMPolicyImpl serviceImpl; + + public MockIAMPolicy() { + serviceImpl = new MockIAMPolicyImpl(); + } + + @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-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockIAMPolicyImpl.java b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockIAMPolicyImpl.java new file mode 100644 index 000000000000..471576d21c9f --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockIAMPolicyImpl.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.cloud.config.v1; + +import com.google.api.core.BetaApi; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicyImpl extends IAMPolicyImplBase { + private List requests; + private Queue responses; + + public MockIAMPolicyImpl() { + 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 testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) 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 TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockLocations.java b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockLocations.java new file mode 100644 index 000000000000..1de0662d6764 --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockLocations.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.cloud.config.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockLocationsImpl.java b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..e157ba12f0cc --- /dev/null +++ b/java-infra-manager/google-cloud-infra-manager/src/test/java/com/google/cloud/config/v1/MockLocationsImpl.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.cloud.config.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-infra-manager/grpc-google-cloud-infra-manager-v1/pom.xml b/java-infra-manager/grpc-google-cloud-infra-manager-v1/pom.xml new file mode 100644 index 000000000000..3005ee389774 --- /dev/null +++ b/java-infra-manager/grpc-google-cloud-infra-manager-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-infra-manager-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-infra-manager-v1 + GRPC library for google-cloud-infra-manager + + com.google.cloud + google-cloud-infra-manager-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-infra-manager-v1 + + + com.google.guava + guava + + + \ No newline at end of file diff --git a/java-infra-manager/grpc-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ConfigGrpc.java b/java-infra-manager/grpc-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ConfigGrpc.java new file mode 100644 index 000000000000..a0d9219b3b35 --- /dev/null +++ b/java-infra-manager/grpc-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ConfigGrpc.java @@ -0,0 +1,2083 @@ +/* + * 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.cloud.config.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Infrastructure Manager is a managed service that automates the deployment and
+ * management of Google Cloud infrastructure resources.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/config/v1/config.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ConfigGrpc { + + private ConfigGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.config.v1.Config"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ListDeploymentsRequest, + com.google.cloud.config.v1.ListDeploymentsResponse> + getListDeploymentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDeployments", + requestType = com.google.cloud.config.v1.ListDeploymentsRequest.class, + responseType = com.google.cloud.config.v1.ListDeploymentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ListDeploymentsRequest, + com.google.cloud.config.v1.ListDeploymentsResponse> + getListDeploymentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ListDeploymentsRequest, + com.google.cloud.config.v1.ListDeploymentsResponse> + getListDeploymentsMethod; + if ((getListDeploymentsMethod = ConfigGrpc.getListDeploymentsMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getListDeploymentsMethod = ConfigGrpc.getListDeploymentsMethod) == null) { + ConfigGrpc.getListDeploymentsMethod = + getListDeploymentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDeployments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.ListDeploymentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.ListDeploymentsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("ListDeployments")) + .build(); + } + } + } + return getListDeploymentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.GetDeploymentRequest, com.google.cloud.config.v1.Deployment> + getGetDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDeployment", + requestType = com.google.cloud.config.v1.GetDeploymentRequest.class, + responseType = com.google.cloud.config.v1.Deployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.GetDeploymentRequest, com.google.cloud.config.v1.Deployment> + getGetDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.GetDeploymentRequest, com.google.cloud.config.v1.Deployment> + getGetDeploymentMethod; + if ((getGetDeploymentMethod = ConfigGrpc.getGetDeploymentMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getGetDeploymentMethod = ConfigGrpc.getGetDeploymentMethod) == null) { + ConfigGrpc.getGetDeploymentMethod = + getGetDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.GetDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.Deployment.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("GetDeployment")) + .build(); + } + } + } + return getGetDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.CreateDeploymentRequest, com.google.longrunning.Operation> + getCreateDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDeployment", + requestType = com.google.cloud.config.v1.CreateDeploymentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.CreateDeploymentRequest, com.google.longrunning.Operation> + getCreateDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.CreateDeploymentRequest, com.google.longrunning.Operation> + getCreateDeploymentMethod; + if ((getCreateDeploymentMethod = ConfigGrpc.getCreateDeploymentMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getCreateDeploymentMethod = ConfigGrpc.getCreateDeploymentMethod) == null) { + ConfigGrpc.getCreateDeploymentMethod = + getCreateDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.CreateDeploymentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("CreateDeployment")) + .build(); + } + } + } + return getCreateDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.UpdateDeploymentRequest, com.google.longrunning.Operation> + getUpdateDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDeployment", + requestType = com.google.cloud.config.v1.UpdateDeploymentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.UpdateDeploymentRequest, com.google.longrunning.Operation> + getUpdateDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.UpdateDeploymentRequest, com.google.longrunning.Operation> + getUpdateDeploymentMethod; + if ((getUpdateDeploymentMethod = ConfigGrpc.getUpdateDeploymentMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getUpdateDeploymentMethod = ConfigGrpc.getUpdateDeploymentMethod) == null) { + ConfigGrpc.getUpdateDeploymentMethod = + getUpdateDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.UpdateDeploymentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("UpdateDeployment")) + .build(); + } + } + } + return getUpdateDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.DeleteDeploymentRequest, com.google.longrunning.Operation> + getDeleteDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDeployment", + requestType = com.google.cloud.config.v1.DeleteDeploymentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.DeleteDeploymentRequest, com.google.longrunning.Operation> + getDeleteDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.DeleteDeploymentRequest, com.google.longrunning.Operation> + getDeleteDeploymentMethod; + if ((getDeleteDeploymentMethod = ConfigGrpc.getDeleteDeploymentMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getDeleteDeploymentMethod = ConfigGrpc.getDeleteDeploymentMethod) == null) { + ConfigGrpc.getDeleteDeploymentMethod = + getDeleteDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.DeleteDeploymentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("DeleteDeployment")) + .build(); + } + } + } + return getDeleteDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ListRevisionsRequest, + com.google.cloud.config.v1.ListRevisionsResponse> + getListRevisionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRevisions", + requestType = com.google.cloud.config.v1.ListRevisionsRequest.class, + responseType = com.google.cloud.config.v1.ListRevisionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ListRevisionsRequest, + com.google.cloud.config.v1.ListRevisionsResponse> + getListRevisionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ListRevisionsRequest, + com.google.cloud.config.v1.ListRevisionsResponse> + getListRevisionsMethod; + if ((getListRevisionsMethod = ConfigGrpc.getListRevisionsMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getListRevisionsMethod = ConfigGrpc.getListRevisionsMethod) == null) { + ConfigGrpc.getListRevisionsMethod = + getListRevisionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRevisions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.ListRevisionsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.ListRevisionsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("ListRevisions")) + .build(); + } + } + } + return getListRevisionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.GetRevisionRequest, com.google.cloud.config.v1.Revision> + getGetRevisionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRevision", + requestType = com.google.cloud.config.v1.GetRevisionRequest.class, + responseType = com.google.cloud.config.v1.Revision.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.GetRevisionRequest, com.google.cloud.config.v1.Revision> + getGetRevisionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.GetRevisionRequest, com.google.cloud.config.v1.Revision> + getGetRevisionMethod; + if ((getGetRevisionMethod = ConfigGrpc.getGetRevisionMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getGetRevisionMethod = ConfigGrpc.getGetRevisionMethod) == null) { + ConfigGrpc.getGetRevisionMethod = + getGetRevisionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRevision")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.GetRevisionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.Revision.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("GetRevision")) + .build(); + } + } + } + return getGetRevisionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.GetResourceRequest, com.google.cloud.config.v1.Resource> + getGetResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetResource", + requestType = com.google.cloud.config.v1.GetResourceRequest.class, + responseType = com.google.cloud.config.v1.Resource.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.GetResourceRequest, com.google.cloud.config.v1.Resource> + getGetResourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.GetResourceRequest, com.google.cloud.config.v1.Resource> + getGetResourceMethod; + if ((getGetResourceMethod = ConfigGrpc.getGetResourceMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getGetResourceMethod = ConfigGrpc.getGetResourceMethod) == null) { + ConfigGrpc.getGetResourceMethod = + getGetResourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.GetResourceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.Resource.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("GetResource")) + .build(); + } + } + } + return getGetResourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ListResourcesRequest, + com.google.cloud.config.v1.ListResourcesResponse> + getListResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListResources", + requestType = com.google.cloud.config.v1.ListResourcesRequest.class, + responseType = com.google.cloud.config.v1.ListResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ListResourcesRequest, + com.google.cloud.config.v1.ListResourcesResponse> + getListResourcesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ListResourcesRequest, + com.google.cloud.config.v1.ListResourcesResponse> + getListResourcesMethod; + if ((getListResourcesMethod = ConfigGrpc.getListResourcesMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getListResourcesMethod = ConfigGrpc.getListResourcesMethod) == null) { + ConfigGrpc.getListResourcesMethod = + getListResourcesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.ListResourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.ListResourcesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("ListResources")) + .build(); + } + } + } + return getListResourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ExportDeploymentStatefileRequest, + com.google.cloud.config.v1.Statefile> + getExportDeploymentStatefileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportDeploymentStatefile", + requestType = com.google.cloud.config.v1.ExportDeploymentStatefileRequest.class, + responseType = com.google.cloud.config.v1.Statefile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ExportDeploymentStatefileRequest, + com.google.cloud.config.v1.Statefile> + getExportDeploymentStatefileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ExportDeploymentStatefileRequest, + com.google.cloud.config.v1.Statefile> + getExportDeploymentStatefileMethod; + if ((getExportDeploymentStatefileMethod = ConfigGrpc.getExportDeploymentStatefileMethod) + == null) { + synchronized (ConfigGrpc.class) { + if ((getExportDeploymentStatefileMethod = ConfigGrpc.getExportDeploymentStatefileMethod) + == null) { + ConfigGrpc.getExportDeploymentStatefileMethod = + getExportDeploymentStatefileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ExportDeploymentStatefile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.ExportDeploymentStatefileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.Statefile.getDefaultInstance())) + .setSchemaDescriptor( + new ConfigMethodDescriptorSupplier("ExportDeploymentStatefile")) + .build(); + } + } + } + return getExportDeploymentStatefileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ExportRevisionStatefileRequest, + com.google.cloud.config.v1.Statefile> + getExportRevisionStatefileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportRevisionStatefile", + requestType = com.google.cloud.config.v1.ExportRevisionStatefileRequest.class, + responseType = com.google.cloud.config.v1.Statefile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ExportRevisionStatefileRequest, + com.google.cloud.config.v1.Statefile> + getExportRevisionStatefileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ExportRevisionStatefileRequest, + com.google.cloud.config.v1.Statefile> + getExportRevisionStatefileMethod; + if ((getExportRevisionStatefileMethod = ConfigGrpc.getExportRevisionStatefileMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getExportRevisionStatefileMethod = ConfigGrpc.getExportRevisionStatefileMethod) + == null) { + ConfigGrpc.getExportRevisionStatefileMethod = + getExportRevisionStatefileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ExportRevisionStatefile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.ExportRevisionStatefileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.Statefile.getDefaultInstance())) + .setSchemaDescriptor( + new ConfigMethodDescriptorSupplier("ExportRevisionStatefile")) + .build(); + } + } + } + return getExportRevisionStatefileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ImportStatefileRequest, com.google.cloud.config.v1.Statefile> + getImportStatefileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportStatefile", + requestType = com.google.cloud.config.v1.ImportStatefileRequest.class, + responseType = com.google.cloud.config.v1.Statefile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ImportStatefileRequest, com.google.cloud.config.v1.Statefile> + getImportStatefileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ImportStatefileRequest, com.google.cloud.config.v1.Statefile> + getImportStatefileMethod; + if ((getImportStatefileMethod = ConfigGrpc.getImportStatefileMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getImportStatefileMethod = ConfigGrpc.getImportStatefileMethod) == null) { + ConfigGrpc.getImportStatefileMethod = + getImportStatefileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportStatefile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.ImportStatefileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.Statefile.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("ImportStatefile")) + .build(); + } + } + } + return getImportStatefileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.DeleteStatefileRequest, com.google.protobuf.Empty> + getDeleteStatefileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteStatefile", + requestType = com.google.cloud.config.v1.DeleteStatefileRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.DeleteStatefileRequest, com.google.protobuf.Empty> + getDeleteStatefileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.DeleteStatefileRequest, com.google.protobuf.Empty> + getDeleteStatefileMethod; + if ((getDeleteStatefileMethod = ConfigGrpc.getDeleteStatefileMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getDeleteStatefileMethod = ConfigGrpc.getDeleteStatefileMethod) == null) { + ConfigGrpc.getDeleteStatefileMethod = + getDeleteStatefileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteStatefile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.DeleteStatefileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("DeleteStatefile")) + .build(); + } + } + } + return getDeleteStatefileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.LockDeploymentRequest, com.google.longrunning.Operation> + getLockDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LockDeployment", + requestType = com.google.cloud.config.v1.LockDeploymentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.LockDeploymentRequest, com.google.longrunning.Operation> + getLockDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.LockDeploymentRequest, com.google.longrunning.Operation> + getLockDeploymentMethod; + if ((getLockDeploymentMethod = ConfigGrpc.getLockDeploymentMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getLockDeploymentMethod = ConfigGrpc.getLockDeploymentMethod) == null) { + ConfigGrpc.getLockDeploymentMethod = + getLockDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LockDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.LockDeploymentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("LockDeployment")) + .build(); + } + } + } + return getLockDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.UnlockDeploymentRequest, com.google.longrunning.Operation> + getUnlockDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnlockDeployment", + requestType = com.google.cloud.config.v1.UnlockDeploymentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.UnlockDeploymentRequest, com.google.longrunning.Operation> + getUnlockDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.UnlockDeploymentRequest, com.google.longrunning.Operation> + getUnlockDeploymentMethod; + if ((getUnlockDeploymentMethod = ConfigGrpc.getUnlockDeploymentMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getUnlockDeploymentMethod = ConfigGrpc.getUnlockDeploymentMethod) == null) { + ConfigGrpc.getUnlockDeploymentMethod = + getUnlockDeploymentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnlockDeployment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.UnlockDeploymentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("UnlockDeployment")) + .build(); + } + } + } + return getUnlockDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ExportLockInfoRequest, com.google.cloud.config.v1.LockInfo> + getExportLockInfoMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportLockInfo", + requestType = com.google.cloud.config.v1.ExportLockInfoRequest.class, + responseType = com.google.cloud.config.v1.LockInfo.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ExportLockInfoRequest, com.google.cloud.config.v1.LockInfo> + getExportLockInfoMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.config.v1.ExportLockInfoRequest, com.google.cloud.config.v1.LockInfo> + getExportLockInfoMethod; + if ((getExportLockInfoMethod = ConfigGrpc.getExportLockInfoMethod) == null) { + synchronized (ConfigGrpc.class) { + if ((getExportLockInfoMethod = ConfigGrpc.getExportLockInfoMethod) == null) { + ConfigGrpc.getExportLockInfoMethod = + getExportLockInfoMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportLockInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.ExportLockInfoRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.config.v1.LockInfo.getDefaultInstance())) + .setSchemaDescriptor(new ConfigMethodDescriptorSupplier("ExportLockInfo")) + .build(); + } + } + } + return getExportLockInfoMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ConfigStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ConfigStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConfigStub(channel, callOptions); + } + }; + return ConfigStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ConfigBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ConfigBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConfigBlockingStub(channel, callOptions); + } + }; + return ConfigBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ConfigFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ConfigFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConfigFutureStub(channel, callOptions); + } + }; + return ConfigFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Infrastructure Manager is a managed service that automates the deployment and
+   * management of Google Cloud infrastructure resources.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project
+     * and location.
+     * 
+ */ + default void listDeployments( + com.google.cloud.config.v1.ListDeploymentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDeploymentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details about a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + default void getDeployment( + com.google.cloud.config.v1.GetDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + default void createDeployment( + com.google.cloud.config.v1.CreateDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + default void updateDeployment( + com.google.cloud.config.v1.UpdateDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + default void deleteDeployment( + com.google.cloud.config.v1.DeleteDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.
+     * 
+ */ + default void listRevisions( + com.google.cloud.config.v1.ListRevisionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRevisionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details about a [Revision][google.cloud.config.v1.Revision].
+     * 
+ */ + default void getRevision( + com.google.cloud.config.v1.GetRevisionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetRevisionMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details about a [Resource][google.cloud.config.v1.Resource] deployed
+     * by Infra Manager.
+     * 
+ */ + default void getResource( + com.google.cloud.config.v1.GetResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetResourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists [Resource][google.cloud.config.v1.Resource]s in a given revision.
+     * 
+ */ + default void listResources( + com.google.cloud.config.v1.ListResourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListResourcesMethod(), responseObserver); + } + + /** + * + * + *
+     * Exports Terraform state file from a given deployment.
+     * 
+ */ + default void exportDeploymentStatefile( + com.google.cloud.config.v1.ExportDeploymentStatefileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportDeploymentStatefileMethod(), responseObserver); + } + + /** + * + * + *
+     * Exports Terraform state file from a given revision.
+     * 
+ */ + default void exportRevisionStatefile( + com.google.cloud.config.v1.ExportRevisionStatefileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportRevisionStatefileMethod(), responseObserver); + } + + /** + * + * + *
+     * Imports Terraform state file in a given deployment. The state file does not
+     * take effect until the Deployment has been unlocked.
+     * 
+ */ + default void importStatefile( + com.google.cloud.config.v1.ImportStatefileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportStatefileMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes Terraform state file in a given deployment.
+     * 
+ */ + default void deleteStatefile( + com.google.cloud.config.v1.DeleteStatefileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteStatefileMethod(), responseObserver); + } + + /** + * + * + *
+     * Locks a deployment.
+     * 
+ */ + default void lockDeployment( + com.google.cloud.config.v1.LockDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getLockDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Unlocks a locked deployment.
+     * 
+ */ + default void unlockDeployment( + com.google.cloud.config.v1.UnlockDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUnlockDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Exports the lock info on a locked deployment.
+     * 
+ */ + default void exportLockInfo( + com.google.cloud.config.v1.ExportLockInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportLockInfoMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Config. + * + *
+   * Infrastructure Manager is a managed service that automates the deployment and
+   * management of Google Cloud infrastructure resources.
+   * 
+ */ + public abstract static class ConfigImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return ConfigGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Config. + * + *
+   * Infrastructure Manager is a managed service that automates the deployment and
+   * management of Google Cloud infrastructure resources.
+   * 
+ */ + public static final class ConfigStub extends io.grpc.stub.AbstractAsyncStub { + private ConfigStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ConfigStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConfigStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project
+     * and location.
+     * 
+ */ + public void listDeployments( + com.google.cloud.config.v1.ListDeploymentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDeploymentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details about a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public void getDeployment( + com.google.cloud.config.v1.GetDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public void createDeployment( + com.google.cloud.config.v1.CreateDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public void updateDeployment( + com.google.cloud.config.v1.UpdateDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public void deleteDeployment( + com.google.cloud.config.v1.DeleteDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.
+     * 
+ */ + public void listRevisions( + com.google.cloud.config.v1.ListRevisionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRevisionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details about a [Revision][google.cloud.config.v1.Revision].
+     * 
+ */ + public void getRevision( + com.google.cloud.config.v1.GetRevisionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRevisionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details about a [Resource][google.cloud.config.v1.Resource] deployed
+     * by Infra Manager.
+     * 
+ */ + public void getResource( + com.google.cloud.config.v1.GetResourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetResourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists [Resource][google.cloud.config.v1.Resource]s in a given revision.
+     * 
+ */ + public void listResources( + com.google.cloud.config.v1.ListResourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListResourcesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports Terraform state file from a given deployment.
+     * 
+ */ + public void exportDeploymentStatefile( + com.google.cloud.config.v1.ExportDeploymentStatefileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportDeploymentStatefileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports Terraform state file from a given revision.
+     * 
+ */ + public void exportRevisionStatefile( + com.google.cloud.config.v1.ExportRevisionStatefileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportRevisionStatefileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports Terraform state file in a given deployment. The state file does not
+     * take effect until the Deployment has been unlocked.
+     * 
+ */ + public void importStatefile( + com.google.cloud.config.v1.ImportStatefileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportStatefileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes Terraform state file in a given deployment.
+     * 
+ */ + public void deleteStatefile( + com.google.cloud.config.v1.DeleteStatefileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteStatefileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Locks a deployment.
+     * 
+ */ + public void lockDeployment( + com.google.cloud.config.v1.LockDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLockDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Unlocks a locked deployment.
+     * 
+ */ + public void unlockDeployment( + com.google.cloud.config.v1.UnlockDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnlockDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports the lock info on a locked deployment.
+     * 
+ */ + public void exportLockInfo( + com.google.cloud.config.v1.ExportLockInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportLockInfoMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Config. + * + *
+   * Infrastructure Manager is a managed service that automates the deployment and
+   * management of Google Cloud infrastructure resources.
+   * 
+ */ + public static final class ConfigBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ConfigBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ConfigBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConfigBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project
+     * and location.
+     * 
+ */ + public com.google.cloud.config.v1.ListDeploymentsResponse listDeployments( + com.google.cloud.config.v1.ListDeploymentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDeploymentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public com.google.cloud.config.v1.Deployment getDeployment( + com.google.cloud.config.v1.GetDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public com.google.longrunning.Operation createDeployment( + com.google.cloud.config.v1.CreateDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public com.google.longrunning.Operation updateDeployment( + com.google.cloud.config.v1.UpdateDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public com.google.longrunning.Operation deleteDeployment( + com.google.cloud.config.v1.DeleteDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.
+     * 
+ */ + public com.google.cloud.config.v1.ListRevisionsResponse listRevisions( + com.google.cloud.config.v1.ListRevisionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRevisionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a [Revision][google.cloud.config.v1.Revision].
+     * 
+ */ + public com.google.cloud.config.v1.Revision getRevision( + com.google.cloud.config.v1.GetRevisionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRevisionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a [Resource][google.cloud.config.v1.Resource] deployed
+     * by Infra Manager.
+     * 
+ */ + public com.google.cloud.config.v1.Resource getResource( + com.google.cloud.config.v1.GetResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetResourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists [Resource][google.cloud.config.v1.Resource]s in a given revision.
+     * 
+ */ + public com.google.cloud.config.v1.ListResourcesResponse listResources( + com.google.cloud.config.v1.ListResourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListResourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports Terraform state file from a given deployment.
+     * 
+ */ + public com.google.cloud.config.v1.Statefile exportDeploymentStatefile( + com.google.cloud.config.v1.ExportDeploymentStatefileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportDeploymentStatefileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports Terraform state file from a given revision.
+     * 
+ */ + public com.google.cloud.config.v1.Statefile exportRevisionStatefile( + com.google.cloud.config.v1.ExportRevisionStatefileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportRevisionStatefileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports Terraform state file in a given deployment. The state file does not
+     * take effect until the Deployment has been unlocked.
+     * 
+ */ + public com.google.cloud.config.v1.Statefile importStatefile( + com.google.cloud.config.v1.ImportStatefileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportStatefileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes Terraform state file in a given deployment.
+     * 
+ */ + public com.google.protobuf.Empty deleteStatefile( + com.google.cloud.config.v1.DeleteStatefileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteStatefileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Locks a deployment.
+     * 
+ */ + public com.google.longrunning.Operation lockDeployment( + com.google.cloud.config.v1.LockDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLockDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Unlocks a locked deployment.
+     * 
+ */ + public com.google.longrunning.Operation unlockDeployment( + com.google.cloud.config.v1.UnlockDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnlockDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports the lock info on a locked deployment.
+     * 
+ */ + public com.google.cloud.config.v1.LockInfo exportLockInfo( + com.google.cloud.config.v1.ExportLockInfoRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportLockInfoMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Config. + * + *
+   * Infrastructure Manager is a managed service that automates the deployment and
+   * management of Google Cloud infrastructure resources.
+   * 
+ */ + public static final class ConfigFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ConfigFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ConfigFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ConfigFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project
+     * and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.config.v1.ListDeploymentsResponse> + listDeployments(com.google.cloud.config.v1.ListDeploymentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDeploymentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details about a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getDeployment(com.google.cloud.config.v1.GetDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDeployment(com.google.cloud.config.v1.CreateDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDeployment(com.google.cloud.config.v1.UpdateDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a [Deployment][google.cloud.config.v1.Deployment].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDeployment(com.google.cloud.config.v1.DeleteDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists [Revision][google.cloud.config.v1.Revision]s of a deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.config.v1.ListRevisionsResponse> + listRevisions(com.google.cloud.config.v1.ListRevisionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRevisionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details about a [Revision][google.cloud.config.v1.Revision].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getRevision(com.google.cloud.config.v1.GetRevisionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRevisionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details about a [Resource][google.cloud.config.v1.Resource] deployed
+     * by Infra Manager.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getResource(com.google.cloud.config.v1.GetResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetResourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists [Resource][google.cloud.config.v1.Resource]s in a given revision.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.config.v1.ListResourcesResponse> + listResources(com.google.cloud.config.v1.ListResourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListResourcesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports Terraform state file from a given deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportDeploymentStatefile( + com.google.cloud.config.v1.ExportDeploymentStatefileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportDeploymentStatefileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports Terraform state file from a given revision.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportRevisionStatefile(com.google.cloud.config.v1.ExportRevisionStatefileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportRevisionStatefileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports Terraform state file in a given deployment. The state file does not
+     * take effect until the Deployment has been unlocked.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importStatefile(com.google.cloud.config.v1.ImportStatefileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportStatefileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes Terraform state file in a given deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteStatefile(com.google.cloud.config.v1.DeleteStatefileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteStatefileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Locks a deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + lockDeployment(com.google.cloud.config.v1.LockDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLockDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Unlocks a locked deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + unlockDeployment(com.google.cloud.config.v1.UnlockDeploymentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnlockDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports the lock info on a locked deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportLockInfo(com.google.cloud.config.v1.ExportLockInfoRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportLockInfoMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_DEPLOYMENTS = 0; + private static final int METHODID_GET_DEPLOYMENT = 1; + private static final int METHODID_CREATE_DEPLOYMENT = 2; + private static final int METHODID_UPDATE_DEPLOYMENT = 3; + private static final int METHODID_DELETE_DEPLOYMENT = 4; + private static final int METHODID_LIST_REVISIONS = 5; + private static final int METHODID_GET_REVISION = 6; + private static final int METHODID_GET_RESOURCE = 7; + private static final int METHODID_LIST_RESOURCES = 8; + private static final int METHODID_EXPORT_DEPLOYMENT_STATEFILE = 9; + private static final int METHODID_EXPORT_REVISION_STATEFILE = 10; + private static final int METHODID_IMPORT_STATEFILE = 11; + private static final int METHODID_DELETE_STATEFILE = 12; + private static final int METHODID_LOCK_DEPLOYMENT = 13; + private static final int METHODID_UNLOCK_DEPLOYMENT = 14; + private static final int METHODID_EXPORT_LOCK_INFO = 15; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_DEPLOYMENTS: + serviceImpl.listDeployments( + (com.google.cloud.config.v1.ListDeploymentsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_DEPLOYMENT: + serviceImpl.getDeployment( + (com.google.cloud.config.v1.GetDeploymentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_DEPLOYMENT: + serviceImpl.createDeployment( + (com.google.cloud.config.v1.CreateDeploymentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DEPLOYMENT: + serviceImpl.updateDeployment( + (com.google.cloud.config.v1.UpdateDeploymentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DEPLOYMENT: + serviceImpl.deleteDeployment( + (com.google.cloud.config.v1.DeleteDeploymentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_REVISIONS: + serviceImpl.listRevisions( + (com.google.cloud.config.v1.ListRevisionsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_REVISION: + serviceImpl.getRevision( + (com.google.cloud.config.v1.GetRevisionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RESOURCE: + serviceImpl.getResource( + (com.google.cloud.config.v1.GetResourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_RESOURCES: + serviceImpl.listResources( + (com.google.cloud.config.v1.ListResourcesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_EXPORT_DEPLOYMENT_STATEFILE: + serviceImpl.exportDeploymentStatefile( + (com.google.cloud.config.v1.ExportDeploymentStatefileRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_REVISION_STATEFILE: + serviceImpl.exportRevisionStatefile( + (com.google.cloud.config.v1.ExportRevisionStatefileRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_STATEFILE: + serviceImpl.importStatefile( + (com.google.cloud.config.v1.ImportStatefileRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_STATEFILE: + serviceImpl.deleteStatefile( + (com.google.cloud.config.v1.DeleteStatefileRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LOCK_DEPLOYMENT: + serviceImpl.lockDeployment( + (com.google.cloud.config.v1.LockDeploymentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLOCK_DEPLOYMENT: + serviceImpl.unlockDeployment( + (com.google.cloud.config.v1.UnlockDeploymentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_LOCK_INFO: + serviceImpl.exportLockInfo( + (com.google.cloud.config.v1.ExportLockInfoRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListDeploymentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.ListDeploymentsRequest, + com.google.cloud.config.v1.ListDeploymentsResponse>( + service, METHODID_LIST_DEPLOYMENTS))) + .addMethod( + getGetDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.GetDeploymentRequest, + com.google.cloud.config.v1.Deployment>(service, METHODID_GET_DEPLOYMENT))) + .addMethod( + getCreateDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.CreateDeploymentRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_DEPLOYMENT))) + .addMethod( + getUpdateDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.UpdateDeploymentRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_DEPLOYMENT))) + .addMethod( + getDeleteDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.DeleteDeploymentRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_DEPLOYMENT))) + .addMethod( + getListRevisionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.ListRevisionsRequest, + com.google.cloud.config.v1.ListRevisionsResponse>( + service, METHODID_LIST_REVISIONS))) + .addMethod( + getGetRevisionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.GetRevisionRequest, + com.google.cloud.config.v1.Revision>(service, METHODID_GET_REVISION))) + .addMethod( + getGetResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.GetResourceRequest, + com.google.cloud.config.v1.Resource>(service, METHODID_GET_RESOURCE))) + .addMethod( + getListResourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.ListResourcesRequest, + com.google.cloud.config.v1.ListResourcesResponse>( + service, METHODID_LIST_RESOURCES))) + .addMethod( + getExportDeploymentStatefileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.ExportDeploymentStatefileRequest, + com.google.cloud.config.v1.Statefile>( + service, METHODID_EXPORT_DEPLOYMENT_STATEFILE))) + .addMethod( + getExportRevisionStatefileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.ExportRevisionStatefileRequest, + com.google.cloud.config.v1.Statefile>( + service, METHODID_EXPORT_REVISION_STATEFILE))) + .addMethod( + getImportStatefileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.ImportStatefileRequest, + com.google.cloud.config.v1.Statefile>(service, METHODID_IMPORT_STATEFILE))) + .addMethod( + getDeleteStatefileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.DeleteStatefileRequest, com.google.protobuf.Empty>( + service, METHODID_DELETE_STATEFILE))) + .addMethod( + getLockDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.LockDeploymentRequest, + com.google.longrunning.Operation>(service, METHODID_LOCK_DEPLOYMENT))) + .addMethod( + getUnlockDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.UnlockDeploymentRequest, + com.google.longrunning.Operation>(service, METHODID_UNLOCK_DEPLOYMENT))) + .addMethod( + getExportLockInfoMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.config.v1.ExportLockInfoRequest, + com.google.cloud.config.v1.LockInfo>(service, METHODID_EXPORT_LOCK_INFO))) + .build(); + } + + private abstract static class ConfigBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ConfigBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.config.v1.ConfigProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Config"); + } + } + + private static final class ConfigFileDescriptorSupplier extends ConfigBaseDescriptorSupplier { + ConfigFileDescriptorSupplier() {} + } + + private static final class ConfigMethodDescriptorSupplier extends ConfigBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ConfigMethodDescriptorSupplier(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 (ConfigGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ConfigFileDescriptorSupplier()) + .addMethod(getListDeploymentsMethod()) + .addMethod(getGetDeploymentMethod()) + .addMethod(getCreateDeploymentMethod()) + .addMethod(getUpdateDeploymentMethod()) + .addMethod(getDeleteDeploymentMethod()) + .addMethod(getListRevisionsMethod()) + .addMethod(getGetRevisionMethod()) + .addMethod(getGetResourceMethod()) + .addMethod(getListResourcesMethod()) + .addMethod(getExportDeploymentStatefileMethod()) + .addMethod(getExportRevisionStatefileMethod()) + .addMethod(getImportStatefileMethod()) + .addMethod(getDeleteStatefileMethod()) + .addMethod(getLockDeploymentMethod()) + .addMethod(getUnlockDeploymentMethod()) + .addMethod(getExportLockInfoMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-infra-manager/owlbot.py b/java-infra-manager/owlbot.py new file mode 100644 index 000000000000..03c0f6686d3f --- /dev/null +++ b/java-infra-manager/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-infra-manager/pom.xml b/java-infra-manager/pom.xml new file mode 100644 index 000000000000..4cc8783f282e --- /dev/null +++ b/java-infra-manager/pom.xml @@ -0,0 +1,54 @@ + + + 4.0.0 + com.google.cloud + google-cloud-infra-manager-parent + pom + 0.0.1-SNAPSHOT + Google Infrastructure Manager 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-cloud-infra-manager-parent + + + + + + com.google.cloud + google-cloud-infra-manager + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-infra-manager-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-infra-manager-v1 + 0.0.1-SNAPSHOT + + + + + + google-cloud-infra-manager + grpc-google-cloud-infra-manager-v1 + proto-google-cloud-infra-manager-v1 + google-cloud-infra-manager-bom + + + diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/clirr-ignored-differences.xml b/java-infra-manager/proto-google-cloud-infra-manager-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..025dbcabec0e --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/config/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/config/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/config/v1/*OrBuilder + boolean has*(*) + + diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/pom.xml b/java-infra-manager/proto-google-cloud-infra-manager-v1/pom.xml new file mode 100644 index 000000000000..801da56ae4c3 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-infra-manager-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-infra-manager-v1 + Proto library for google-cloud-infra-manager + + com.google.cloud + google-cloud-infra-manager-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-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ApplyResults.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ApplyResults.java new file mode 100644 index 000000000000..e050ca8fef16 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ApplyResults.java @@ -0,0 +1,1173 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * Outputs and artifacts from applying a deployment.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ApplyResults} + */ +public final class ApplyResults extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ApplyResults) + ApplyResultsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplyResults.newBuilder() to construct. + private ApplyResults(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApplyResults() { + content_ = ""; + artifacts_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApplyResults(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ApplyResults_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetOutputs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ApplyResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ApplyResults.class, + com.google.cloud.config.v1.ApplyResults.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * + * + *
+   * Location of a blueprint copy and other manifests in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   * 
+ * + * string content = 1; + * + * @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; + } + } + /** + * + * + *
+   * Location of a blueprint copy and other manifests in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   * 
+ * + * string content = 1; + * + * @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 ARTIFACTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object artifacts_ = ""; + /** + * + * + *
+   * Location of artifacts (e.g. logs) in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   * 
+ * + * string artifacts = 2; + * + * @return The artifacts. + */ + @java.lang.Override + public java.lang.String getArtifacts() { + java.lang.Object ref = artifacts_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifacts_ = s; + return s; + } + } + /** + * + * + *
+   * Location of artifacts (e.g. logs) in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   * 
+ * + * string artifacts = 2; + * + * @return The bytes for artifacts. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactsBytes() { + java.lang.Object ref = artifacts_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifacts_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OUTPUTS_FIELD_NUMBER = 3; + + private static final class OutputsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.config.v1.TerraformOutput> + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ApplyResults_OutputsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.config.v1.TerraformOutput.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField + outputs_; + + private com.google.protobuf.MapField + internalGetOutputs() { + if (outputs_ == null) { + return com.google.protobuf.MapField.emptyMapField(OutputsDefaultEntryHolder.defaultEntry); + } + return outputs_; + } + + public int getOutputsCount() { + return internalGetOutputs().getMap().size(); + } + /** + * + * + *
+   * Map of output name to output info.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + @java.lang.Override + public boolean containsOutputs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOutputs().getMap().containsKey(key); + } + /** Use {@link #getOutputsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOutputs() { + return getOutputsMap(); + } + /** + * + * + *
+   * Map of output name to output info.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + @java.lang.Override + public java.util.Map + getOutputsMap() { + return internalGetOutputs().getMap(); + } + /** + * + * + *
+   * Map of output name to output info.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + @java.lang.Override + public /* nullable */ com.google.cloud.config.v1.TerraformOutput getOutputsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.config.v1.TerraformOutput defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOutputs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map of output name to output info.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformOutput getOutputsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOutputs().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(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifacts_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, artifacts_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetOutputs(), OutputsDefaultEntryHolder.defaultEntry, 3); + 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(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifacts_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, artifacts_); + } + for (java.util.Map.Entry entry : + internalGetOutputs().getMap().entrySet()) { + com.google.protobuf.MapEntry + outputs__ = + OutputsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, outputs__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ApplyResults)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ApplyResults other = (com.google.cloud.config.v1.ApplyResults) obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getArtifacts().equals(other.getArtifacts())) return false; + if (!internalGetOutputs().equals(other.internalGetOutputs())) 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_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + ARTIFACTS_FIELD_NUMBER; + hash = (53 * hash) + getArtifacts().hashCode(); + if (!internalGetOutputs().getMap().isEmpty()) { + hash = (37 * hash) + OUTPUTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetOutputs().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ApplyResults parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ApplyResults parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ApplyResults parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ApplyResults parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ApplyResults parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ApplyResults parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ApplyResults parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ApplyResults parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ApplyResults parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ApplyResults parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ApplyResults parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ApplyResults parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ApplyResults 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; + } + /** + * + * + *
+   * Outputs and artifacts from applying a deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ApplyResults} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ApplyResults) + com.google.cloud.config.v1.ApplyResultsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ApplyResults_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetOutputs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableOutputs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ApplyResults_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ApplyResults.class, + com.google.cloud.config.v1.ApplyResults.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ApplyResults.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + content_ = ""; + artifacts_ = ""; + internalGetMutableOutputs().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ApplyResults_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ApplyResults getDefaultInstanceForType() { + return com.google.cloud.config.v1.ApplyResults.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ApplyResults build() { + com.google.cloud.config.v1.ApplyResults result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ApplyResults buildPartial() { + com.google.cloud.config.v1.ApplyResults result = + new com.google.cloud.config.v1.ApplyResults(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.ApplyResults result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.artifacts_ = artifacts_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.outputs_ = internalGetOutputs(); + result.outputs_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ApplyResults) { + return mergeFrom((com.google.cloud.config.v1.ApplyResults) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ApplyResults other) { + if (other == com.google.cloud.config.v1.ApplyResults.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getArtifacts().isEmpty()) { + artifacts_ = other.artifacts_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableOutputs().mergeFrom(other.internalGetOutputs()); + bitField0_ |= 0x00000004; + 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: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + artifacts_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.config.v1.TerraformOutput> + outputs__ = + input.readMessage( + OutputsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableOutputs() + .getMutableMap() + .put(outputs__.getKey(), outputs__.getValue()); + 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 content_ = ""; + /** + * + * + *
+     * Location of a blueprint copy and other manifests in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     * 
+ * + * string content = 1; + * + * @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; + } + } + /** + * + * + *
+     * Location of a blueprint copy and other manifests in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     * 
+ * + * string content = 1; + * + * @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; + } + } + /** + * + * + *
+     * Location of a blueprint copy and other manifests in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     * 
+ * + * string content = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Location of a blueprint copy and other manifests in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     * 
+ * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Location of a blueprint copy and other manifests in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     * 
+ * + * string content = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object artifacts_ = ""; + /** + * + * + *
+     * Location of artifacts (e.g. logs) in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     * 
+ * + * string artifacts = 2; + * + * @return The artifacts. + */ + public java.lang.String getArtifacts() { + java.lang.Object ref = artifacts_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifacts_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Location of artifacts (e.g. logs) in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     * 
+ * + * string artifacts = 2; + * + * @return The bytes for artifacts. + */ + public com.google.protobuf.ByteString getArtifactsBytes() { + java.lang.Object ref = artifacts_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifacts_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Location of artifacts (e.g. logs) in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     * 
+ * + * string artifacts = 2; + * + * @param value The artifacts to set. + * @return This builder for chaining. + */ + public Builder setArtifacts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + artifacts_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Location of artifacts (e.g. logs) in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     * 
+ * + * string artifacts = 2; + * + * @return This builder for chaining. + */ + public Builder clearArtifacts() { + artifacts_ = getDefaultInstance().getArtifacts(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Location of artifacts (e.g. logs) in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     * 
+ * + * string artifacts = 2; + * + * @param value The bytes for artifacts to set. + * @return This builder for chaining. + */ + public Builder setArtifactsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + artifacts_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.TerraformOutput> + outputs_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.TerraformOutput> + internalGetOutputs() { + if (outputs_ == null) { + return com.google.protobuf.MapField.emptyMapField(OutputsDefaultEntryHolder.defaultEntry); + } + return outputs_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.TerraformOutput> + internalGetMutableOutputs() { + if (outputs_ == null) { + outputs_ = com.google.protobuf.MapField.newMapField(OutputsDefaultEntryHolder.defaultEntry); + } + if (!outputs_.isMutable()) { + outputs_ = outputs_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return outputs_; + } + + public int getOutputsCount() { + return internalGetOutputs().getMap().size(); + } + /** + * + * + *
+     * Map of output name to output info.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + @java.lang.Override + public boolean containsOutputs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOutputs().getMap().containsKey(key); + } + /** Use {@link #getOutputsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getOutputs() { + return getOutputsMap(); + } + /** + * + * + *
+     * Map of output name to output info.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + @java.lang.Override + public java.util.Map + getOutputsMap() { + return internalGetOutputs().getMap(); + } + /** + * + * + *
+     * Map of output name to output info.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + @java.lang.Override + public /* nullable */ com.google.cloud.config.v1.TerraformOutput getOutputsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.config.v1.TerraformOutput defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOutputs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map of output name to output info.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformOutput getOutputsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOutputs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearOutputs() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableOutputs().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map of output name to output info.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + public Builder removeOutputs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableOutputs().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableOutputs() { + bitField0_ |= 0x00000004; + return internalGetMutableOutputs().getMutableMap(); + } + /** + * + * + *
+     * Map of output name to output info.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + public Builder putOutputs( + java.lang.String key, com.google.cloud.config.v1.TerraformOutput value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableOutputs().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * Map of output name to output info.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + public Builder putAllOutputs( + java.util.Map values) { + internalGetMutableOutputs().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ApplyResults) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ApplyResults) + private static final com.google.cloud.config.v1.ApplyResults DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ApplyResults(); + } + + public static com.google.cloud.config.v1.ApplyResults getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplyResults parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ApplyResults getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ApplyResultsOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ApplyResultsOrBuilder.java new file mode 100644 index 000000000000..878eaafe7ee2 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ApplyResultsOrBuilder.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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ApplyResultsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ApplyResults) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Location of a blueprint copy and other manifests in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   * 
+ * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * Location of a blueprint copy and other manifests in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   * 
+ * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * Location of artifacts (e.g. logs) in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   * 
+ * + * string artifacts = 2; + * + * @return The artifacts. + */ + java.lang.String getArtifacts(); + /** + * + * + *
+   * Location of artifacts (e.g. logs) in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   * 
+ * + * string artifacts = 2; + * + * @return The bytes for artifacts. + */ + com.google.protobuf.ByteString getArtifactsBytes(); + + /** + * + * + *
+   * Map of output name to output info.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + int getOutputsCount(); + /** + * + * + *
+   * Map of output name to output info.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + boolean containsOutputs(java.lang.String key); + /** Use {@link #getOutputsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getOutputs(); + /** + * + * + *
+   * Map of output name to output info.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + java.util.Map getOutputsMap(); + /** + * + * + *
+   * Map of output name to output info.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + /* nullable */ + com.google.cloud.config.v1.TerraformOutput getOutputsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.config.v1.TerraformOutput defaultValue); + /** + * + * + *
+   * Map of output name to output info.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformOutput> outputs = 3; + */ + com.google.cloud.config.v1.TerraformOutput getOutputsOrThrow(java.lang.String key); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ConfigProto.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ConfigProto.java new file mode 100644 index 000000000000..bfcbd6947e39 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ConfigProto.java @@ -0,0 +1,892 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public final class ConfigProto { + private ConfigProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_Deployment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_Deployment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_Deployment_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_Deployment_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_TerraformBlueprint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_TerraformBlueprint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_TerraformBlueprint_InputValuesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_TerraformBlueprint_InputValuesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_TerraformVariable_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_TerraformVariable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ApplyResults_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ApplyResults_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ApplyResults_OutputsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ApplyResults_OutputsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_TerraformOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_TerraformOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ListDeploymentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ListDeploymentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ListDeploymentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ListDeploymentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_GetDeploymentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_GetDeploymentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ListRevisionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ListRevisionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ListRevisionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ListRevisionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_GetRevisionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_GetRevisionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_CreateDeploymentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_CreateDeploymentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_UpdateDeploymentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_UpdateDeploymentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_DeleteDeploymentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_DeleteDeploymentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_Revision_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_Revision_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_TerraformError_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_TerraformError_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_GitSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_GitSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_DeploymentOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_DeploymentOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_Resource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_Resource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_Resource_CaiAssetsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_Resource_CaiAssetsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ResourceTerraformInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ResourceTerraformInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ResourceCAIInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ResourceCAIInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_GetResourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_GetResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ListResourcesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ListResourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ListResourcesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ListResourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_Statefile_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_Statefile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ExportDeploymentStatefileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ExportDeploymentStatefileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ExportRevisionStatefileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ExportRevisionStatefileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ImportStatefileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ImportStatefileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_DeleteStatefileRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_DeleteStatefileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_LockDeploymentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_LockDeploymentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_UnlockDeploymentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_UnlockDeploymentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_ExportLockInfoRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_ExportLockInfoRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_config_v1_LockInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_config_v1_LockInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n#google/cloud/config/v1/config.proto\022\026g" + + "oogle.cloud.config.v1\032\034google/api/annota" + + "tions.proto\032\027google/api/client.proto\032\037go" + + "ogle/api/field_behavior.proto\032\031google/ap" + + "i/resource.proto\032#google/longrunning/ope" + + "rations.proto\032\033google/protobuf/empty.pro" + + "to\032 google/protobuf/field_mask.proto\032\034go" + + "ogle/protobuf/struct.proto\032\037google/proto" + + "buf/timestamp.proto\032\027google/rpc/status.p" + + "roto\"\270\r\n\nDeployment\022I\n\023terraform_bluepri" + + "nt\030\006 \001(\0132*.google.cloud.config.v1.Terraf" + + "ormBlueprintH\000\022\014\n\004name\030\001 \001(\t\0225\n\013create_t" + + "ime\030\002 \001(\0132\032.google.protobuf.TimestampB\004\342" + + "A\001\003\0225\n\013update_time\030\003 \001(\0132\032.google.protob" + + "uf.TimestampB\004\342A\001\003\022>\n\006labels\030\004 \003(\0132..goo" + + "gle.cloud.config.v1.Deployment.LabelsEnt" + + "ry\022=\n\005state\030\005 \001(\0162(.google.cloud.config." + + "v1.Deployment.StateB\004\342A\001\003\022\035\n\017latest_revi" + + "sion\030\007 \001(\tB\004\342A\001\003\022\032\n\014state_detail\030\t \001(\tB\004" + + "\342A\001\003\022F\n\nerror_code\030\n \001(\0162,.google.cloud." + + "config.v1.Deployment.ErrorCodeB\004\342A\001\003\022B\n\016" + + "delete_results\030\010 \001(\0132$.google.cloud.conf" + + "ig.v1.ApplyResultsB\004\342A\001\003\022\032\n\014delete_build" + + "\030\013 \001(\tB\004\342A\001\003\022\031\n\013delete_logs\030\014 \001(\tB\004\342A\001\003\022" + + "?\n\ttf_errors\030\r \003(\0132&.google.cloud.config" + + ".v1.TerraformErrorB\004\342A\001\003\022\030\n\nerror_logs\030\016" + + " \001(\tB\004\342A\001\003\022\'\n\024artifacts_gcs_bucket\030\017 \001(\t" + + "B\004\342A\001\001H\001\210\001\001\022H\n\017service_account\030\020 \001(\tB*\342A" + + "\001\001\372A#\n!iam.googleapis.com/ServiceAccount" + + "H\002\210\001\001\022&\n\031import_existing_resources\030\021 \001(\010" + + "H\003\210\001\001\022G\n\013worker_pool\030\023 \001(\tB-\342A\001\001\372A&\n$clo" + + "udbuild.googleapis.com/WorkerPoolH\004\210\001\001\022F" + + "\n\nlock_state\030\024 \001(\0162,.google.cloud.config" + + ".v1.Deployment.LockStateB\004\342A\001\003\032-\n\013Labels" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"|\n" + + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATIN" + + "G\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010UPDATING\020\003\022\014\n\010DELETIN" + + "G\020\004\022\n\n\006FAILED\020\005\022\r\n\tSUSPENDED\020\006\022\013\n\007DELETE" + + "D\020\007\"\334\001\n\tErrorCode\022\032\n\026ERROR_CODE_UNSPECIF" + + "IED\020\000\022\023\n\017REVISION_FAILED\020\001\022!\n\035CLOUD_BUIL" + + "D_PERMISSION_DENIED\020\003\022\033\n\027DELETE_BUILD_AP" + + "I_FAILED\020\005\022\033\n\027DELETE_BUILD_RUN_FAILED\020\006\022" + + "%\n!BUCKET_CREATION_PERMISSION_DENIED\020\007\022\032" + + "\n\026BUCKET_CREATION_FAILED\020\010\"\201\001\n\tLockState" + + "\022\032\n\026LOCK_STATE_UNSPECIFIED\020\000\022\n\n\006LOCKED\020\001" + + "\022\014\n\010UNLOCKED\020\002\022\013\n\007LOCKING\020\003\022\r\n\tUNLOCKING" + + "\020\004\022\017\n\013LOCK_FAILED\020\005\022\021\n\rUNLOCK_FAILED\020\006:g" + + "\352Ad\n config.googleapis.com/Deployment\022@p" + + "rojects/{project}/locations/{location}/d" + + "eployments/{deployment}B\013\n\tblueprintB\027\n\025" + + "_artifacts_gcs_bucketB\022\n\020_service_accoun" + + "tB\034\n\032_import_existing_resourcesB\016\n\014_work" + + "er_pool\"\253\002\n\022TerraformBlueprint\022\032\n\ngcs_so" + + "urce\030\001 \001(\tB\004\342A\001\002H\000\022=\n\ngit_source\030\002 \001(\0132!" + + ".google.cloud.config.v1.GitSourceB\004\342A\001\002H" + + "\000\022Q\n\014input_values\030\004 \003(\0132;.google.cloud.c" + + "onfig.v1.TerraformBlueprint.InputValuesE" + + "ntry\032]\n\020InputValuesEntry\022\013\n\003key\030\001 \001(\t\0228\n" + + "\005value\030\002 \001(\0132).google.cloud.config.v1.Te" + + "rraformVariable:\0028\001B\010\n\006source\"@\n\021Terrafo" + + "rmVariable\022+\n\013input_value\030\005 \001(\0132\026.google" + + ".protobuf.Value\"\317\001\n\014ApplyResults\022\017\n\007cont" + + "ent\030\001 \001(\t\022\021\n\tartifacts\030\002 \001(\t\022B\n\007outputs\030" + + "\003 \003(\01321.google.cloud.config.v1.ApplyResu" + + "lts.OutputsEntry\032W\n\014OutputsEntry\022\013\n\003key\030" + + "\001 \001(\t\0226\n\005value\030\002 \001(\0132\'.google.cloud.conf" + + "ig.v1.TerraformOutput:\0028\001\"K\n\017TerraformOu" + + "tput\022\021\n\tsensitive\030\001 \001(\010\022%\n\005value\030\002 \001(\0132\026" + + ".google.protobuf.Value\"\235\001\n\026ListDeploymen" + + "tsRequest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\n!loca" + + "tions.googleapis.com/Location\022\021\n\tpage_si" + + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004" + + " \001(\t\022\020\n\010order_by\030\005 \001(\t\"\200\001\n\027ListDeploymen" + + "tsResponse\0227\n\013deployments\030\001 \003(\0132\".google" + + ".cloud.config.v1.Deployment\022\027\n\017next_page" + + "_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"O\n\024Get" + + "DeploymentRequest\0227\n\004name\030\001 \001(\tB)\342A\001\002\372A\"" + + "\n config.googleapis.com/Deployment\"\232\001\n\024L" + + "istRevisionsRequest\0229\n\006parent\030\001 \001(\tB)\342A\001" + + "\002\372A\"\n config.googleapis.com/Deployment\022\021" + + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n" + + "\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"z\n\025ListR" + + "evisionsResponse\0223\n\trevisions\030\001 \003(\0132 .go" + + "ogle.cloud.config.v1.Revision\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"K\n\022G" + + "etRevisionRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A " + + "\n\036config.googleapis.com/Revision\"\312\001\n\027Cre" + + "ateDeploymentRequest\022:\n\006parent\030\001 \001(\tB*\342A" + + "\001\002\372A#\n!locations.googleapis.com/Location" + + "\022\033\n\rdeployment_id\030\002 \001(\tB\004\342A\001\002\022<\n\ndeploym" + + "ent\030\003 \001(\0132\".google.cloud.config.v1.Deplo" + + "ymentB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\250\001" + + "\n\027UpdateDeploymentRequest\0225\n\013update_mask" + + "\030\001 \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\001" + + "\022<\n\ndeployment\030\002 \001(\0132\".google.cloud.conf" + + "ig.v1.DeploymentB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001" + + "(\tB\004\342A\001\001\"\244\002\n\027DeleteDeploymentRequest\0227\n\004" + + "name\030\001 \001(\tB)\342A\001\002\372A\"\n config.googleapis.c" + + "om/Deployment\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\022" + + "\023\n\005force\030\003 \001(\010B\004\342A\001\001\022Y\n\rdelete_policy\030\004 " + + "\001(\0162<.google.cloud.config.v1.DeleteDeplo" + + "ymentRequest.DeletePolicyB\004\342A\001\001\"F\n\014Delet" + + "ePolicy\022\035\n\031DELETE_POLICY_UNSPECIFIED\020\000\022\n" + + "\n\006DELETE\020\001\022\013\n\007ABANDON\020\002\"\366\002\n\021OperationMet" + + "adata\022X\n\023deployment_metadata\030\010 \001(\01323.goo" + + "gle.cloud.config.v1.DeploymentOperationM" + + "etadataB\004\342A\001\003H\000\0225\n\013create_time\030\001 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\004\342A\001\003\0222\n\010end_ti" + + "me\030\002 \001(\0132\032.google.protobuf.TimestampB\004\342A" + + "\001\003\022\024\n\006target\030\003 \001(\tB\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004" + + "\342A\001\003\022\034\n\016status_message\030\005 \001(\tB\004\342A\001\003\022$\n\026re" + + "quested_cancellation\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_" + + "version\030\007 \001(\tB\004\342A\001\003B\023\n\021resource_metadata" + + "\"\311\t\n\010Revision\022O\n\023terraform_blueprint\030\006 \001" + + "(\0132*.google.cloud.config.v1.TerraformBlu" + + "eprintB\004\342A\001\003H\000\022\014\n\004name\030\001 \001(\t\0225\n\013create_t" + + "ime\030\002 \001(\0132\032.google.protobuf.TimestampB\004\342" + + "A\001\003\0225\n\013update_time\030\003 \001(\0132\032.google.protob" + + "uf.TimestampB\004\342A\001\003\022=\n\006action\030\004 \001(\0162\'.goo" + + "gle.cloud.config.v1.Revision.ActionB\004\342A\001" + + "\003\022;\n\005state\030\005 \001(\0162&.google.cloud.config.v" + + "1.Revision.StateB\004\342A\001\003\022A\n\rapply_results\030" + + "\007 \001(\0132$.google.cloud.config.v1.ApplyResu" + + "ltsB\004\342A\001\003\022\032\n\014state_detail\030\010 \001(\tB\004\342A\001\003\022D\n" + + "\nerror_code\030\t \001(\0162*.google.cloud.config." + + "v1.Revision.ErrorCodeB\004\342A\001\003\022\023\n\005build\030\n \001" + + "(\tB\004\342A\001\003\022\022\n\004logs\030\013 \001(\tB\004\342A\001\003\022?\n\ttf_error" + + "s\030\014 \003(\0132&.google.cloud.config.v1.Terrafo" + + "rmErrorB\004\342A\001\003\022\030\n\nerror_logs\030\r \001(\tB\004\342A\001\003\022" + + "C\n\017service_account\030\016 \001(\tB*\342A\001\003\372A#\n!iam.g" + + "oogleapis.com/ServiceAccount\022\'\n\031import_e" + + "xisting_resources\030\017 \001(\010B\004\342A\001\003\022B\n\013worker_" + + "pool\030\021 \001(\tB-\342A\001\003\372A&\n$cloudbuild.googleap" + + "is.com/WorkerPool\"D\n\006Action\022\026\n\022ACTION_UN" + + "SPECIFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006UPDATE\020\002\022\n\n\006D" + + "ELETE\020\003\"E\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022" + + "\014\n\010APPLYING\020\001\022\013\n\007APPLIED\020\002\022\n\n\006FAILED\020\003\"\202" + + "\001\n\tErrorCode\022\032\n\026ERROR_CODE_UNSPECIFIED\020\000" + + "\022!\n\035CLOUD_BUILD_PERMISSION_DENIED\020\001\022\032\n\026A" + + "PPLY_BUILD_API_FAILED\020\004\022\032\n\026APPLY_BUILD_R" + + "UN_FAILED\020\005:z\352Aw\n\036config.googleapis.com/" + + "Revision\022Uprojects/{project}/locations/{" + + "location}/deployments/{deployment}/revis" + + "ions/{revision}B\013\n\tblueprint\"\204\001\n\016Terrafo" + + "rmError\022\030\n\020resource_address\030\001 \001(\t\022\032\n\022htt" + + "p_response_code\030\002 \001(\005\022\031\n\021error_descripti" + + "on\030\003 \001(\t\022!\n\005error\030\004 \001(\0132\022.google.rpc.Sta" + + "tus\"y\n\tGitSource\022\027\n\004repo\030\001 \001(\tB\004\342A\001\001H\000\210\001" + + "\001\022\034\n\tdirectory\030\002 \001(\tB\004\342A\001\001H\001\210\001\001\022\026\n\003ref\030\003" + + " \001(\tB\004\342A\001\001H\002\210\001\001B\007\n\005_repoB\014\n\n_directoryB\006" + + "\n\004_ref\"\350\003\n\033DeploymentOperationMetadata\022P" + + "\n\004step\030\001 \001(\0162B.google.cloud.config.v1.De" + + "ploymentOperationMetadata.DeploymentStep" + + "\022;\n\rapply_results\030\002 \001(\0132$.google.cloud.c" + + "onfig.v1.ApplyResults\022\023\n\005build\030\003 \001(\tB\004\342A" + + "\001\003\022\022\n\004logs\030\004 \001(\tB\004\342A\001\003\"\220\002\n\016DeploymentSte" + + "p\022\037\n\033DEPLOYMENT_STEP_UNSPECIFIED\020\000\022\034\n\030PR" + + "EPARING_STORAGE_BUCKET\020\001\022\031\n\025DOWNLOADING_" + + "BLUEPRINT\020\002\022\023\n\017RUNNING_TF_INIT\020\003\022\023\n\017RUNN" + + "ING_TF_PLAN\020\004\022\024\n\020RUNNING_TF_APPLY\020\005\022\026\n\022R" + + "UNNING_TF_DESTROY\020\006\022\027\n\023RUNNING_TF_VALIDA" + + "TE\020\007\022\030\n\024UNLOCKING_DEPLOYMENT\020\010\022\r\n\tSUCCEE" + + "DED\020\t\022\n\n\006FAILED\020\n\"\335\005\n\010Resource\022\022\n\004name\030\001" + + " \001(\tB\004\342A\001\003\022K\n\016terraform_info\030\002 \001(\0132-.goo" + + "gle.cloud.config.v1.ResourceTerraformInf" + + "oB\004\342A\001\003\022I\n\ncai_assets\030\003 \003(\0132/.google.clo" + + "ud.config.v1.Resource.CaiAssetsEntryB\004\342A" + + "\001\003\022=\n\006intent\030\004 \001(\0162\'.google.cloud.config" + + ".v1.Resource.IntentB\004\342A\001\003\022;\n\005state\030\005 \001(\016" + + "2&.google.cloud.config.v1.Resource.State" + + "B\004\342A\001\003\032Y\n\016CaiAssetsEntry\022\013\n\003key\030\001 \001(\t\0226\n" + + "\005value\030\002 \001(\0132\'.google.cloud.config.v1.Re" + + "sourceCAIInfo:\0028\001\"a\n\006Intent\022\026\n\022INTENT_UN" + + "SPECIFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006UPDATE\020\002\022\n\n\006D" + + "ELETE\020\003\022\014\n\010RECREATE\020\004\022\r\n\tUNCHANGED\020\005\"X\n\005" + + "State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007PLANNED\020" + + "\001\022\017\n\013IN_PROGRESS\020\002\022\016\n\nRECONCILED\020\003\022\n\n\006FA" + + "ILED\020\004:\220\001\352A\214\001\n\036config.googleapis.com/Res" + + "ource\022jprojects/{project}/locations/{loc" + + "ation}/deployments/{deployment}/revision" + + "s/{revision}/resources/{resource}\"B\n\025Res" + + "ourceTerraformInfo\022\017\n\007address\030\001 \001(\t\022\014\n\004t" + + "ype\030\002 \001(\t\022\n\n\002id\030\003 \001(\t\"-\n\017ResourceCAIInfo" + + "\022\032\n\022full_resource_name\030\001 \001(\t\"K\n\022GetResou" + + "rceRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036confi" + + "g.googleapis.com/Resource\"\230\001\n\024ListResour" + + "cesRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \n\036con" + + "fig.googleapis.com/Revision\022\021\n\tpage_size" + + "\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001" + + "(\t\022\020\n\010order_by\030\005 \001(\t\"z\n\025ListResourcesRes" + + "ponse\0223\n\tresources\030\001 \003(\0132 .google.cloud." + + "config.v1.Resource\022\027\n\017next_page_token\030\002 " + + "\001(\t\022\023\n\013unreachable\030\003 \003(\t\"%\n\tStatefile\022\030\n" + + "\nsigned_uri\030\001 \001(\tB\004\342A\001\003\"r\n ExportDeploym" + + "entStatefileRequest\0229\n\006parent\030\001 \001(\tB)\342A\001" + + "\002\372A\"\n config.googleapis.com/Deployment\022\023" + + "\n\005draft\030\003 \001(\010B\004\342A\001\001\"Y\n\036ExportRevisionSta" + + "tefileRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \n\036" + + "config.googleapis.com/Revision\"\204\001\n\026Impor" + + "tStatefileRequest\0229\n\006parent\030\001 \001(\tB)\342A\001\002\372" + + "A\"\n config.googleapis.com/Deployment\022\025\n\007" + + "lock_id\030\002 \001(\003B\004\342A\001\002\022\030\n\nskip_draft\030\003 \001(\010B" + + "\004\342A\001\001\"h\n\026DeleteStatefileRequest\0227\n\004name\030" + + "\001 \001(\tB)\342A\001\002\372A\"\n config.googleapis.com/De" + + "ployment\022\025\n\007lock_id\030\002 \001(\003B\004\342A\001\002\"P\n\025LockD" + + "eploymentRequest\0227\n\004name\030\001 \001(\tB)\342A\001\002\372A\"\n" + + " config.googleapis.com/Deployment\"i\n\027Unl" + + "ockDeploymentRequest\0227\n\004name\030\001 \001(\tB)\342A\001\002" + + "\372A\"\n config.googleapis.com/Deployment\022\025\n" + + "\007lock_id\030\002 \001(\003B\004\342A\001\002\"P\n\025ExportLockInfoRe" + + "quest\0227\n\004name\030\001 \001(\tB)\342A\001\002\372A\"\n config.goo" + + "gleapis.com/Deployment\"\213\001\n\010LockInfo\022\017\n\007l" + + "ock_id\030\001 \001(\003\022\021\n\toperation\030\002 \001(\t\022\014\n\004info\030" + + "\003 \001(\t\022\013\n\003who\030\004 \001(\t\022\017\n\007version\030\005 \001(\t\022/\n\013c" + + "reate_time\030\006 \001(\0132\032.google.protobuf.Times" + + "tamp2\215\031\n\006Config\022\264\001\n\017ListDeployments\022..go" + + "ogle.cloud.config.v1.ListDeploymentsRequ" + + "est\032/.google.cloud.config.v1.ListDeploym" + + "entsResponse\"@\332A\006parent\202\323\344\223\0021\022//v1/{pare" + + "nt=projects/*/locations/*}/deployments\022\241" + + "\001\n\rGetDeployment\022,.google.cloud.config.v" + + "1.GetDeploymentRequest\032\".google.cloud.co" + + "nfig.v1.Deployment\">\332A\004name\202\323\344\223\0021\022//v1/{" + + "name=projects/*/locations/*/deployments/" + + "*}\022\354\001\n\020CreateDeployment\022/.google.cloud.c" + + "onfig.v1.CreateDeploymentRequest\032\035.googl" + + "e.longrunning.Operation\"\207\001\312A\037\n\nDeploymen" + + "t\022\021OperationMetadata\332A\037parent,deployment" + + ",deployment_id\202\323\344\223\002=\"//v1/{parent=projec" + + "ts/*/locations/*}/deployments:\ndeploymen" + + "t\022\356\001\n\020UpdateDeployment\022/.google.cloud.co" + + "nfig.v1.UpdateDeploymentRequest\032\035.google" + + ".longrunning.Operation\"\211\001\312A\037\n\nDeployment" + + "\022\021OperationMetadata\332A\026deployment,update_" + + "mask\202\323\344\223\002H2:/v1/{deployment.name=project" + + "s/*/locations/*/deployments/*}:\ndeployme" + + "nt\022\304\001\n\020DeleteDeployment\022/.google.cloud.c" + + "onfig.v1.DeleteDeploymentRequest\032\035.googl" + + "e.longrunning.Operation\"`\312A\037\n\nDeployment" + + "\022\021OperationMetadata\332A\004name\202\323\344\223\0021*//v1/{n" + + "ame=projects/*/locations/*/deployments/*" + + "}\022\272\001\n\rListRevisions\022,.google.cloud.confi" + + "g.v1.ListRevisionsRequest\032-.google.cloud" + + ".config.v1.ListRevisionsResponse\"L\332A\006par" + + "ent\202\323\344\223\002=\022;/v1/{parent=projects/*/locati" + + "ons/*/deployments/*}/revisions\022\247\001\n\013GetRe" + + "vision\022*.google.cloud.config.v1.GetRevis" + + "ionRequest\032 .google.cloud.config.v1.Revi" + + "sion\"J\332A\004name\202\323\344\223\002=\022;/v1/{name=projects/" + + "*/locations/*/deployments/*/revisions/*}" + + "\022\263\001\n\013GetResource\022*.google.cloud.config.v" + + "1.GetResourceRequest\032 .google.cloud.conf" + + "ig.v1.Resource\"V\332A\004name\202\323\344\223\002I\022G/v1/{name" + + "=projects/*/locations/*/deployments/*/re" + + "visions/*/resources/*}\022\306\001\n\rListResources" + + "\022,.google.cloud.config.v1.ListResourcesR" + + "equest\032-.google.cloud.config.v1.ListReso" + + "urcesResponse\"X\332A\006parent\202\323\344\223\002I\022G/v1/{par" + + "ent=projects/*/locations/*/deployments/*" + + "/revisions/*}/resources\022\302\001\n\031ExportDeploy" + + "mentStatefile\0228.google.cloud.config.v1.E" + + "xportDeploymentStatefileRequest\032!.google" + + ".cloud.config.v1.Statefile\"H\202\323\344\223\002B\"=/v1/" + + "{parent=projects/*/locations/*/deploymen" + + "ts/*}:exportState:\001*\022\312\001\n\027ExportRevisionS" + + "tatefile\0226.google.cloud.config.v1.Export" + + "RevisionStatefileRequest\032!.google.cloud." + + "config.v1.Statefile\"T\202\323\344\223\002N\"I/v1/{parent" + + "=projects/*/locations/*/deployments/*/re" + + "visions/*}:exportState:\001*\022\277\001\n\017ImportStat" + + "efile\022..google.cloud.config.v1.ImportSta" + + "tefileRequest\032!.google.cloud.config.v1.S" + + "tatefile\"Y\332A\016parent,lock_id\202\323\344\223\002B\"=/v1/{" + + "parent=projects/*/locations/*/deployment" + + "s/*}:importState:\001*\022\250\001\n\017DeleteStatefile\022" + + "..google.cloud.config.v1.DeleteStatefile" + + "Request\032\026.google.protobuf.Empty\"M\332A\004name" + + "\202\323\344\223\002@\";/v1/{name=projects/*/locations/*" + + "/deployments/*}:deleteState:\001*\022\310\001\n\016LockD" + + "eployment\022-.google.cloud.config.v1.LockD" + + "eploymentRequest\032\035.google.longrunning.Op" + + "eration\"h\312A\037\n\nDeployment\022\021OperationMetad" + + "ata\332A\004name\202\323\344\223\0029\"4/v1/{name=projects/*/l" + + "ocations/*/deployments/*}:lock:\001*\022\326\001\n\020Un" + + "lockDeployment\022/.google.cloud.config.v1." + + "UnlockDeploymentRequest\032\035.google.longrun" + + "ning.Operation\"r\312A\037\n\nDeployment\022\021Operati" + + "onMetadata\332A\014name,lock_id\202\323\344\223\002;\"6/v1/{na" + + "me=projects/*/locations/*/deployments/*}" + + ":unlock:\001*\022\254\001\n\016ExportLockInfo\022-.google.c" + + "loud.config.v1.ExportLockInfoRequest\032 .g" + + "oogle.cloud.config.v1.LockInfo\"I\332A\004name\202" + + "\323\344\223\002<\022:/v1/{name=projects/*/locations/*/" + + "deployments/*}:exportLock\032I\312A\025config.goo" + + "gleapis.com\322A.https://www.googleapis.com" + + "/auth/cloud-platformB\365\002\n\032com.google.clou" + + "d.config.v1B\013ConfigProtoP\001Z2cloud.google" + + ".com/go/config/apiv1/configpb;configpb\252\002" + + "\026Google.Cloud.Config.V1\312\002\026Google\\Cloud\\C" + + "onfig\\V1\352\002\031Google::Cloud::Config::V1\352AY\n" + + "!iam.googleapis.com/ServiceAccount\0224proj" + + "ects/{project}/serviceAccounts/{service_" + + "account}\352Ai\n$cloudbuild.googleapis.com/W" + + "orkerPool\022Aprojects/{project}/locations/" + + "{location}/workerPools/{worker_pool}b\006pr" + + "oto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_config_v1_Deployment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_config_v1_Deployment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_Deployment_descriptor, + new java.lang.String[] { + "TerraformBlueprint", + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "State", + "LatestRevision", + "StateDetail", + "ErrorCode", + "DeleteResults", + "DeleteBuild", + "DeleteLogs", + "TfErrors", + "ErrorLogs", + "ArtifactsGcsBucket", + "ServiceAccount", + "ImportExistingResources", + "WorkerPool", + "LockState", + "Blueprint", + "ArtifactsGcsBucket", + "ServiceAccount", + "ImportExistingResources", + "WorkerPool", + }); + internal_static_google_cloud_config_v1_Deployment_LabelsEntry_descriptor = + internal_static_google_cloud_config_v1_Deployment_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_config_v1_Deployment_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_Deployment_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_config_v1_TerraformBlueprint_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_config_v1_TerraformBlueprint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_TerraformBlueprint_descriptor, + new java.lang.String[] { + "GcsSource", "GitSource", "InputValues", "Source", + }); + internal_static_google_cloud_config_v1_TerraformBlueprint_InputValuesEntry_descriptor = + internal_static_google_cloud_config_v1_TerraformBlueprint_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_config_v1_TerraformBlueprint_InputValuesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_TerraformBlueprint_InputValuesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_config_v1_TerraformVariable_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_config_v1_TerraformVariable_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_TerraformVariable_descriptor, + new java.lang.String[] { + "InputValue", + }); + internal_static_google_cloud_config_v1_ApplyResults_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_config_v1_ApplyResults_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ApplyResults_descriptor, + new java.lang.String[] { + "Content", "Artifacts", "Outputs", + }); + internal_static_google_cloud_config_v1_ApplyResults_OutputsEntry_descriptor = + internal_static_google_cloud_config_v1_ApplyResults_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_config_v1_ApplyResults_OutputsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ApplyResults_OutputsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_config_v1_TerraformOutput_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_config_v1_TerraformOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_TerraformOutput_descriptor, + new java.lang.String[] { + "Sensitive", "Value", + }); + internal_static_google_cloud_config_v1_ListDeploymentsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_config_v1_ListDeploymentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ListDeploymentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_config_v1_ListDeploymentsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_config_v1_ListDeploymentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ListDeploymentsResponse_descriptor, + new java.lang.String[] { + "Deployments", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_config_v1_GetDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_config_v1_GetDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_GetDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_config_v1_ListRevisionsRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_config_v1_ListRevisionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ListRevisionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_config_v1_ListRevisionsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_config_v1_ListRevisionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ListRevisionsResponse_descriptor, + new java.lang.String[] { + "Revisions", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_config_v1_GetRevisionRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_config_v1_GetRevisionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_GetRevisionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_config_v1_CreateDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_config_v1_CreateDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_CreateDeploymentRequest_descriptor, + new java.lang.String[] { + "Parent", "DeploymentId", "Deployment", "RequestId", + }); + internal_static_google_cloud_config_v1_UpdateDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_config_v1_UpdateDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_UpdateDeploymentRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Deployment", "RequestId", + }); + internal_static_google_cloud_config_v1_DeleteDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_config_v1_DeleteDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_DeleteDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Force", "DeletePolicy", + }); + internal_static_google_cloud_config_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_config_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "DeploymentMetadata", + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + "ResourceMetadata", + }); + internal_static_google_cloud_config_v1_Revision_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_config_v1_Revision_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_Revision_descriptor, + new java.lang.String[] { + "TerraformBlueprint", + "Name", + "CreateTime", + "UpdateTime", + "Action", + "State", + "ApplyResults", + "StateDetail", + "ErrorCode", + "Build", + "Logs", + "TfErrors", + "ErrorLogs", + "ServiceAccount", + "ImportExistingResources", + "WorkerPool", + "Blueprint", + }); + internal_static_google_cloud_config_v1_TerraformError_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_config_v1_TerraformError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_TerraformError_descriptor, + new java.lang.String[] { + "ResourceAddress", "HttpResponseCode", "ErrorDescription", "Error", + }); + internal_static_google_cloud_config_v1_GitSource_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_config_v1_GitSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_GitSource_descriptor, + new java.lang.String[] { + "Repo", "Directory", "Ref", "Repo", "Directory", "Ref", + }); + internal_static_google_cloud_config_v1_DeploymentOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_config_v1_DeploymentOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_DeploymentOperationMetadata_descriptor, + new java.lang.String[] { + "Step", "ApplyResults", "Build", "Logs", + }); + internal_static_google_cloud_config_v1_Resource_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_config_v1_Resource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_Resource_descriptor, + new java.lang.String[] { + "Name", "TerraformInfo", "CaiAssets", "Intent", "State", + }); + internal_static_google_cloud_config_v1_Resource_CaiAssetsEntry_descriptor = + internal_static_google_cloud_config_v1_Resource_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_config_v1_Resource_CaiAssetsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_Resource_CaiAssetsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_config_v1_ResourceTerraformInfo_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_config_v1_ResourceTerraformInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ResourceTerraformInfo_descriptor, + new java.lang.String[] { + "Address", "Type", "Id", + }); + internal_static_google_cloud_config_v1_ResourceCAIInfo_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_config_v1_ResourceCAIInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ResourceCAIInfo_descriptor, + new java.lang.String[] { + "FullResourceName", + }); + internal_static_google_cloud_config_v1_GetResourceRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_config_v1_GetResourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_GetResourceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_config_v1_ListResourcesRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_config_v1_ListResourcesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ListResourcesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_config_v1_ListResourcesResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_config_v1_ListResourcesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ListResourcesResponse_descriptor, + new java.lang.String[] { + "Resources", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_config_v1_Statefile_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_config_v1_Statefile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_Statefile_descriptor, + new java.lang.String[] { + "SignedUri", + }); + internal_static_google_cloud_config_v1_ExportDeploymentStatefileRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_config_v1_ExportDeploymentStatefileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ExportDeploymentStatefileRequest_descriptor, + new java.lang.String[] { + "Parent", "Draft", + }); + internal_static_google_cloud_config_v1_ExportRevisionStatefileRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_config_v1_ExportRevisionStatefileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ExportRevisionStatefileRequest_descriptor, + new java.lang.String[] { + "Parent", + }); + internal_static_google_cloud_config_v1_ImportStatefileRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_config_v1_ImportStatefileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ImportStatefileRequest_descriptor, + new java.lang.String[] { + "Parent", "LockId", "SkipDraft", + }); + internal_static_google_cloud_config_v1_DeleteStatefileRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_config_v1_DeleteStatefileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_DeleteStatefileRequest_descriptor, + new java.lang.String[] { + "Name", "LockId", + }); + internal_static_google_cloud_config_v1_LockDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_config_v1_LockDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_LockDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_config_v1_UnlockDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_config_v1_UnlockDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_UnlockDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", "LockId", + }); + internal_static_google_cloud_config_v1_ExportLockInfoRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_config_v1_ExportLockInfoRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_ExportLockInfoRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_config_v1_LockInfo_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_config_v1_LockInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_config_v1_LockInfo_descriptor, + new java.lang.String[] { + "LockId", "Operation", "Info", "Who", "Version", "CreateTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/CreateDeploymentRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/CreateDeploymentRequest.java new file mode 100644 index 000000000000..b9e39e806bc3 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/CreateDeploymentRequest.java @@ -0,0 +1,1377 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** Protobuf type {@code google.cloud.config.v1.CreateDeploymentRequest} */ +public final class CreateDeploymentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.CreateDeploymentRequest) + CreateDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDeploymentRequest.newBuilder() to construct. + private CreateDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDeploymentRequest() { + parent_ = ""; + deploymentId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDeploymentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_CreateDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_CreateDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.CreateDeploymentRequest.class, + com.google.cloud.config.v1.CreateDeploymentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent in whose context the Deployment is created. The parent
+   * value is in the format: 'projects/{project_id}/locations/{location}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent in whose context the Deployment is created. The parent
+   * value is in the format: 'projects/{project_id}/locations/{location}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYMENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object deploymentId_ = ""; + /** + * + * + *
+   * Required. The Deployment ID.
+   * 
+ * + * string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deploymentId. + */ + @java.lang.Override + public java.lang.String getDeploymentId() { + java.lang.Object ref = deploymentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deploymentId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Deployment ID.
+   * 
+ * + * string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deploymentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeploymentIdBytes() { + java.lang.Object ref = deploymentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deploymentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYMENT_FIELD_NUMBER = 3; + private com.google.cloud.config.v1.Deployment deployment_; + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+   * created.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return deployment_ != null; + } + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+   * created.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployment. + */ + @java.lang.Override + public com.google.cloud.config.v1.Deployment getDeployment() { + return deployment_ == null + ? com.google.cloud.config.v1.Deployment.getDefaultInstance() + : deployment_; + } + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+   * created.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOrBuilder getDeploymentOrBuilder() { + return deployment_ == null + ? com.google.cloud.config.v1.Deployment.getDefaultInstance() + : deployment_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deploymentId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deploymentId_); + } + if (deployment_ != null) { + output.writeMessage(3, getDeployment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deploymentId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deploymentId_); + } + if (deployment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeployment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.CreateDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.CreateDeploymentRequest other = + (com.google.cloud.config.v1.CreateDeploymentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDeploymentId().equals(other.getDeploymentId())) return false; + if (hasDeployment() != other.hasDeployment()) return false; + if (hasDeployment()) { + if (!getDeployment().equals(other.getDeployment())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + DEPLOYMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentId().hashCode(); + if (hasDeployment()) { + hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getDeployment().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.CreateDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.config.v1.CreateDeploymentRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.CreateDeploymentRequest) + com.google.cloud.config.v1.CreateDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_CreateDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_CreateDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.CreateDeploymentRequest.class, + com.google.cloud.config.v1.CreateDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.CreateDeploymentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + deploymentId_ = ""; + deployment_ = null; + if (deploymentBuilder_ != null) { + deploymentBuilder_.dispose(); + deploymentBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_CreateDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.CreateDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.CreateDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.CreateDeploymentRequest build() { + com.google.cloud.config.v1.CreateDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.CreateDeploymentRequest buildPartial() { + com.google.cloud.config.v1.CreateDeploymentRequest result = + new com.google.cloud.config.v1.CreateDeploymentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.CreateDeploymentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deploymentId_ = deploymentId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deployment_ = deploymentBuilder_ == null ? deployment_ : deploymentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.CreateDeploymentRequest) { + return mergeFrom((com.google.cloud.config.v1.CreateDeploymentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.CreateDeploymentRequest other) { + if (other == com.google.cloud.config.v1.CreateDeploymentRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDeploymentId().isEmpty()) { + deploymentId_ = other.deploymentId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDeployment()) { + mergeDeployment(other.getDeployment()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + deploymentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getDeploymentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent in whose context the Deployment is created. The parent
+     * value is in the format: 'projects/{project_id}/locations/{location}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the Deployment is created. The parent
+     * value is in the format: 'projects/{project_id}/locations/{location}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the Deployment is created. The parent
+     * value is in the format: 'projects/{project_id}/locations/{location}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the Deployment is created. The parent
+     * value is in the format: 'projects/{project_id}/locations/{location}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the Deployment is created. The parent
+     * value is in the format: 'projects/{project_id}/locations/{location}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object deploymentId_ = ""; + /** + * + * + *
+     * Required. The Deployment ID.
+     * 
+ * + * string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deploymentId. + */ + public java.lang.String getDeploymentId() { + java.lang.Object ref = deploymentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deploymentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Deployment ID.
+     * 
+ * + * string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deploymentId. + */ + public com.google.protobuf.ByteString getDeploymentIdBytes() { + java.lang.Object ref = deploymentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deploymentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Deployment ID.
+     * 
+ * + * string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The deploymentId to set. + * @return This builder for chaining. + */ + public Builder setDeploymentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deploymentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Deployment ID.
+     * 
+ * + * string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDeploymentId() { + deploymentId_ = getDefaultInstance().getDeploymentId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Deployment ID.
+     * 
+ * + * string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for deploymentId to set. + * @return This builder for chaining. + */ + public Builder setDeploymentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deploymentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.config.v1.Deployment deployment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.Deployment, + com.google.cloud.config.v1.Deployment.Builder, + com.google.cloud.config.v1.DeploymentOrBuilder> + deploymentBuilder_; + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+     * created.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployment field is set. + */ + public boolean hasDeployment() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+     * created.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployment. + */ + public com.google.cloud.config.v1.Deployment getDeployment() { + if (deploymentBuilder_ == null) { + return deployment_ == null + ? com.google.cloud.config.v1.Deployment.getDefaultInstance() + : deployment_; + } else { + return deploymentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+     * created.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeployment(com.google.cloud.config.v1.Deployment value) { + if (deploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployment_ = value; + } else { + deploymentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+     * created.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeployment(com.google.cloud.config.v1.Deployment.Builder builderForValue) { + if (deploymentBuilder_ == null) { + deployment_ = builderForValue.build(); + } else { + deploymentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+     * created.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDeployment(com.google.cloud.config.v1.Deployment value) { + if (deploymentBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && deployment_ != null + && deployment_ != com.google.cloud.config.v1.Deployment.getDefaultInstance()) { + getDeploymentBuilder().mergeFrom(value); + } else { + deployment_ = value; + } + } else { + deploymentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+     * created.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDeployment() { + bitField0_ = (bitField0_ & ~0x00000004); + deployment_ = null; + if (deploymentBuilder_ != null) { + deploymentBuilder_.dispose(); + deploymentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+     * created.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.config.v1.Deployment.Builder getDeploymentBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDeploymentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+     * created.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.config.v1.DeploymentOrBuilder getDeploymentOrBuilder() { + if (deploymentBuilder_ != null) { + return deploymentBuilder_.getMessageOrBuilder(); + } else { + return deployment_ == null + ? com.google.cloud.config.v1.Deployment.getDefaultInstance() + : deployment_; + } + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+     * created.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.Deployment, + com.google.cloud.config.v1.Deployment.Builder, + com.google.cloud.config.v1.DeploymentOrBuilder> + getDeploymentFieldBuilder() { + if (deploymentBuilder_ == null) { + deploymentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.Deployment, + com.google.cloud.config.v1.Deployment.Builder, + com.google.cloud.config.v1.DeploymentOrBuilder>( + getDeployment(), getParentForChildren(), isClean()); + deployment_ = null; + } + return deploymentBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.CreateDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.CreateDeploymentRequest) + private static final com.google.cloud.config.v1.CreateDeploymentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.CreateDeploymentRequest(); + } + + public static com.google.cloud.config.v1.CreateDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.CreateDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/CreateDeploymentRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/CreateDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..6b091ad0c80a --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/CreateDeploymentRequestOrBuilder.java @@ -0,0 +1,174 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface CreateDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.CreateDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent in whose context the Deployment is created. The parent
+   * value is in the format: 'projects/{project_id}/locations/{location}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent in whose context the Deployment is created. The parent
+   * value is in the format: 'projects/{project_id}/locations/{location}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Deployment ID.
+   * 
+ * + * string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deploymentId. + */ + java.lang.String getDeploymentId(); + /** + * + * + *
+   * Required. The Deployment ID.
+   * 
+ * + * string deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deploymentId. + */ + com.google.protobuf.ByteString getDeploymentIdBytes(); + + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+   * created.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployment field is set. + */ + boolean hasDeployment(); + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+   * created.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployment. + */ + com.google.cloud.config.v1.Deployment getDeployment(); + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] resource to be
+   * created.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.config.v1.DeploymentOrBuilder getDeploymentOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteDeploymentRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteDeploymentRequest.java new file mode 100644 index 000000000000..f5ea92ef566f --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteDeploymentRequest.java @@ -0,0 +1,1340 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** Protobuf type {@code google.cloud.config.v1.DeleteDeploymentRequest} */ +public final class DeleteDeploymentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.DeleteDeploymentRequest) + DeleteDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDeploymentRequest.newBuilder() to construct. + private DeleteDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDeploymentRequest() { + name_ = ""; + requestId_ = ""; + deletePolicy_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDeploymentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeleteDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeleteDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.DeleteDeploymentRequest.class, + com.google.cloud.config.v1.DeleteDeploymentRequest.Builder.class); + } + + /** + * + * + *
+   * Policy on how resources actuated by the deployment should be deleted.
+   * 
+ * + * Protobuf enum {@code google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy} + */ + public enum DeletePolicy implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified policy, resources will be deleted.
+     * 
+ * + * DELETE_POLICY_UNSPECIFIED = 0; + */ + DELETE_POLICY_UNSPECIFIED(0), + /** + * + * + *
+     * Deletes resources actuated by the deployment.
+     * 
+ * + * DELETE = 1; + */ + DELETE(1), + /** + * + * + *
+     * Abandons resources and only deletes the deployment and its metadata.
+     * 
+ * + * ABANDON = 2; + */ + ABANDON(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified policy, resources will be deleted.
+     * 
+ * + * DELETE_POLICY_UNSPECIFIED = 0; + */ + public static final int DELETE_POLICY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Deletes resources actuated by the deployment.
+     * 
+ * + * DELETE = 1; + */ + public static final int DELETE_VALUE = 1; + /** + * + * + *
+     * Abandons resources and only deletes the deployment and its metadata.
+     * 
+ * + * ABANDON = 2; + */ + public static final int ABANDON_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 DeletePolicy 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 DeletePolicy forNumber(int value) { + switch (value) { + case 0: + return DELETE_POLICY_UNSPECIFIED; + case 1: + return DELETE; + case 2: + return ABANDON; + 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 DeletePolicy findValueByNumber(int number) { + return DeletePolicy.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.config.v1.DeleteDeploymentRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DeletePolicy[] VALUES = values(); + + public static DeletePolicy 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 DeletePolicy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the Deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + /** + * + * + *
+   * Optional. If set to true, any revisions for this deployment will also be
+   * deleted. (Otherwise, the request will only work if the deployment has no
+   * revisions.)
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + public static final int DELETE_POLICY_FIELD_NUMBER = 4; + private int deletePolicy_ = 0; + /** + * + * + *
+   * Optional. Policy on how resources actuated by the deployment should be
+   * deleted. If unspecified, the default behavior is to delete the underlying
+   * resources.
+   * 
+ * + * + * .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for deletePolicy. + */ + @java.lang.Override + public int getDeletePolicyValue() { + return deletePolicy_; + } + /** + * + * + *
+   * Optional. Policy on how resources actuated by the deployment should be
+   * deleted. If unspecified, the default behavior is to delete the underlying
+   * resources.
+   * 
+ * + * + * .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deletePolicy. + */ + @java.lang.Override + public com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy getDeletePolicy() { + com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy result = + com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy.forNumber(deletePolicy_); + return result == null + ? com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + if (deletePolicy_ + != com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy.DELETE_POLICY_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, deletePolicy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + if (deletePolicy_ + != com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy.DELETE_POLICY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, deletePolicy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.DeleteDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.DeleteDeploymentRequest other = + (com.google.cloud.config.v1.DeleteDeploymentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) return false; + if (deletePolicy_ != other.deletePolicy_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (37 * hash) + DELETE_POLICY_FIELD_NUMBER; + hash = (53 * hash) + deletePolicy_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.DeleteDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.config.v1.DeleteDeploymentRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.DeleteDeploymentRequest) + com.google.cloud.config.v1.DeleteDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeleteDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeleteDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.DeleteDeploymentRequest.class, + com.google.cloud.config.v1.DeleteDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.DeleteDeploymentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + force_ = false; + deletePolicy_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeleteDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.DeleteDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.DeleteDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.DeleteDeploymentRequest build() { + com.google.cloud.config.v1.DeleteDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.DeleteDeploymentRequest buildPartial() { + com.google.cloud.config.v1.DeleteDeploymentRequest result = + new com.google.cloud.config.v1.DeleteDeploymentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.DeleteDeploymentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deletePolicy_ = deletePolicy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.DeleteDeploymentRequest) { + return mergeFrom((com.google.cloud.config.v1.DeleteDeploymentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.DeleteDeploymentRequest other) { + if (other == com.google.cloud.config.v1.DeleteDeploymentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + if (other.deletePolicy_ != 0) { + setDeletePolicyValue(other.getDeletePolicyValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + deletePolicy_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * Optional. If set to true, any revisions for this deployment will also be
+     * deleted. (Otherwise, the request will only work if the deployment has no
+     * revisions.)
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Optional. If set to true, any revisions for this deployment will also be
+     * deleted. (Otherwise, the request will only work if the deployment has no
+     * revisions.)
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, any revisions for this deployment will also be
+     * deleted. (Otherwise, the request will only work if the deployment has no
+     * revisions.)
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + private int deletePolicy_ = 0; + /** + * + * + *
+     * Optional. Policy on how resources actuated by the deployment should be
+     * deleted. If unspecified, the default behavior is to delete the underlying
+     * resources.
+     * 
+ * + * + * .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for deletePolicy. + */ + @java.lang.Override + public int getDeletePolicyValue() { + return deletePolicy_; + } + /** + * + * + *
+     * Optional. Policy on how resources actuated by the deployment should be
+     * deleted. If unspecified, the default behavior is to delete the underlying
+     * resources.
+     * 
+ * + * + * .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for deletePolicy to set. + * @return This builder for chaining. + */ + public Builder setDeletePolicyValue(int value) { + deletePolicy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Policy on how resources actuated by the deployment should be
+     * deleted. If unspecified, the default behavior is to delete the underlying
+     * resources.
+     * 
+ * + * + * .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deletePolicy. + */ + @java.lang.Override + public com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy getDeletePolicy() { + com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy result = + com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy.forNumber(deletePolicy_); + return result == null + ? com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Policy on how resources actuated by the deployment should be
+     * deleted. If unspecified, the default behavior is to delete the underlying
+     * resources.
+     * 
+ * + * + * .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The deletePolicy to set. + * @return This builder for chaining. + */ + public Builder setDeletePolicy( + com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + deletePolicy_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Policy on how resources actuated by the deployment should be
+     * deleted. If unspecified, the default behavior is to delete the underlying
+     * resources.
+     * 
+ * + * + * .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDeletePolicy() { + bitField0_ = (bitField0_ & ~0x00000008); + deletePolicy_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.DeleteDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.DeleteDeploymentRequest) + private static final com.google.cloud.config.v1.DeleteDeploymentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.DeleteDeploymentRequest(); + } + + public static com.google.cloud.config.v1.DeleteDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.DeleteDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteDeploymentRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..0fa86aebc019 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteDeploymentRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface DeleteDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.DeleteDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, any revisions for this deployment will also be
+   * deleted. (Otherwise, the request will only work if the deployment has no
+   * revisions.)
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); + + /** + * + * + *
+   * Optional. Policy on how resources actuated by the deployment should be
+   * deleted. If unspecified, the default behavior is to delete the underlying
+   * resources.
+   * 
+ * + * + * .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for deletePolicy. + */ + int getDeletePolicyValue(); + /** + * + * + *
+   * Optional. Policy on how resources actuated by the deployment should be
+   * deleted. If unspecified, the default behavior is to delete the underlying
+   * resources.
+   * 
+ * + * + * .google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy delete_policy = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deletePolicy. + */ + com.google.cloud.config.v1.DeleteDeploymentRequest.DeletePolicy getDeletePolicy(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteStatefileRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteStatefileRequest.java new file mode 100644 index 000000000000..070b50b9436e --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteStatefileRequest.java @@ -0,0 +1,742 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to delete a state file passed to a 'DeleteStatefile' call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.DeleteStatefileRequest} + */ +public final class DeleteStatefileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.DeleteStatefileRequest) + DeleteStatefileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteStatefileRequest.newBuilder() to construct. + private DeleteStatefileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteStatefileRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteStatefileRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeleteStatefileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeleteStatefileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.DeleteStatefileRequest.class, + com.google.cloud.config.v1.DeleteStatefileRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCK_ID_FIELD_NUMBER = 2; + private long lockId_ = 0L; + /** + * + * + *
+   * Required. Lock ID of the lock file to verify that the user who is deleting
+   * the state file previously locked the Deployment.
+   * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockId. + */ + @java.lang.Override + public long getLockId() { + return lockId_; + } + + 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 (lockId_ != 0L) { + output.writeInt64(2, lockId_); + } + 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 (lockId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, lockId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.DeleteStatefileRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.DeleteStatefileRequest other = + (com.google.cloud.config.v1.DeleteStatefileRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getLockId() != other.getLockId()) 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) + LOCK_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLockId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.DeleteStatefileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to delete a state file passed to a 'DeleteStatefile' call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.DeleteStatefileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.DeleteStatefileRequest) + com.google.cloud.config.v1.DeleteStatefileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeleteStatefileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeleteStatefileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.DeleteStatefileRequest.class, + com.google.cloud.config.v1.DeleteStatefileRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.DeleteStatefileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + lockId_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeleteStatefileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.DeleteStatefileRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.DeleteStatefileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.DeleteStatefileRequest build() { + com.google.cloud.config.v1.DeleteStatefileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.DeleteStatefileRequest buildPartial() { + com.google.cloud.config.v1.DeleteStatefileRequest result = + new com.google.cloud.config.v1.DeleteStatefileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.DeleteStatefileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lockId_ = lockId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.DeleteStatefileRequest) { + return mergeFrom((com.google.cloud.config.v1.DeleteStatefileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.DeleteStatefileRequest other) { + if (other == com.google.cloud.config.v1.DeleteStatefileRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getLockId() != 0L) { + setLockId(other.getLockId()); + } + 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: + { + lockId_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long lockId_; + /** + * + * + *
+     * Required. Lock ID of the lock file to verify that the user who is deleting
+     * the state file previously locked the Deployment.
+     * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockId. + */ + @java.lang.Override + public long getLockId() { + return lockId_; + } + /** + * + * + *
+     * Required. Lock ID of the lock file to verify that the user who is deleting
+     * the state file previously locked the Deployment.
+     * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The lockId to set. + * @return This builder for chaining. + */ + public Builder setLockId(long value) { + + lockId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Lock ID of the lock file to verify that the user who is deleting
+     * the state file previously locked the Deployment.
+     * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLockId() { + bitField0_ = (bitField0_ & ~0x00000002); + lockId_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.DeleteStatefileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.DeleteStatefileRequest) + private static final com.google.cloud.config.v1.DeleteStatefileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.DeleteStatefileRequest(); + } + + public static com.google.cloud.config.v1.DeleteStatefileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteStatefileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.DeleteStatefileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteStatefileRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteStatefileRequestOrBuilder.java new file mode 100644 index 000000000000..d243a3334a77 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeleteStatefileRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface DeleteStatefileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.DeleteStatefileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Lock ID of the lock file to verify that the user who is deleting
+   * the state file previously locked the Deployment.
+   * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockId. + */ + long getLockId(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Deployment.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Deployment.java new file mode 100644 index 000000000000..83e02baba9f1 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Deployment.java @@ -0,0 +1,5976 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A Deployment is a group of resources and configs managed and provisioned by
+ * Infra Manager.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.Deployment} + */ +public final class Deployment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.Deployment) + DeploymentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Deployment.newBuilder() to construct. + private Deployment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Deployment() { + name_ = ""; + state_ = 0; + latestRevision_ = ""; + stateDetail_ = ""; + errorCode_ = 0; + deleteBuild_ = ""; + deleteLogs_ = ""; + tfErrors_ = java.util.Collections.emptyList(); + errorLogs_ = ""; + artifactsGcsBucket_ = ""; + serviceAccount_ = ""; + workerPool_ = ""; + lockState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Deployment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Deployment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Deployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.Deployment.class, + com.google.cloud.config.v1.Deployment.Builder.class); + } + + /** + * + * + *
+   * Possible states of a deployment.
+   * 
+ * + * Protobuf enum {@code google.cloud.config.v1.Deployment.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The deployment is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The deployment is healthy.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The deployment is being updated.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + * + * + *
+     * The deployment is being deleted.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + /** + * + * + *
+     * The deployment has encountered an unexpected error.
+     * 
+ * + * FAILED = 5; + */ + FAILED(5), + /** + * + * + *
+     * The deployment is no longer being actively reconciled.
+     * This may be the result of recovering the project after deletion.
+     * 
+ * + * SUSPENDED = 6; + */ + SUSPENDED(6), + /** + * + * + *
+     * The deployment has been deleted.
+     * 
+ * + * DELETED = 7; + */ + DELETED(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The deployment is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * The deployment is healthy.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+     * The deployment is being updated.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + * + * + *
+     * The deployment is being deleted.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + /** + * + * + *
+     * The deployment has encountered an unexpected error.
+     * 
+ * + * FAILED = 5; + */ + public static final int FAILED_VALUE = 5; + /** + * + * + *
+     * The deployment is no longer being actively reconciled.
+     * This may be the result of recovering the project after deletion.
+     * 
+ * + * SUSPENDED = 6; + */ + public static final int SUSPENDED_VALUE = 6; + /** + * + * + *
+     * The deployment has been deleted.
+     * 
+ * + * DELETED = 7; + */ + public static final int DELETED_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return ACTIVE; + case 3: + return UPDATING; + case 4: + return DELETING; + case 5: + return FAILED; + case 6: + return SUSPENDED; + case 7: + return DELETED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.config.v1.Deployment.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.config.v1.Deployment.State) + } + + /** + * + * + *
+   * Possible errors that can occur with deployments.
+   * 
+ * + * Protobuf enum {@code google.cloud.config.v1.Deployment.ErrorCode} + */ + public enum ErrorCode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No error code was specified.
+     * 
+ * + * ERROR_CODE_UNSPECIFIED = 0; + */ + ERROR_CODE_UNSPECIFIED(0), + /** + * + * + *
+     * The revision failed. See Revision for more details.
+     * 
+ * + * REVISION_FAILED = 1; + */ + REVISION_FAILED(1), + /** + * + * + *
+     * Cloud Build failed due to a permission issue.
+     * 
+ * + * CLOUD_BUILD_PERMISSION_DENIED = 3; + */ + CLOUD_BUILD_PERMISSION_DENIED(3), + /** + * + * + *
+     * Cloud Build job associated with a deployment deletion could not be
+     * started.
+     * 
+ * + * DELETE_BUILD_API_FAILED = 5; + */ + DELETE_BUILD_API_FAILED(5), + /** + * + * + *
+     * Cloud Build job associated with a deployment deletion was started but
+     * failed.
+     * 
+ * + * DELETE_BUILD_RUN_FAILED = 6; + */ + DELETE_BUILD_RUN_FAILED(6), + /** + * + * + *
+     * Cloud Storage bucket creation failed due to a permission issue.
+     * 
+ * + * BUCKET_CREATION_PERMISSION_DENIED = 7; + */ + BUCKET_CREATION_PERMISSION_DENIED(7), + /** + * + * + *
+     * Cloud Storage bucket creation failed due to an issue unrelated to
+     * permissions.
+     * 
+ * + * BUCKET_CREATION_FAILED = 8; + */ + BUCKET_CREATION_FAILED(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No error code was specified.
+     * 
+ * + * ERROR_CODE_UNSPECIFIED = 0; + */ + public static final int ERROR_CODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The revision failed. See Revision for more details.
+     * 
+ * + * REVISION_FAILED = 1; + */ + public static final int REVISION_FAILED_VALUE = 1; + /** + * + * + *
+     * Cloud Build failed due to a permission issue.
+     * 
+ * + * CLOUD_BUILD_PERMISSION_DENIED = 3; + */ + public static final int CLOUD_BUILD_PERMISSION_DENIED_VALUE = 3; + /** + * + * + *
+     * Cloud Build job associated with a deployment deletion could not be
+     * started.
+     * 
+ * + * DELETE_BUILD_API_FAILED = 5; + */ + public static final int DELETE_BUILD_API_FAILED_VALUE = 5; + /** + * + * + *
+     * Cloud Build job associated with a deployment deletion was started but
+     * failed.
+     * 
+ * + * DELETE_BUILD_RUN_FAILED = 6; + */ + public static final int DELETE_BUILD_RUN_FAILED_VALUE = 6; + /** + * + * + *
+     * Cloud Storage bucket creation failed due to a permission issue.
+     * 
+ * + * BUCKET_CREATION_PERMISSION_DENIED = 7; + */ + public static final int BUCKET_CREATION_PERMISSION_DENIED_VALUE = 7; + /** + * + * + *
+     * Cloud Storage bucket creation failed due to an issue unrelated to
+     * permissions.
+     * 
+ * + * BUCKET_CREATION_FAILED = 8; + */ + public static final int BUCKET_CREATION_FAILED_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 ErrorCode 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 ErrorCode forNumber(int value) { + switch (value) { + case 0: + return ERROR_CODE_UNSPECIFIED; + case 1: + return REVISION_FAILED; + case 3: + return CLOUD_BUILD_PERMISSION_DENIED; + case 5: + return DELETE_BUILD_API_FAILED; + case 6: + return DELETE_BUILD_RUN_FAILED; + case 7: + return BUCKET_CREATION_PERMISSION_DENIED; + case 8: + return BUCKET_CREATION_FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ErrorCode findValueByNumber(int number) { + return ErrorCode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.config.v1.Deployment.getDescriptor().getEnumTypes().get(1); + } + + private static final ErrorCode[] VALUES = values(); + + public static ErrorCode 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 ErrorCode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.config.v1.Deployment.ErrorCode) + } + + /** + * + * + *
+   * Possible lock states of a deployment.
+   * 
+ * + * Protobuf enum {@code google.cloud.config.v1.Deployment.LockState} + */ + public enum LockState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. This value is used if the lock state is omitted.
+     * 
+ * + * LOCK_STATE_UNSPECIFIED = 0; + */ + LOCK_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The deployment is locked.
+     * 
+ * + * LOCKED = 1; + */ + LOCKED(1), + /** + * + * + *
+     * The deployment is unlocked.
+     * 
+ * + * UNLOCKED = 2; + */ + UNLOCKED(2), + /** + * + * + *
+     * The deployment is being locked.
+     * 
+ * + * LOCKING = 3; + */ + LOCKING(3), + /** + * + * + *
+     * The deployment is being unlocked.
+     * 
+ * + * UNLOCKING = 4; + */ + UNLOCKING(4), + /** + * + * + *
+     * The deployment has failed to lock.
+     * 
+ * + * LOCK_FAILED = 5; + */ + LOCK_FAILED(5), + /** + * + * + *
+     * The deployment has failed to unlock.
+     * 
+ * + * UNLOCK_FAILED = 6; + */ + UNLOCK_FAILED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. This value is used if the lock state is omitted.
+     * 
+ * + * LOCK_STATE_UNSPECIFIED = 0; + */ + public static final int LOCK_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The deployment is locked.
+     * 
+ * + * LOCKED = 1; + */ + public static final int LOCKED_VALUE = 1; + /** + * + * + *
+     * The deployment is unlocked.
+     * 
+ * + * UNLOCKED = 2; + */ + public static final int UNLOCKED_VALUE = 2; + /** + * + * + *
+     * The deployment is being locked.
+     * 
+ * + * LOCKING = 3; + */ + public static final int LOCKING_VALUE = 3; + /** + * + * + *
+     * The deployment is being unlocked.
+     * 
+ * + * UNLOCKING = 4; + */ + public static final int UNLOCKING_VALUE = 4; + /** + * + * + *
+     * The deployment has failed to lock.
+     * 
+ * + * LOCK_FAILED = 5; + */ + public static final int LOCK_FAILED_VALUE = 5; + /** + * + * + *
+     * The deployment has failed to unlock.
+     * 
+ * + * UNLOCK_FAILED = 6; + */ + public static final int UNLOCK_FAILED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LockState 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 LockState forNumber(int value) { + switch (value) { + case 0: + return LOCK_STATE_UNSPECIFIED; + case 1: + return LOCKED; + case 2: + return UNLOCKED; + case 3: + return LOCKING; + case 4: + return UNLOCKING; + case 5: + return LOCK_FAILED; + case 6: + return UNLOCK_FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LockState findValueByNumber(int number) { + return LockState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.config.v1.Deployment.getDescriptor().getEnumTypes().get(2); + } + + private static final LockState[] VALUES = values(); + + public static LockState 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 LockState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.config.v1.Deployment.LockState) + } + + private int bitField0_; + private int blueprintCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object blueprint_; + + public enum BlueprintCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TERRAFORM_BLUEPRINT(6), + BLUEPRINT_NOT_SET(0); + private final int value; + + private BlueprintCase(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 BlueprintCase valueOf(int value) { + return forNumber(value); + } + + public static BlueprintCase forNumber(int value) { + switch (value) { + case 6: + return TERRAFORM_BLUEPRINT; + case 0: + return BLUEPRINT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BlueprintCase getBlueprintCase() { + return BlueprintCase.forNumber(blueprintCase_); + } + + public static final int TERRAFORM_BLUEPRINT_FIELD_NUMBER = 6; + /** + * + * + *
+   * A blueprint described using Terraform's HashiCorp Configuration Language
+   * as a root module.
+   * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + * + * @return Whether the terraformBlueprint field is set. + */ + @java.lang.Override + public boolean hasTerraformBlueprint() { + return blueprintCase_ == 6; + } + /** + * + * + *
+   * A blueprint described using Terraform's HashiCorp Configuration Language
+   * as a root module.
+   * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + * + * @return The terraformBlueprint. + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprint getTerraformBlueprint() { + if (blueprintCase_ == 6) { + return (com.google.cloud.config.v1.TerraformBlueprint) blueprint_; + } + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + /** + * + * + *
+   * A blueprint described using Terraform's HashiCorp Configuration Language
+   * as a root module.
+   * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprintOrBuilder getTerraformBlueprintOrBuilder() { + if (blueprintCase_ == 6) { + return (com.google.cloud.config.v1.TerraformBlueprint) blueprint_; + } + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Resource name of the deployment.
+   * Format: `projects/{project}/locations/{location}/deployments/{deployment}`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Resource name of the deployment.
+   * Format: `projects/{project}/locations/{location}/deployments/{deployment}`
+   * 
+ * + * 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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the deployment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the deployment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the deployment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the deployment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the deployment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the deployment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Deployment_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(); + } + /** + * + * + *
+   * User-defined metadata for the deployment.
+   * 
+ * + * map<string, string> labels = 4; + */ + @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(); + } + /** + * + * + *
+   * User-defined metadata for the deployment.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * User-defined metadata for the deployment.
+   * 
+ * + * map<string, string> labels = 4; + */ + @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; + } + /** + * + * + *
+   * User-defined metadata for the deployment.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + * + * + *
+   * Output only. Current state of the deployment.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. Current state of the deployment.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.config.v1.Deployment.State getState() { + com.google.cloud.config.v1.Deployment.State result = + com.google.cloud.config.v1.Deployment.State.forNumber(state_); + return result == null ? com.google.cloud.config.v1.Deployment.State.UNRECOGNIZED : result; + } + + public static final int LATEST_REVISION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object latestRevision_ = ""; + /** + * + * + *
+   * Output only. Revision name that was most recently applied.
+   * Format: `projects/{project}/locations/{location}/deployments/{deployment}/
+   * revisions/{revision}`
+   * 
+ * + * string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The latestRevision. + */ + @java.lang.Override + public java.lang.String getLatestRevision() { + java.lang.Object ref = latestRevision_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + latestRevision_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Revision name that was most recently applied.
+   * Format: `projects/{project}/locations/{location}/deployments/{deployment}/
+   * revisions/{revision}`
+   * 
+ * + * string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for latestRevision. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLatestRevisionBytes() { + java.lang.Object ref = latestRevision_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + latestRevision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_DETAIL_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object stateDetail_ = ""; + /** + * + * + *
+   * Output only. Additional information regarding the current state.
+   * 
+ * + * string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDetail. + */ + @java.lang.Override + public java.lang.String getStateDetail() { + java.lang.Object ref = stateDetail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateDetail_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Additional information regarding the current state.
+   * 
+ * + * string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDetail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStateDetailBytes() { + java.lang.Object ref = stateDetail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_CODE_FIELD_NUMBER = 10; + private int errorCode_ = 0; + /** + * + * + *
+   * Output only. Error code describing errors that may have occurred.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for errorCode. + */ + @java.lang.Override + public int getErrorCodeValue() { + return errorCode_; + } + /** + * + * + *
+   * Output only. Error code describing errors that may have occurred.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The errorCode. + */ + @java.lang.Override + public com.google.cloud.config.v1.Deployment.ErrorCode getErrorCode() { + com.google.cloud.config.v1.Deployment.ErrorCode result = + com.google.cloud.config.v1.Deployment.ErrorCode.forNumber(errorCode_); + return result == null ? com.google.cloud.config.v1.Deployment.ErrorCode.UNRECOGNIZED : result; + } + + public static final int DELETE_RESULTS_FIELD_NUMBER = 8; + private com.google.cloud.config.v1.ApplyResults deleteResults_; + /** + * + * + *
+   * Output only. Location of artifacts from a DeleteDeployment operation.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteResults field is set. + */ + @java.lang.Override + public boolean hasDeleteResults() { + return deleteResults_ != null; + } + /** + * + * + *
+   * Output only. Location of artifacts from a DeleteDeployment operation.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteResults. + */ + @java.lang.Override + public com.google.cloud.config.v1.ApplyResults getDeleteResults() { + return deleteResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : deleteResults_; + } + /** + * + * + *
+   * Output only. Location of artifacts from a DeleteDeployment operation.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.ApplyResultsOrBuilder getDeleteResultsOrBuilder() { + return deleteResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : deleteResults_; + } + + public static final int DELETE_BUILD_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object deleteBuild_ = ""; + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with deleting this
+   * deployment.
+   * 
+ * + * string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleteBuild. + */ + @java.lang.Override + public java.lang.String getDeleteBuild() { + java.lang.Object ref = deleteBuild_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deleteBuild_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with deleting this
+   * deployment.
+   * 
+ * + * string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deleteBuild. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeleteBuildBytes() { + java.lang.Object ref = deleteBuild_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deleteBuild_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELETE_LOGS_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object deleteLogs_ = ""; + /** + * + * + *
+   * Output only. Location of Cloud Build logs in Google Cloud Storage,
+   * populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleteLogs. + */ + @java.lang.Override + public java.lang.String getDeleteLogs() { + java.lang.Object ref = deleteLogs_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deleteLogs_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Location of Cloud Build logs in Google Cloud Storage,
+   * populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deleteLogs. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeleteLogsBytes() { + java.lang.Object ref = deleteLogs_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deleteLogs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TF_ERRORS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private java.util.List tfErrors_; + /** + * + * + *
+   * Output only. Errors encountered when deleting this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getTfErrorsList() { + return tfErrors_; + } + /** + * + * + *
+   * Output only. Errors encountered when deleting this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getTfErrorsOrBuilderList() { + return tfErrors_; + } + /** + * + * + *
+   * Output only. Errors encountered when deleting this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getTfErrorsCount() { + return tfErrors_.size(); + } + /** + * + * + *
+   * Output only. Errors encountered when deleting this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformError getTfErrors(int index) { + return tfErrors_.get(index); + } + /** + * + * + *
+   * Output only. Errors encountered when deleting this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformErrorOrBuilder getTfErrorsOrBuilder(int index) { + return tfErrors_.get(index); + } + + public static final int ERROR_LOGS_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object errorLogs_ = ""; + /** + * + * + *
+   * Output only. Location of Terraform error logs in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorLogs. + */ + @java.lang.Override + public java.lang.String getErrorLogs() { + java.lang.Object ref = errorLogs_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorLogs_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Location of Terraform error logs in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorLogs. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorLogsBytes() { + java.lang.Object ref = errorLogs_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorLogs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACTS_GCS_BUCKET_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object artifactsGcsBucket_ = ""; + /** + * + * + *
+   * Optional. User-defined location of Cloud Build logs and artifacts in Google
+   * Cloud Storage. Format: `gs://{bucket}/{folder}`
+   *
+   * A default bucket will be bootstrapped if the field is not set or empty.
+   * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+   * Constraints:
+   * - The bucket needs to be in the same project as the deployment
+   * - The path cannot be within the path of `gcs_source`
+   * - The field cannot be updated, including changing its presence
+   * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the artifactsGcsBucket field is set. + */ + @java.lang.Override + public boolean hasArtifactsGcsBucket() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. User-defined location of Cloud Build logs and artifacts in Google
+   * Cloud Storage. Format: `gs://{bucket}/{folder}`
+   *
+   * A default bucket will be bootstrapped if the field is not set or empty.
+   * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+   * Constraints:
+   * - The bucket needs to be in the same project as the deployment
+   * - The path cannot be within the path of `gcs_source`
+   * - The field cannot be updated, including changing its presence
+   * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The artifactsGcsBucket. + */ + @java.lang.Override + public java.lang.String getArtifactsGcsBucket() { + java.lang.Object ref = artifactsGcsBucket_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactsGcsBucket_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User-defined location of Cloud Build logs and artifacts in Google
+   * Cloud Storage. Format: `gs://{bucket}/{folder}`
+   *
+   * A default bucket will be bootstrapped if the field is not set or empty.
+   * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+   * Constraints:
+   * - The bucket needs to be in the same project as the deployment
+   * - The path cannot be within the path of `gcs_source`
+   * - The field cannot be updated, including changing its presence
+   * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for artifactsGcsBucket. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactsGcsBucketBytes() { + java.lang.Object ref = artifactsGcsBucket_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactsGcsBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * Optional. User-specified Service Account (SA) credentials to be used when
+   * actuating resources.
+   * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+   * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the serviceAccount field is set. + */ + @java.lang.Override + public boolean hasServiceAccount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. User-specified Service Account (SA) credentials to be used when
+   * actuating resources.
+   * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+   * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User-specified Service Account (SA) credentials to be used when
+   * actuating resources.
+   * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+   * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_EXISTING_RESOURCES_FIELD_NUMBER = 17; + private boolean importExistingResources_ = false; + /** + * + * + *
+   * By default, Infra Manager will return a failure when
+   * Terraform encounters a 409 code (resource conflict error) during actuation.
+   * If this flag is set to true, Infra Manager will instead
+   * attempt to automatically import the resource into the Terraform state (for
+   * supported resource types) and continue actuation.
+   *
+   * Not all resource types are supported, refer to documentation.
+   * 
+ * + * optional bool import_existing_resources = 17; + * + * @return Whether the importExistingResources field is set. + */ + @java.lang.Override + public boolean hasImportExistingResources() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * By default, Infra Manager will return a failure when
+   * Terraform encounters a 409 code (resource conflict error) during actuation.
+   * If this flag is set to true, Infra Manager will instead
+   * attempt to automatically import the resource into the Terraform state (for
+   * supported resource types) and continue actuation.
+   *
+   * Not all resource types are supported, refer to documentation.
+   * 
+ * + * optional bool import_existing_resources = 17; + * + * @return The importExistingResources. + */ + @java.lang.Override + public boolean getImportExistingResources() { + return importExistingResources_; + } + + public static final int WORKER_POOL_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object workerPool_ = ""; + /** + * + * + *
+   * Optional. The user-specified Cloud Build worker pool resource in which the
+   * Cloud Build job will execute. Format:
+   * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+   * If this field is unspecified, the default Cloud Build worker pool will be
+   * used.
+   * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the workerPool field is set. + */ + @java.lang.Override + public boolean hasWorkerPool() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Optional. The user-specified Cloud Build worker pool resource in which the
+   * Cloud Build job will execute. Format:
+   * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+   * If this field is unspecified, the default Cloud Build worker pool will be
+   * used.
+   * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The workerPool. + */ + @java.lang.Override + public java.lang.String getWorkerPool() { + java.lang.Object ref = workerPool_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workerPool_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The user-specified Cloud Build worker pool resource in which the
+   * Cloud Build job will execute. Format:
+   * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+   * If this field is unspecified, the default Cloud Build worker pool will be
+   * used.
+   * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for workerPool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWorkerPoolBytes() { + java.lang.Object ref = workerPool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workerPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCK_STATE_FIELD_NUMBER = 20; + private int lockState_ = 0; + /** + * + * + *
+   * Output only. Current lock state of the deployment.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lockState. + */ + @java.lang.Override + public int getLockStateValue() { + return lockState_; + } + /** + * + * + *
+   * Output only. Current lock state of the deployment.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lockState. + */ + @java.lang.Override + public com.google.cloud.config.v1.Deployment.LockState getLockState() { + com.google.cloud.config.v1.Deployment.LockState result = + com.google.cloud.config.v1.Deployment.LockState.forNumber(lockState_); + return result == null ? com.google.cloud.config.v1.Deployment.LockState.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (state_ != com.google.cloud.config.v1.Deployment.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (blueprintCase_ == 6) { + output.writeMessage(6, (com.google.cloud.config.v1.TerraformBlueprint) blueprint_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestRevision_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, latestRevision_); + } + if (deleteResults_ != null) { + output.writeMessage(8, getDeleteResults()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateDetail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, stateDetail_); + } + if (errorCode_ + != com.google.cloud.config.v1.Deployment.ErrorCode.ERROR_CODE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, errorCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deleteBuild_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, deleteBuild_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deleteLogs_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, deleteLogs_); + } + for (int i = 0; i < tfErrors_.size(); i++) { + output.writeMessage(13, tfErrors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorLogs_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, errorLogs_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, artifactsGcsBucket_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, serviceAccount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeBool(17, importExistingResources_); + } + if (((bitField0_ & 0x00000008) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, workerPool_); + } + if (lockState_ + != com.google.cloud.config.v1.Deployment.LockState.LOCK_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(20, lockState_); + } + 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 (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (state_ != com.google.cloud.config.v1.Deployment.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (blueprintCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.config.v1.TerraformBlueprint) blueprint_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestRevision_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, latestRevision_); + } + if (deleteResults_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDeleteResults()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateDetail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, stateDetail_); + } + if (errorCode_ + != com.google.cloud.config.v1.Deployment.ErrorCode.ERROR_CODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, errorCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deleteBuild_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, deleteBuild_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deleteLogs_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, deleteLogs_); + } + for (int i = 0; i < tfErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, tfErrors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorLogs_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, errorLogs_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, artifactsGcsBucket_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, serviceAccount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, importExistingResources_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, workerPool_); + } + if (lockState_ + != com.google.cloud.config.v1.Deployment.LockState.LOCK_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(20, lockState_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.Deployment)) { + return super.equals(obj); + } + com.google.cloud.config.v1.Deployment other = (com.google.cloud.config.v1.Deployment) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (state_ != other.state_) return false; + if (!getLatestRevision().equals(other.getLatestRevision())) return false; + if (!getStateDetail().equals(other.getStateDetail())) return false; + if (errorCode_ != other.errorCode_) return false; + if (hasDeleteResults() != other.hasDeleteResults()) return false; + if (hasDeleteResults()) { + if (!getDeleteResults().equals(other.getDeleteResults())) return false; + } + if (!getDeleteBuild().equals(other.getDeleteBuild())) return false; + if (!getDeleteLogs().equals(other.getDeleteLogs())) return false; + if (!getTfErrorsList().equals(other.getTfErrorsList())) return false; + if (!getErrorLogs().equals(other.getErrorLogs())) return false; + if (hasArtifactsGcsBucket() != other.hasArtifactsGcsBucket()) return false; + if (hasArtifactsGcsBucket()) { + if (!getArtifactsGcsBucket().equals(other.getArtifactsGcsBucket())) return false; + } + if (hasServiceAccount() != other.hasServiceAccount()) return false; + if (hasServiceAccount()) { + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + } + if (hasImportExistingResources() != other.hasImportExistingResources()) return false; + if (hasImportExistingResources()) { + if (getImportExistingResources() != other.getImportExistingResources()) return false; + } + if (hasWorkerPool() != other.hasWorkerPool()) return false; + if (hasWorkerPool()) { + if (!getWorkerPool().equals(other.getWorkerPool())) return false; + } + if (lockState_ != other.lockState_) return false; + if (!getBlueprintCase().equals(other.getBlueprintCase())) return false; + switch (blueprintCase_) { + case 6: + if (!getTerraformBlueprint().equals(other.getTerraformBlueprint())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + LATEST_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getLatestRevision().hashCode(); + hash = (37 * hash) + STATE_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getStateDetail().hashCode(); + hash = (37 * hash) + ERROR_CODE_FIELD_NUMBER; + hash = (53 * hash) + errorCode_; + if (hasDeleteResults()) { + hash = (37 * hash) + DELETE_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getDeleteResults().hashCode(); + } + hash = (37 * hash) + DELETE_BUILD_FIELD_NUMBER; + hash = (53 * hash) + getDeleteBuild().hashCode(); + hash = (37 * hash) + DELETE_LOGS_FIELD_NUMBER; + hash = (53 * hash) + getDeleteLogs().hashCode(); + if (getTfErrorsCount() > 0) { + hash = (37 * hash) + TF_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getTfErrorsList().hashCode(); + } + hash = (37 * hash) + ERROR_LOGS_FIELD_NUMBER; + hash = (53 * hash) + getErrorLogs().hashCode(); + if (hasArtifactsGcsBucket()) { + hash = (37 * hash) + ARTIFACTS_GCS_BUCKET_FIELD_NUMBER; + hash = (53 * hash) + getArtifactsGcsBucket().hashCode(); + } + if (hasServiceAccount()) { + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + } + if (hasImportExistingResources()) { + hash = (37 * hash) + IMPORT_EXISTING_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getImportExistingResources()); + } + if (hasWorkerPool()) { + hash = (37 * hash) + WORKER_POOL_FIELD_NUMBER; + hash = (53 * hash) + getWorkerPool().hashCode(); + } + hash = (37 * hash) + LOCK_STATE_FIELD_NUMBER; + hash = (53 * hash) + lockState_; + switch (blueprintCase_) { + case 6: + hash = (37 * hash) + TERRAFORM_BLUEPRINT_FIELD_NUMBER; + hash = (53 * hash) + getTerraformBlueprint().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.Deployment parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Deployment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Deployment parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Deployment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Deployment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Deployment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Deployment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Deployment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.Deployment parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Deployment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.Deployment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Deployment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.Deployment 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 Deployment is a group of resources and configs managed and provisioned by
+   * Infra Manager.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.Deployment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.Deployment) + com.google.cloud.config.v1.DeploymentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Deployment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Deployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.Deployment.class, + com.google.cloud.config.v1.Deployment.Builder.class); + } + + // Construct using com.google.cloud.config.v1.Deployment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (terraformBlueprintBuilder_ != null) { + terraformBlueprintBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + state_ = 0; + latestRevision_ = ""; + stateDetail_ = ""; + errorCode_ = 0; + deleteResults_ = null; + if (deleteResultsBuilder_ != null) { + deleteResultsBuilder_.dispose(); + deleteResultsBuilder_ = null; + } + deleteBuild_ = ""; + deleteLogs_ = ""; + if (tfErrorsBuilder_ == null) { + tfErrors_ = java.util.Collections.emptyList(); + } else { + tfErrors_ = null; + tfErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + errorLogs_ = ""; + artifactsGcsBucket_ = ""; + serviceAccount_ = ""; + importExistingResources_ = false; + workerPool_ = ""; + lockState_ = 0; + blueprintCase_ = 0; + blueprint_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Deployment_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.Deployment getDefaultInstanceForType() { + return com.google.cloud.config.v1.Deployment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.Deployment build() { + com.google.cloud.config.v1.Deployment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.Deployment buildPartial() { + com.google.cloud.config.v1.Deployment result = + new com.google.cloud.config.v1.Deployment(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.config.v1.Deployment result) { + if (tfErrorsBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0)) { + tfErrors_ = java.util.Collections.unmodifiableList(tfErrors_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.tfErrors_ = tfErrors_; + } else { + result.tfErrors_ = tfErrorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.config.v1.Deployment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.latestRevision_ = latestRevision_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.stateDetail_ = stateDetail_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.errorCode_ = errorCode_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.deleteResults_ = + deleteResultsBuilder_ == null ? deleteResults_ : deleteResultsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.deleteBuild_ = deleteBuild_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.deleteLogs_ = deleteLogs_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.errorLogs_ = errorLogs_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00004000) != 0)) { + result.artifactsGcsBucket_ = artifactsGcsBucket_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.serviceAccount_ = serviceAccount_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.importExistingResources_ = importExistingResources_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.workerPool_ = workerPool_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.lockState_ = lockState_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.config.v1.Deployment result) { + result.blueprintCase_ = blueprintCase_; + result.blueprint_ = this.blueprint_; + if (blueprintCase_ == 6 && terraformBlueprintBuilder_ != null) { + result.blueprint_ = terraformBlueprintBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.Deployment) { + return mergeFrom((com.google.cloud.config.v1.Deployment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.Deployment other) { + if (other == com.google.cloud.config.v1.Deployment.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getLatestRevision().isEmpty()) { + latestRevision_ = other.latestRevision_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getStateDetail().isEmpty()) { + stateDetail_ = other.stateDetail_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.errorCode_ != 0) { + setErrorCodeValue(other.getErrorCodeValue()); + } + if (other.hasDeleteResults()) { + mergeDeleteResults(other.getDeleteResults()); + } + if (!other.getDeleteBuild().isEmpty()) { + deleteBuild_ = other.deleteBuild_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getDeleteLogs().isEmpty()) { + deleteLogs_ = other.deleteLogs_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (tfErrorsBuilder_ == null) { + if (!other.tfErrors_.isEmpty()) { + if (tfErrors_.isEmpty()) { + tfErrors_ = other.tfErrors_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureTfErrorsIsMutable(); + tfErrors_.addAll(other.tfErrors_); + } + onChanged(); + } + } else { + if (!other.tfErrors_.isEmpty()) { + if (tfErrorsBuilder_.isEmpty()) { + tfErrorsBuilder_.dispose(); + tfErrorsBuilder_ = null; + tfErrors_ = other.tfErrors_; + bitField0_ = (bitField0_ & ~0x00001000); + tfErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTfErrorsFieldBuilder() + : null; + } else { + tfErrorsBuilder_.addAllMessages(other.tfErrors_); + } + } + } + if (!other.getErrorLogs().isEmpty()) { + errorLogs_ = other.errorLogs_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.hasArtifactsGcsBucket()) { + artifactsGcsBucket_ = other.artifactsGcsBucket_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (other.hasServiceAccount()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (other.hasImportExistingResources()) { + setImportExistingResources(other.getImportExistingResources()); + } + if (other.hasWorkerPool()) { + workerPool_ = other.workerPool_; + bitField0_ |= 0x00020000; + onChanged(); + } + if (other.lockState_ != 0) { + setLockStateValue(other.getLockStateValue()); + } + switch (other.getBlueprintCase()) { + case TERRAFORM_BLUEPRINT: + { + mergeTerraformBlueprint(other.getTerraformBlueprint()); + break; + } + case BLUEPRINT_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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 40: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 40 + case 50: + { + input.readMessage( + getTerraformBlueprintFieldBuilder().getBuilder(), extensionRegistry); + blueprintCase_ = 6; + break; + } // case 50 + case 58: + { + latestRevision_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getDeleteResultsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 66 + case 74: + { + stateDetail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 80: + { + errorCode_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 90: + { + deleteBuild_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + deleteLogs_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: + { + com.google.cloud.config.v1.TerraformError m = + input.readMessage( + com.google.cloud.config.v1.TerraformError.parser(), extensionRegistry); + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + tfErrors_.add(m); + } else { + tfErrorsBuilder_.addMessage(m); + } + break; + } // case 106 + case 114: + { + errorLogs_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: + { + artifactsGcsBucket_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 136: + { + importExistingResources_ = input.readBool(); + bitField0_ |= 0x00010000; + break; + } // case 136 + case 154: + { + workerPool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 154 + case 160: + { + lockState_ = input.readEnum(); + bitField0_ |= 0x00040000; + break; + } // case 160 + 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 blueprintCase_ = 0; + private java.lang.Object blueprint_; + + public BlueprintCase getBlueprintCase() { + return BlueprintCase.forNumber(blueprintCase_); + } + + public Builder clearBlueprint() { + blueprintCase_ = 0; + blueprint_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.TerraformBlueprint, + com.google.cloud.config.v1.TerraformBlueprint.Builder, + com.google.cloud.config.v1.TerraformBlueprintOrBuilder> + terraformBlueprintBuilder_; + /** + * + * + *
+     * A blueprint described using Terraform's HashiCorp Configuration Language
+     * as a root module.
+     * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + * + * @return Whether the terraformBlueprint field is set. + */ + @java.lang.Override + public boolean hasTerraformBlueprint() { + return blueprintCase_ == 6; + } + /** + * + * + *
+     * A blueprint described using Terraform's HashiCorp Configuration Language
+     * as a root module.
+     * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + * + * @return The terraformBlueprint. + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprint getTerraformBlueprint() { + if (terraformBlueprintBuilder_ == null) { + if (blueprintCase_ == 6) { + return (com.google.cloud.config.v1.TerraformBlueprint) blueprint_; + } + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } else { + if (blueprintCase_ == 6) { + return terraformBlueprintBuilder_.getMessage(); + } + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + } + /** + * + * + *
+     * A blueprint described using Terraform's HashiCorp Configuration Language
+     * as a root module.
+     * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + */ + public Builder setTerraformBlueprint(com.google.cloud.config.v1.TerraformBlueprint value) { + if (terraformBlueprintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + blueprint_ = value; + onChanged(); + } else { + terraformBlueprintBuilder_.setMessage(value); + } + blueprintCase_ = 6; + return this; + } + /** + * + * + *
+     * A blueprint described using Terraform's HashiCorp Configuration Language
+     * as a root module.
+     * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + */ + public Builder setTerraformBlueprint( + com.google.cloud.config.v1.TerraformBlueprint.Builder builderForValue) { + if (terraformBlueprintBuilder_ == null) { + blueprint_ = builderForValue.build(); + onChanged(); + } else { + terraformBlueprintBuilder_.setMessage(builderForValue.build()); + } + blueprintCase_ = 6; + return this; + } + /** + * + * + *
+     * A blueprint described using Terraform's HashiCorp Configuration Language
+     * as a root module.
+     * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + */ + public Builder mergeTerraformBlueprint(com.google.cloud.config.v1.TerraformBlueprint value) { + if (terraformBlueprintBuilder_ == null) { + if (blueprintCase_ == 6 + && blueprint_ != com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance()) { + blueprint_ = + com.google.cloud.config.v1.TerraformBlueprint.newBuilder( + (com.google.cloud.config.v1.TerraformBlueprint) blueprint_) + .mergeFrom(value) + .buildPartial(); + } else { + blueprint_ = value; + } + onChanged(); + } else { + if (blueprintCase_ == 6) { + terraformBlueprintBuilder_.mergeFrom(value); + } else { + terraformBlueprintBuilder_.setMessage(value); + } + } + blueprintCase_ = 6; + return this; + } + /** + * + * + *
+     * A blueprint described using Terraform's HashiCorp Configuration Language
+     * as a root module.
+     * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + */ + public Builder clearTerraformBlueprint() { + if (terraformBlueprintBuilder_ == null) { + if (blueprintCase_ == 6) { + blueprintCase_ = 0; + blueprint_ = null; + onChanged(); + } + } else { + if (blueprintCase_ == 6) { + blueprintCase_ = 0; + blueprint_ = null; + } + terraformBlueprintBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A blueprint described using Terraform's HashiCorp Configuration Language
+     * as a root module.
+     * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + */ + public com.google.cloud.config.v1.TerraformBlueprint.Builder getTerraformBlueprintBuilder() { + return getTerraformBlueprintFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A blueprint described using Terraform's HashiCorp Configuration Language
+     * as a root module.
+     * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprintOrBuilder getTerraformBlueprintOrBuilder() { + if ((blueprintCase_ == 6) && (terraformBlueprintBuilder_ != null)) { + return terraformBlueprintBuilder_.getMessageOrBuilder(); + } else { + if (blueprintCase_ == 6) { + return (com.google.cloud.config.v1.TerraformBlueprint) blueprint_; + } + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + } + /** + * + * + *
+     * A blueprint described using Terraform's HashiCorp Configuration Language
+     * as a root module.
+     * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.TerraformBlueprint, + com.google.cloud.config.v1.TerraformBlueprint.Builder, + com.google.cloud.config.v1.TerraformBlueprintOrBuilder> + getTerraformBlueprintFieldBuilder() { + if (terraformBlueprintBuilder_ == null) { + if (!(blueprintCase_ == 6)) { + blueprint_ = com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + terraformBlueprintBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.TerraformBlueprint, + com.google.cloud.config.v1.TerraformBlueprint.Builder, + com.google.cloud.config.v1.TerraformBlueprintOrBuilder>( + (com.google.cloud.config.v1.TerraformBlueprint) blueprint_, + getParentForChildren(), + isClean()); + blueprint_ = null; + } + blueprintCase_ = 6; + onChanged(); + return terraformBlueprintBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name of the deployment.
+     * Format: `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Resource name of the deployment.
+     * Format: `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Resource name of the deployment.
+     * Format: `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the deployment.
+     * Format: `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the deployment.
+     * Format: `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the deployment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Time when the deployment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the deployment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the deployment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the deployment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the deployment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the deployment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the deployment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the deployment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the deployment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Time when the deployment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the deployment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the deployment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the deployment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the deployment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the deployment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the deployment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the deployment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * User-defined metadata for the deployment.
+     * 
+ * + * map<string, string> labels = 4; + */ + @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(); + } + /** + * + * + *
+     * User-defined metadata for the deployment.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * User-defined metadata for the deployment.
+     * 
+ * + * map<string, string> labels = 4; + */ + @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; + } + /** + * + * + *
+     * User-defined metadata for the deployment.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * User-defined metadata for the deployment.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * User-defined metadata for the deployment.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
+     * User-defined metadata for the deployment.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current state of the deployment.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. Current state of the deployment.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the deployment.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.config.v1.Deployment.State getState() { + com.google.cloud.config.v1.Deployment.State result = + com.google.cloud.config.v1.Deployment.State.forNumber(state_); + return result == null ? com.google.cloud.config.v1.Deployment.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current state of the deployment.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.config.v1.Deployment.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the deployment.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object latestRevision_ = ""; + /** + * + * + *
+     * Output only. Revision name that was most recently applied.
+     * Format: `projects/{project}/locations/{location}/deployments/{deployment}/
+     * revisions/{revision}`
+     * 
+ * + * string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The latestRevision. + */ + public java.lang.String getLatestRevision() { + java.lang.Object ref = latestRevision_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + latestRevision_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Revision name that was most recently applied.
+     * Format: `projects/{project}/locations/{location}/deployments/{deployment}/
+     * revisions/{revision}`
+     * 
+ * + * string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for latestRevision. + */ + public com.google.protobuf.ByteString getLatestRevisionBytes() { + java.lang.Object ref = latestRevision_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + latestRevision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Revision name that was most recently applied.
+     * Format: `projects/{project}/locations/{location}/deployments/{deployment}/
+     * revisions/{revision}`
+     * 
+ * + * string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The latestRevision to set. + * @return This builder for chaining. + */ + public Builder setLatestRevision(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + latestRevision_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Revision name that was most recently applied.
+     * Format: `projects/{project}/locations/{location}/deployments/{deployment}/
+     * revisions/{revision}`
+     * 
+ * + * string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLatestRevision() { + latestRevision_ = getDefaultInstance().getLatestRevision(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Revision name that was most recently applied.
+     * Format: `projects/{project}/locations/{location}/deployments/{deployment}/
+     * revisions/{revision}`
+     * 
+ * + * string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for latestRevision to set. + * @return This builder for chaining. + */ + public Builder setLatestRevisionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + latestRevision_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object stateDetail_ = ""; + /** + * + * + *
+     * Output only. Additional information regarding the current state.
+     * 
+ * + * string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDetail. + */ + public java.lang.String getStateDetail() { + java.lang.Object ref = stateDetail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateDetail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Additional information regarding the current state.
+     * 
+ * + * string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDetail. + */ + public com.google.protobuf.ByteString getStateDetailBytes() { + java.lang.Object ref = stateDetail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Additional information regarding the current state.
+     * 
+ * + * string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The stateDetail to set. + * @return This builder for chaining. + */ + public Builder setStateDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stateDetail_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information regarding the current state.
+     * 
+ * + * string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStateDetail() { + stateDetail_ = getDefaultInstance().getStateDetail(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information regarding the current state.
+     * 
+ * + * string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for stateDetail to set. + * @return This builder for chaining. + */ + public Builder setStateDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stateDetail_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int errorCode_ = 0; + /** + * + * + *
+     * Output only. Error code describing errors that may have occurred.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for errorCode. + */ + @java.lang.Override + public int getErrorCodeValue() { + return errorCode_; + } + /** + * + * + *
+     * Output only. Error code describing errors that may have occurred.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for errorCode to set. + * @return This builder for chaining. + */ + public Builder setErrorCodeValue(int value) { + errorCode_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Error code describing errors that may have occurred.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The errorCode. + */ + @java.lang.Override + public com.google.cloud.config.v1.Deployment.ErrorCode getErrorCode() { + com.google.cloud.config.v1.Deployment.ErrorCode result = + com.google.cloud.config.v1.Deployment.ErrorCode.forNumber(errorCode_); + return result == null ? com.google.cloud.config.v1.Deployment.ErrorCode.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Error code describing errors that may have occurred.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The errorCode to set. + * @return This builder for chaining. + */ + public Builder setErrorCode(com.google.cloud.config.v1.Deployment.ErrorCode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + errorCode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Error code describing errors that may have occurred.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearErrorCode() { + bitField0_ = (bitField0_ & ~0x00000100); + errorCode_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.config.v1.ApplyResults deleteResults_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ApplyResults, + com.google.cloud.config.v1.ApplyResults.Builder, + com.google.cloud.config.v1.ApplyResultsOrBuilder> + deleteResultsBuilder_; + /** + * + * + *
+     * Output only. Location of artifacts from a DeleteDeployment operation.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteResults field is set. + */ + public boolean hasDeleteResults() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Output only. Location of artifacts from a DeleteDeployment operation.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteResults. + */ + public com.google.cloud.config.v1.ApplyResults getDeleteResults() { + if (deleteResultsBuilder_ == null) { + return deleteResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : deleteResults_; + } else { + return deleteResultsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Location of artifacts from a DeleteDeployment operation.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteResults(com.google.cloud.config.v1.ApplyResults value) { + if (deleteResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deleteResults_ = value; + } else { + deleteResultsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of artifacts from a DeleteDeployment operation.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeleteResults( + com.google.cloud.config.v1.ApplyResults.Builder builderForValue) { + if (deleteResultsBuilder_ == null) { + deleteResults_ = builderForValue.build(); + } else { + deleteResultsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of artifacts from a DeleteDeployment operation.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeleteResults(com.google.cloud.config.v1.ApplyResults value) { + if (deleteResultsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && deleteResults_ != null + && deleteResults_ != com.google.cloud.config.v1.ApplyResults.getDefaultInstance()) { + getDeleteResultsBuilder().mergeFrom(value); + } else { + deleteResults_ = value; + } + } else { + deleteResultsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of artifacts from a DeleteDeployment operation.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeleteResults() { + bitField0_ = (bitField0_ & ~0x00000200); + deleteResults_ = null; + if (deleteResultsBuilder_ != null) { + deleteResultsBuilder_.dispose(); + deleteResultsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of artifacts from a DeleteDeployment operation.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.ApplyResults.Builder getDeleteResultsBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getDeleteResultsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Location of artifacts from a DeleteDeployment operation.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.ApplyResultsOrBuilder getDeleteResultsOrBuilder() { + if (deleteResultsBuilder_ != null) { + return deleteResultsBuilder_.getMessageOrBuilder(); + } else { + return deleteResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : deleteResults_; + } + } + /** + * + * + *
+     * Output only. Location of artifacts from a DeleteDeployment operation.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ApplyResults, + com.google.cloud.config.v1.ApplyResults.Builder, + com.google.cloud.config.v1.ApplyResultsOrBuilder> + getDeleteResultsFieldBuilder() { + if (deleteResultsBuilder_ == null) { + deleteResultsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ApplyResults, + com.google.cloud.config.v1.ApplyResults.Builder, + com.google.cloud.config.v1.ApplyResultsOrBuilder>( + getDeleteResults(), getParentForChildren(), isClean()); + deleteResults_ = null; + } + return deleteResultsBuilder_; + } + + private java.lang.Object deleteBuild_ = ""; + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with deleting this
+     * deployment.
+     * 
+ * + * string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleteBuild. + */ + public java.lang.String getDeleteBuild() { + java.lang.Object ref = deleteBuild_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deleteBuild_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with deleting this
+     * deployment.
+     * 
+ * + * string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deleteBuild. + */ + public com.google.protobuf.ByteString getDeleteBuildBytes() { + java.lang.Object ref = deleteBuild_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deleteBuild_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with deleting this
+     * deployment.
+     * 
+ * + * string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The deleteBuild to set. + * @return This builder for chaining. + */ + public Builder setDeleteBuild(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deleteBuild_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with deleting this
+     * deployment.
+     * 
+ * + * string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDeleteBuild() { + deleteBuild_ = getDefaultInstance().getDeleteBuild(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with deleting this
+     * deployment.
+     * 
+ * + * string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for deleteBuild to set. + * @return This builder for chaining. + */ + public Builder setDeleteBuildBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deleteBuild_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object deleteLogs_ = ""; + /** + * + * + *
+     * Output only. Location of Cloud Build logs in Google Cloud Storage,
+     * populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleteLogs. + */ + public java.lang.String getDeleteLogs() { + java.lang.Object ref = deleteLogs_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deleteLogs_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Location of Cloud Build logs in Google Cloud Storage,
+     * populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deleteLogs. + */ + public com.google.protobuf.ByteString getDeleteLogsBytes() { + java.lang.Object ref = deleteLogs_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deleteLogs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Location of Cloud Build logs in Google Cloud Storage,
+     * populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The deleteLogs to set. + * @return This builder for chaining. + */ + public Builder setDeleteLogs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deleteLogs_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of Cloud Build logs in Google Cloud Storage,
+     * populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDeleteLogs() { + deleteLogs_ = getDefaultInstance().getDeleteLogs(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of Cloud Build logs in Google Cloud Storage,
+     * populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for deleteLogs to set. + * @return This builder for chaining. + */ + public Builder setDeleteLogsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deleteLogs_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.util.List tfErrors_ = + java.util.Collections.emptyList(); + + private void ensureTfErrorsIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + tfErrors_ = new java.util.ArrayList(tfErrors_); + bitField0_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.TerraformError, + com.google.cloud.config.v1.TerraformError.Builder, + com.google.cloud.config.v1.TerraformErrorOrBuilder> + tfErrorsBuilder_; + + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getTfErrorsList() { + if (tfErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tfErrors_); + } else { + return tfErrorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getTfErrorsCount() { + if (tfErrorsBuilder_ == null) { + return tfErrors_.size(); + } else { + return tfErrorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformError getTfErrors(int index) { + if (tfErrorsBuilder_ == null) { + return tfErrors_.get(index); + } else { + return tfErrorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTfErrors(int index, com.google.cloud.config.v1.TerraformError value) { + if (tfErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTfErrorsIsMutable(); + tfErrors_.set(index, value); + onChanged(); + } else { + tfErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTfErrors( + int index, com.google.cloud.config.v1.TerraformError.Builder builderForValue) { + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + tfErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + tfErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTfErrors(com.google.cloud.config.v1.TerraformError value) { + if (tfErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTfErrorsIsMutable(); + tfErrors_.add(value); + onChanged(); + } else { + tfErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTfErrors(int index, com.google.cloud.config.v1.TerraformError value) { + if (tfErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTfErrorsIsMutable(); + tfErrors_.add(index, value); + onChanged(); + } else { + tfErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTfErrors(com.google.cloud.config.v1.TerraformError.Builder builderForValue) { + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + tfErrors_.add(builderForValue.build()); + onChanged(); + } else { + tfErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTfErrors( + int index, com.google.cloud.config.v1.TerraformError.Builder builderForValue) { + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + tfErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + tfErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllTfErrors( + java.lang.Iterable values) { + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tfErrors_); + onChanged(); + } else { + tfErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTfErrors() { + if (tfErrorsBuilder_ == null) { + tfErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + } else { + tfErrorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeTfErrors(int index) { + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + tfErrors_.remove(index); + onChanged(); + } else { + tfErrorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformError.Builder getTfErrorsBuilder(int index) { + return getTfErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformErrorOrBuilder getTfErrorsOrBuilder(int index) { + if (tfErrorsBuilder_ == null) { + return tfErrors_.get(index); + } else { + return tfErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTfErrorsOrBuilderList() { + if (tfErrorsBuilder_ != null) { + return tfErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tfErrors_); + } + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformError.Builder addTfErrorsBuilder() { + return getTfErrorsFieldBuilder() + .addBuilder(com.google.cloud.config.v1.TerraformError.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformError.Builder addTfErrorsBuilder(int index) { + return getTfErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.config.v1.TerraformError.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Errors encountered when deleting this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTfErrorsBuilderList() { + return getTfErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.TerraformError, + com.google.cloud.config.v1.TerraformError.Builder, + com.google.cloud.config.v1.TerraformErrorOrBuilder> + getTfErrorsFieldBuilder() { + if (tfErrorsBuilder_ == null) { + tfErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.TerraformError, + com.google.cloud.config.v1.TerraformError.Builder, + com.google.cloud.config.v1.TerraformErrorOrBuilder>( + tfErrors_, ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); + tfErrors_ = null; + } + return tfErrorsBuilder_; + } + + private java.lang.Object errorLogs_ = ""; + /** + * + * + *
+     * Output only. Location of Terraform error logs in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorLogs. + */ + public java.lang.String getErrorLogs() { + java.lang.Object ref = errorLogs_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorLogs_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Location of Terraform error logs in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorLogs. + */ + public com.google.protobuf.ByteString getErrorLogsBytes() { + java.lang.Object ref = errorLogs_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorLogs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Location of Terraform error logs in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The errorLogs to set. + * @return This builder for chaining. + */ + public Builder setErrorLogs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + errorLogs_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of Terraform error logs in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearErrorLogs() { + errorLogs_ = getDefaultInstance().getErrorLogs(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of Terraform error logs in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for errorLogs to set. + * @return This builder for chaining. + */ + public Builder setErrorLogsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + errorLogs_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private java.lang.Object artifactsGcsBucket_ = ""; + /** + * + * + *
+     * Optional. User-defined location of Cloud Build logs and artifacts in Google
+     * Cloud Storage. Format: `gs://{bucket}/{folder}`
+     *
+     * A default bucket will be bootstrapped if the field is not set or empty.
+     * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+     * Constraints:
+     * - The bucket needs to be in the same project as the deployment
+     * - The path cannot be within the path of `gcs_source`
+     * - The field cannot be updated, including changing its presence
+     * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the artifactsGcsBucket field is set. + */ + public boolean hasArtifactsGcsBucket() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Optional. User-defined location of Cloud Build logs and artifacts in Google
+     * Cloud Storage. Format: `gs://{bucket}/{folder}`
+     *
+     * A default bucket will be bootstrapped if the field is not set or empty.
+     * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+     * Constraints:
+     * - The bucket needs to be in the same project as the deployment
+     * - The path cannot be within the path of `gcs_source`
+     * - The field cannot be updated, including changing its presence
+     * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The artifactsGcsBucket. + */ + public java.lang.String getArtifactsGcsBucket() { + java.lang.Object ref = artifactsGcsBucket_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactsGcsBucket_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User-defined location of Cloud Build logs and artifacts in Google
+     * Cloud Storage. Format: `gs://{bucket}/{folder}`
+     *
+     * A default bucket will be bootstrapped if the field is not set or empty.
+     * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+     * Constraints:
+     * - The bucket needs to be in the same project as the deployment
+     * - The path cannot be within the path of `gcs_source`
+     * - The field cannot be updated, including changing its presence
+     * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for artifactsGcsBucket. + */ + public com.google.protobuf.ByteString getArtifactsGcsBucketBytes() { + java.lang.Object ref = artifactsGcsBucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactsGcsBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User-defined location of Cloud Build logs and artifacts in Google
+     * Cloud Storage. Format: `gs://{bucket}/{folder}`
+     *
+     * A default bucket will be bootstrapped if the field is not set or empty.
+     * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+     * Constraints:
+     * - The bucket needs to be in the same project as the deployment
+     * - The path cannot be within the path of `gcs_source`
+     * - The field cannot be updated, including changing its presence
+     * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The artifactsGcsBucket to set. + * @return This builder for chaining. + */ + public Builder setArtifactsGcsBucket(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + artifactsGcsBucket_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-defined location of Cloud Build logs and artifacts in Google
+     * Cloud Storage. Format: `gs://{bucket}/{folder}`
+     *
+     * A default bucket will be bootstrapped if the field is not set or empty.
+     * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+     * Constraints:
+     * - The bucket needs to be in the same project as the deployment
+     * - The path cannot be within the path of `gcs_source`
+     * - The field cannot be updated, including changing its presence
+     * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearArtifactsGcsBucket() { + artifactsGcsBucket_ = getDefaultInstance().getArtifactsGcsBucket(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-defined location of Cloud Build logs and artifacts in Google
+     * Cloud Storage. Format: `gs://{bucket}/{folder}`
+     *
+     * A default bucket will be bootstrapped if the field is not set or empty.
+     * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+     * Constraints:
+     * - The bucket needs to be in the same project as the deployment
+     * - The path cannot be within the path of `gcs_source`
+     * - The field cannot be updated, including changing its presence
+     * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for artifactsGcsBucket to set. + * @return This builder for chaining. + */ + public Builder setArtifactsGcsBucketBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + artifactsGcsBucket_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Optional. User-specified Service Account (SA) credentials to be used when
+     * actuating resources.
+     * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the serviceAccount field is set. + */ + public boolean hasServiceAccount() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * Optional. User-specified Service Account (SA) credentials to be used when
+     * actuating resources.
+     * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User-specified Service Account (SA) credentials to be used when
+     * actuating resources.
+     * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User-specified Service Account (SA) credentials to be used when
+     * actuating resources.
+     * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-specified Service Account (SA) credentials to be used when
+     * actuating resources.
+     * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-specified Service Account (SA) credentials to be used when
+     * actuating resources.
+     * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private boolean importExistingResources_; + /** + * + * + *
+     * By default, Infra Manager will return a failure when
+     * Terraform encounters a 409 code (resource conflict error) during actuation.
+     * If this flag is set to true, Infra Manager will instead
+     * attempt to automatically import the resource into the Terraform state (for
+     * supported resource types) and continue actuation.
+     *
+     * Not all resource types are supported, refer to documentation.
+     * 
+ * + * optional bool import_existing_resources = 17; + * + * @return Whether the importExistingResources field is set. + */ + @java.lang.Override + public boolean hasImportExistingResources() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * By default, Infra Manager will return a failure when
+     * Terraform encounters a 409 code (resource conflict error) during actuation.
+     * If this flag is set to true, Infra Manager will instead
+     * attempt to automatically import the resource into the Terraform state (for
+     * supported resource types) and continue actuation.
+     *
+     * Not all resource types are supported, refer to documentation.
+     * 
+ * + * optional bool import_existing_resources = 17; + * + * @return The importExistingResources. + */ + @java.lang.Override + public boolean getImportExistingResources() { + return importExistingResources_; + } + /** + * + * + *
+     * By default, Infra Manager will return a failure when
+     * Terraform encounters a 409 code (resource conflict error) during actuation.
+     * If this flag is set to true, Infra Manager will instead
+     * attempt to automatically import the resource into the Terraform state (for
+     * supported resource types) and continue actuation.
+     *
+     * Not all resource types are supported, refer to documentation.
+     * 
+ * + * optional bool import_existing_resources = 17; + * + * @param value The importExistingResources to set. + * @return This builder for chaining. + */ + public Builder setImportExistingResources(boolean value) { + + importExistingResources_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * By default, Infra Manager will return a failure when
+     * Terraform encounters a 409 code (resource conflict error) during actuation.
+     * If this flag is set to true, Infra Manager will instead
+     * attempt to automatically import the resource into the Terraform state (for
+     * supported resource types) and continue actuation.
+     *
+     * Not all resource types are supported, refer to documentation.
+     * 
+ * + * optional bool import_existing_resources = 17; + * + * @return This builder for chaining. + */ + public Builder clearImportExistingResources() { + bitField0_ = (bitField0_ & ~0x00010000); + importExistingResources_ = false; + onChanged(); + return this; + } + + private java.lang.Object workerPool_ = ""; + /** + * + * + *
+     * Optional. The user-specified Cloud Build worker pool resource in which the
+     * Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the workerPool field is set. + */ + public boolean hasWorkerPool() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * + * + *
+     * Optional. The user-specified Cloud Build worker pool resource in which the
+     * Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The workerPool. + */ + public java.lang.String getWorkerPool() { + java.lang.Object ref = workerPool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workerPool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The user-specified Cloud Build worker pool resource in which the
+     * Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for workerPool. + */ + public com.google.protobuf.ByteString getWorkerPoolBytes() { + java.lang.Object ref = workerPool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workerPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The user-specified Cloud Build worker pool resource in which the
+     * Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The workerPool to set. + * @return This builder for chaining. + */ + public Builder setWorkerPool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + workerPool_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The user-specified Cloud Build worker pool resource in which the
+     * Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearWorkerPool() { + workerPool_ = getDefaultInstance().getWorkerPool(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The user-specified Cloud Build worker pool resource in which the
+     * Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for workerPool to set. + * @return This builder for chaining. + */ + public Builder setWorkerPoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + workerPool_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + private int lockState_ = 0; + /** + * + * + *
+     * Output only. Current lock state of the deployment.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lockState. + */ + @java.lang.Override + public int getLockStateValue() { + return lockState_; + } + /** + * + * + *
+     * Output only. Current lock state of the deployment.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for lockState to set. + * @return This builder for chaining. + */ + public Builder setLockStateValue(int value) { + lockState_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current lock state of the deployment.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lockState. + */ + @java.lang.Override + public com.google.cloud.config.v1.Deployment.LockState getLockState() { + com.google.cloud.config.v1.Deployment.LockState result = + com.google.cloud.config.v1.Deployment.LockState.forNumber(lockState_); + return result == null ? com.google.cloud.config.v1.Deployment.LockState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current lock state of the deployment.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lockState to set. + * @return This builder for chaining. + */ + public Builder setLockState(com.google.cloud.config.v1.Deployment.LockState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00040000; + lockState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current lock state of the deployment.
+     * 
+ * + * + * .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLockState() { + bitField0_ = (bitField0_ & ~0x00040000); + lockState_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.Deployment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.Deployment) + private static final com.google.cloud.config.v1.Deployment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.Deployment(); + } + + public static com.google.cloud.config.v1.Deployment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Deployment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.Deployment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentName.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentName.java new file mode 100644 index 000000000000..272e3736d1eb --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentName.java @@ -0,0 +1,223 @@ +/* + * 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.cloud.config.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DeploymentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DEPLOYMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deployments/{deployment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String deployment; + + @Deprecated + protected DeploymentName() { + project = null; + location = null; + deployment = null; + } + + private DeploymentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deployment = Preconditions.checkNotNull(builder.getDeployment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeployment() { + return deployment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DeploymentName of(String project, String location, String deployment) { + return newBuilder().setProject(project).setLocation(location).setDeployment(deployment).build(); + } + + public static String format(String project, String location, String deployment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeployment(deployment) + .build() + .toString(); + } + + public static DeploymentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DEPLOYMENT.validatedMatch( + formattedString, "DeploymentName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("deployment")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DeploymentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DEPLOYMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (deployment != null) { + fieldMapBuilder.put("deployment", deployment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DEPLOYMENT.instantiate( + "project", project, "location", location, "deployment", deployment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DeploymentName that = ((DeploymentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.deployment, that.deployment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(deployment); + return h; + } + + /** Builder for projects/{project}/locations/{location}/deployments/{deployment}. */ + public static class Builder { + private String project; + private String location; + private String deployment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeployment() { + return deployment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDeployment(String deployment) { + this.deployment = deployment; + return this; + } + + private Builder(DeploymentName deploymentName) { + this.project = deploymentName.project; + this.location = deploymentName.location; + this.deployment = deploymentName.deployment; + } + + public DeploymentName build() { + return new DeploymentName(this); + } + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentOperationMetadata.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentOperationMetadata.java new file mode 100644 index 000000000000..a24eceeca096 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentOperationMetadata.java @@ -0,0 +1,1576 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * Ephemeral metadata content describing the state of a deployment operation.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.DeploymentOperationMetadata} + */ +public final class DeploymentOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.DeploymentOperationMetadata) + DeploymentOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeploymentOperationMetadata.newBuilder() to construct. + private DeploymentOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeploymentOperationMetadata() { + step_ = 0; + build_ = ""; + logs_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeploymentOperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeploymentOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeploymentOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.DeploymentOperationMetadata.class, + com.google.cloud.config.v1.DeploymentOperationMetadata.Builder.class); + } + + /** + * + * + *
+   * The possible steps a deployment may be running.
+   * 
+ * + * Protobuf enum {@code google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep} + */ + public enum DeploymentStep implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified deployment step
+     * 
+ * + * DEPLOYMENT_STEP_UNSPECIFIED = 0; + */ + DEPLOYMENT_STEP_UNSPECIFIED(0), + /** + * + * + *
+     * Infra Manager is creating a Google Cloud Storage bucket to store
+     * artifacts and metadata about the deployment and revision
+     * 
+ * + * PREPARING_STORAGE_BUCKET = 1; + */ + PREPARING_STORAGE_BUCKET(1), + /** + * + * + *
+     * Downloading the blueprint onto the Google Cloud Storage bucket
+     * 
+ * + * DOWNLOADING_BLUEPRINT = 2; + */ + DOWNLOADING_BLUEPRINT(2), + /** + * + * + *
+     * Initializing Terraform using `terraform init`
+     * 
+ * + * RUNNING_TF_INIT = 3; + */ + RUNNING_TF_INIT(3), + /** + * + * + *
+     * Running `terraform plan`
+     * 
+ * + * RUNNING_TF_PLAN = 4; + */ + RUNNING_TF_PLAN(4), + /** + * + * + *
+     * Actuating resources using Terraform using `terraform apply`
+     * 
+ * + * RUNNING_TF_APPLY = 5; + */ + RUNNING_TF_APPLY(5), + /** + * + * + *
+     * Destroying resources using Terraform using `terraform destroy`
+     * 
+ * + * RUNNING_TF_DESTROY = 6; + */ + RUNNING_TF_DESTROY(6), + /** + * + * + *
+     * Validating the uploaded TF state file when unlocking a deployment
+     * 
+ * + * RUNNING_TF_VALIDATE = 7; + */ + RUNNING_TF_VALIDATE(7), + /** + * + * + *
+     * Unlocking a deployment
+     * 
+ * + * UNLOCKING_DEPLOYMENT = 8; + */ + UNLOCKING_DEPLOYMENT(8), + /** + * + * + *
+     * Operation was successful
+     * 
+ * + * SUCCEEDED = 9; + */ + SUCCEEDED(9), + /** + * + * + *
+     * Operation failed
+     * 
+ * + * FAILED = 10; + */ + FAILED(10), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified deployment step
+     * 
+ * + * DEPLOYMENT_STEP_UNSPECIFIED = 0; + */ + public static final int DEPLOYMENT_STEP_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Infra Manager is creating a Google Cloud Storage bucket to store
+     * artifacts and metadata about the deployment and revision
+     * 
+ * + * PREPARING_STORAGE_BUCKET = 1; + */ + public static final int PREPARING_STORAGE_BUCKET_VALUE = 1; + /** + * + * + *
+     * Downloading the blueprint onto the Google Cloud Storage bucket
+     * 
+ * + * DOWNLOADING_BLUEPRINT = 2; + */ + public static final int DOWNLOADING_BLUEPRINT_VALUE = 2; + /** + * + * + *
+     * Initializing Terraform using `terraform init`
+     * 
+ * + * RUNNING_TF_INIT = 3; + */ + public static final int RUNNING_TF_INIT_VALUE = 3; + /** + * + * + *
+     * Running `terraform plan`
+     * 
+ * + * RUNNING_TF_PLAN = 4; + */ + public static final int RUNNING_TF_PLAN_VALUE = 4; + /** + * + * + *
+     * Actuating resources using Terraform using `terraform apply`
+     * 
+ * + * RUNNING_TF_APPLY = 5; + */ + public static final int RUNNING_TF_APPLY_VALUE = 5; + /** + * + * + *
+     * Destroying resources using Terraform using `terraform destroy`
+     * 
+ * + * RUNNING_TF_DESTROY = 6; + */ + public static final int RUNNING_TF_DESTROY_VALUE = 6; + /** + * + * + *
+     * Validating the uploaded TF state file when unlocking a deployment
+     * 
+ * + * RUNNING_TF_VALIDATE = 7; + */ + public static final int RUNNING_TF_VALIDATE_VALUE = 7; + /** + * + * + *
+     * Unlocking a deployment
+     * 
+ * + * UNLOCKING_DEPLOYMENT = 8; + */ + public static final int UNLOCKING_DEPLOYMENT_VALUE = 8; + /** + * + * + *
+     * Operation was successful
+     * 
+ * + * SUCCEEDED = 9; + */ + public static final int SUCCEEDED_VALUE = 9; + /** + * + * + *
+     * Operation failed
+     * 
+ * + * FAILED = 10; + */ + public static final int FAILED_VALUE = 10; + + 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 DeploymentStep 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 DeploymentStep forNumber(int value) { + switch (value) { + case 0: + return DEPLOYMENT_STEP_UNSPECIFIED; + case 1: + return PREPARING_STORAGE_BUCKET; + case 2: + return DOWNLOADING_BLUEPRINT; + case 3: + return RUNNING_TF_INIT; + case 4: + return RUNNING_TF_PLAN; + case 5: + return RUNNING_TF_APPLY; + case 6: + return RUNNING_TF_DESTROY; + case 7: + return RUNNING_TF_VALIDATE; + case 8: + return UNLOCKING_DEPLOYMENT; + case 9: + return SUCCEEDED; + case 10: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DeploymentStep findValueByNumber(int number) { + return DeploymentStep.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.config.v1.DeploymentOperationMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DeploymentStep[] VALUES = values(); + + public static DeploymentStep 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 DeploymentStep(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep) + } + + public static final int STEP_FIELD_NUMBER = 1; + private int step_ = 0; + /** + * + * + *
+   * The current step the deployment operation is running.
+   * 
+ * + * .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; + * + * @return The enum numeric value on the wire for step. + */ + @java.lang.Override + public int getStepValue() { + return step_; + } + /** + * + * + *
+   * The current step the deployment operation is running.
+   * 
+ * + * .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; + * + * @return The step. + */ + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep getStep() { + com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep result = + com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep.forNumber(step_); + return result == null + ? com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep.UNRECOGNIZED + : result; + } + + public static final int APPLY_RESULTS_FIELD_NUMBER = 2; + private com.google.cloud.config.v1.ApplyResults applyResults_; + /** + * + * + *
+   * Outputs and artifacts from applying a deployment.
+   * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + * + * @return Whether the applyResults field is set. + */ + @java.lang.Override + public boolean hasApplyResults() { + return applyResults_ != null; + } + /** + * + * + *
+   * Outputs and artifacts from applying a deployment.
+   * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + * + * @return The applyResults. + */ + @java.lang.Override + public com.google.cloud.config.v1.ApplyResults getApplyResults() { + return applyResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : applyResults_; + } + /** + * + * + *
+   * Outputs and artifacts from applying a deployment.
+   * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + */ + @java.lang.Override + public com.google.cloud.config.v1.ApplyResultsOrBuilder getApplyResultsOrBuilder() { + return applyResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : applyResults_; + } + + public static final int BUILD_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object build_ = ""; + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with this operation.
+   * 
+ * + * string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The build. + */ + @java.lang.Override + public java.lang.String getBuild() { + java.lang.Object ref = build_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + build_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with this operation.
+   * 
+ * + * string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for build. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBuildBytes() { + java.lang.Object ref = build_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + build_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object logs_ = ""; + /** + * + * + *
+   * Output only. Location of Deployment operations logs in
+   * `gs://{bucket}/{object}` format.
+   * 
+ * + * string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logs. + */ + @java.lang.Override + public java.lang.String getLogs() { + java.lang.Object ref = logs_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logs_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Location of Deployment operations logs in
+   * `gs://{bucket}/{object}` format.
+   * 
+ * + * string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for logs. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLogsBytes() { + java.lang.Object ref = logs_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logs_ = 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 (step_ + != com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep + .DEPLOYMENT_STEP_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, step_); + } + if (applyResults_ != null) { + output.writeMessage(2, getApplyResults()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(build_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, build_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logs_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, logs_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (step_ + != com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep + .DEPLOYMENT_STEP_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, step_); + } + if (applyResults_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getApplyResults()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(build_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, build_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logs_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, logs_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.DeploymentOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.config.v1.DeploymentOperationMetadata other = + (com.google.cloud.config.v1.DeploymentOperationMetadata) obj; + + if (step_ != other.step_) return false; + if (hasApplyResults() != other.hasApplyResults()) return false; + if (hasApplyResults()) { + if (!getApplyResults().equals(other.getApplyResults())) return false; + } + if (!getBuild().equals(other.getBuild())) return false; + if (!getLogs().equals(other.getLogs())) 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) + STEP_FIELD_NUMBER; + hash = (53 * hash) + step_; + if (hasApplyResults()) { + hash = (37 * hash) + APPLY_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getApplyResults().hashCode(); + } + hash = (37 * hash) + BUILD_FIELD_NUMBER; + hash = (53 * hash) + getBuild().hashCode(); + hash = (37 * hash) + LOGS_FIELD_NUMBER; + hash = (53 * hash) + getLogs().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.config.v1.DeploymentOperationMetadata 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; + } + /** + * + * + *
+   * Ephemeral metadata content describing the state of a deployment operation.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.DeploymentOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.DeploymentOperationMetadata) + com.google.cloud.config.v1.DeploymentOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeploymentOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeploymentOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.DeploymentOperationMetadata.class, + com.google.cloud.config.v1.DeploymentOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.config.v1.DeploymentOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + step_ = 0; + applyResults_ = null; + if (applyResultsBuilder_ != null) { + applyResultsBuilder_.dispose(); + applyResultsBuilder_ = null; + } + build_ = ""; + logs_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_DeploymentOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.config.v1.DeploymentOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOperationMetadata build() { + com.google.cloud.config.v1.DeploymentOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOperationMetadata buildPartial() { + com.google.cloud.config.v1.DeploymentOperationMetadata result = + new com.google.cloud.config.v1.DeploymentOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.DeploymentOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.step_ = step_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.applyResults_ = + applyResultsBuilder_ == null ? applyResults_ : applyResultsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.build_ = build_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + 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.cloud.config.v1.DeploymentOperationMetadata) { + return mergeFrom((com.google.cloud.config.v1.DeploymentOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.DeploymentOperationMetadata other) { + if (other == com.google.cloud.config.v1.DeploymentOperationMetadata.getDefaultInstance()) + return this; + if (other.step_ != 0) { + setStepValue(other.getStepValue()); + } + if (other.hasApplyResults()) { + mergeApplyResults(other.getApplyResults()); + } + if (!other.getBuild().isEmpty()) { + build_ = other.build_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getLogs().isEmpty()) { + logs_ = other.logs_; + 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 8: + { + step_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getApplyResultsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + build_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + logs_ = 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 int step_ = 0; + /** + * + * + *
+     * The current step the deployment operation is running.
+     * 
+ * + * .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; + * + * @return The enum numeric value on the wire for step. + */ + @java.lang.Override + public int getStepValue() { + return step_; + } + /** + * + * + *
+     * The current step the deployment operation is running.
+     * 
+ * + * .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; + * + * @param value The enum numeric value on the wire for step to set. + * @return This builder for chaining. + */ + public Builder setStepValue(int value) { + step_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The current step the deployment operation is running.
+     * 
+ * + * .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; + * + * @return The step. + */ + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep getStep() { + com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep result = + com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep.forNumber(step_); + return result == null + ? com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The current step the deployment operation is running.
+     * 
+ * + * .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; + * + * @param value The step to set. + * @return This builder for chaining. + */ + public Builder setStep( + com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + step_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current step the deployment operation is running.
+     * 
+ * + * .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; + * + * @return This builder for chaining. + */ + public Builder clearStep() { + bitField0_ = (bitField0_ & ~0x00000001); + step_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.config.v1.ApplyResults applyResults_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ApplyResults, + com.google.cloud.config.v1.ApplyResults.Builder, + com.google.cloud.config.v1.ApplyResultsOrBuilder> + applyResultsBuilder_; + /** + * + * + *
+     * Outputs and artifacts from applying a deployment.
+     * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + * + * @return Whether the applyResults field is set. + */ + public boolean hasApplyResults() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Outputs and artifacts from applying a deployment.
+     * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + * + * @return The applyResults. + */ + public com.google.cloud.config.v1.ApplyResults getApplyResults() { + if (applyResultsBuilder_ == null) { + return applyResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : applyResults_; + } else { + return applyResultsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Outputs and artifacts from applying a deployment.
+     * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + */ + public Builder setApplyResults(com.google.cloud.config.v1.ApplyResults value) { + if (applyResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + applyResults_ = value; + } else { + applyResultsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Outputs and artifacts from applying a deployment.
+     * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + */ + public Builder setApplyResults( + com.google.cloud.config.v1.ApplyResults.Builder builderForValue) { + if (applyResultsBuilder_ == null) { + applyResults_ = builderForValue.build(); + } else { + applyResultsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Outputs and artifacts from applying a deployment.
+     * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + */ + public Builder mergeApplyResults(com.google.cloud.config.v1.ApplyResults value) { + if (applyResultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && applyResults_ != null + && applyResults_ != com.google.cloud.config.v1.ApplyResults.getDefaultInstance()) { + getApplyResultsBuilder().mergeFrom(value); + } else { + applyResults_ = value; + } + } else { + applyResultsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Outputs and artifacts from applying a deployment.
+     * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + */ + public Builder clearApplyResults() { + bitField0_ = (bitField0_ & ~0x00000002); + applyResults_ = null; + if (applyResultsBuilder_ != null) { + applyResultsBuilder_.dispose(); + applyResultsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Outputs and artifacts from applying a deployment.
+     * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + */ + public com.google.cloud.config.v1.ApplyResults.Builder getApplyResultsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getApplyResultsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Outputs and artifacts from applying a deployment.
+     * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + */ + public com.google.cloud.config.v1.ApplyResultsOrBuilder getApplyResultsOrBuilder() { + if (applyResultsBuilder_ != null) { + return applyResultsBuilder_.getMessageOrBuilder(); + } else { + return applyResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : applyResults_; + } + } + /** + * + * + *
+     * Outputs and artifacts from applying a deployment.
+     * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ApplyResults, + com.google.cloud.config.v1.ApplyResults.Builder, + com.google.cloud.config.v1.ApplyResultsOrBuilder> + getApplyResultsFieldBuilder() { + if (applyResultsBuilder_ == null) { + applyResultsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ApplyResults, + com.google.cloud.config.v1.ApplyResults.Builder, + com.google.cloud.config.v1.ApplyResultsOrBuilder>( + getApplyResults(), getParentForChildren(), isClean()); + applyResults_ = null; + } + return applyResultsBuilder_; + } + + private java.lang.Object build_ = ""; + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with this operation.
+     * 
+ * + * string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The build. + */ + public java.lang.String getBuild() { + java.lang.Object ref = build_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + build_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with this operation.
+     * 
+ * + * string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for build. + */ + public com.google.protobuf.ByteString getBuildBytes() { + java.lang.Object ref = build_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + build_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with this operation.
+     * 
+ * + * string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The build to set. + * @return This builder for chaining. + */ + public Builder setBuild(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + build_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with this operation.
+     * 
+ * + * string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBuild() { + build_ = getDefaultInstance().getBuild(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with this operation.
+     * 
+ * + * string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for build to set. + * @return This builder for chaining. + */ + public Builder setBuildBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + build_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object logs_ = ""; + /** + * + * + *
+     * Output only. Location of Deployment operations logs in
+     * `gs://{bucket}/{object}` format.
+     * 
+ * + * string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logs. + */ + public java.lang.String getLogs() { + java.lang.Object ref = logs_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logs_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Location of Deployment operations logs in
+     * `gs://{bucket}/{object}` format.
+     * 
+ * + * string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for logs. + */ + public com.google.protobuf.ByteString getLogsBytes() { + java.lang.Object ref = logs_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Location of Deployment operations logs in
+     * `gs://{bucket}/{object}` format.
+     * 
+ * + * string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The logs to set. + * @return This builder for chaining. + */ + public Builder setLogs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + logs_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of Deployment operations logs in
+     * `gs://{bucket}/{object}` format.
+     * 
+ * + * string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLogs() { + logs_ = getDefaultInstance().getLogs(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of Deployment operations logs in
+     * `gs://{bucket}/{object}` format.
+     * 
+ * + * string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for logs to set. + * @return This builder for chaining. + */ + public Builder setLogsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + logs_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.DeploymentOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.DeploymentOperationMetadata) + private static final com.google.cloud.config.v1.DeploymentOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.DeploymentOperationMetadata(); + } + + public static com.google.cloud.config.v1.DeploymentOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeploymentOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentOperationMetadataOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..bc34abf3a8fe --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentOperationMetadataOrBuilder.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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface DeploymentOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.DeploymentOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The current step the deployment operation is running.
+   * 
+ * + * .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; + * + * @return The enum numeric value on the wire for step. + */ + int getStepValue(); + /** + * + * + *
+   * The current step the deployment operation is running.
+   * 
+ * + * .google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep step = 1; + * + * @return The step. + */ + com.google.cloud.config.v1.DeploymentOperationMetadata.DeploymentStep getStep(); + + /** + * + * + *
+   * Outputs and artifacts from applying a deployment.
+   * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + * + * @return Whether the applyResults field is set. + */ + boolean hasApplyResults(); + /** + * + * + *
+   * Outputs and artifacts from applying a deployment.
+   * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + * + * @return The applyResults. + */ + com.google.cloud.config.v1.ApplyResults getApplyResults(); + /** + * + * + *
+   * Outputs and artifacts from applying a deployment.
+   * 
+ * + * .google.cloud.config.v1.ApplyResults apply_results = 2; + */ + com.google.cloud.config.v1.ApplyResultsOrBuilder getApplyResultsOrBuilder(); + + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with this operation.
+   * 
+ * + * string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The build. + */ + java.lang.String getBuild(); + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with this operation.
+   * 
+ * + * string build = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for build. + */ + com.google.protobuf.ByteString getBuildBytes(); + + /** + * + * + *
+   * Output only. Location of Deployment operations logs in
+   * `gs://{bucket}/{object}` format.
+   * 
+ * + * string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logs. + */ + java.lang.String getLogs(); + /** + * + * + *
+   * Output only. Location of Deployment operations logs in
+   * `gs://{bucket}/{object}` format.
+   * 
+ * + * string logs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for logs. + */ + com.google.protobuf.ByteString getLogsBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentOrBuilder.java new file mode 100644 index 000000000000..200dde682396 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/DeploymentOrBuilder.java @@ -0,0 +1,766 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface DeploymentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.Deployment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A blueprint described using Terraform's HashiCorp Configuration Language
+   * as a root module.
+   * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + * + * @return Whether the terraformBlueprint field is set. + */ + boolean hasTerraformBlueprint(); + /** + * + * + *
+   * A blueprint described using Terraform's HashiCorp Configuration Language
+   * as a root module.
+   * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + * + * @return The terraformBlueprint. + */ + com.google.cloud.config.v1.TerraformBlueprint getTerraformBlueprint(); + /** + * + * + *
+   * A blueprint described using Terraform's HashiCorp Configuration Language
+   * as a root module.
+   * 
+ * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6; + */ + com.google.cloud.config.v1.TerraformBlueprintOrBuilder getTerraformBlueprintOrBuilder(); + + /** + * + * + *
+   * Resource name of the deployment.
+   * Format: `projects/{project}/locations/{location}/deployments/{deployment}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name of the deployment.
+   * Format: `projects/{project}/locations/{location}/deployments/{deployment}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when the deployment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the deployment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the deployment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the deployment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the deployment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the deployment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * User-defined metadata for the deployment.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * User-defined metadata for the deployment.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * User-defined metadata for the deployment.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * User-defined metadata for the deployment.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * User-defined metadata for the deployment.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Current state of the deployment.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current state of the deployment.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.config.v1.Deployment.State getState(); + + /** + * + * + *
+   * Output only. Revision name that was most recently applied.
+   * Format: `projects/{project}/locations/{location}/deployments/{deployment}/
+   * revisions/{revision}`
+   * 
+ * + * string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The latestRevision. + */ + java.lang.String getLatestRevision(); + /** + * + * + *
+   * Output only. Revision name that was most recently applied.
+   * Format: `projects/{project}/locations/{location}/deployments/{deployment}/
+   * revisions/{revision}`
+   * 
+ * + * string latest_revision = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for latestRevision. + */ + com.google.protobuf.ByteString getLatestRevisionBytes(); + + /** + * + * + *
+   * Output only. Additional information regarding the current state.
+   * 
+ * + * string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDetail. + */ + java.lang.String getStateDetail(); + /** + * + * + *
+   * Output only. Additional information regarding the current state.
+   * 
+ * + * string state_detail = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDetail. + */ + com.google.protobuf.ByteString getStateDetailBytes(); + + /** + * + * + *
+   * Output only. Error code describing errors that may have occurred.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for errorCode. + */ + int getErrorCodeValue(); + /** + * + * + *
+   * Output only. Error code describing errors that may have occurred.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.ErrorCode error_code = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The errorCode. + */ + com.google.cloud.config.v1.Deployment.ErrorCode getErrorCode(); + + /** + * + * + *
+   * Output only. Location of artifacts from a DeleteDeployment operation.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deleteResults field is set. + */ + boolean hasDeleteResults(); + /** + * + * + *
+   * Output only. Location of artifacts from a DeleteDeployment operation.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deleteResults. + */ + com.google.cloud.config.v1.ApplyResults getDeleteResults(); + /** + * + * + *
+   * Output only. Location of artifacts from a DeleteDeployment operation.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults delete_results = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.config.v1.ApplyResultsOrBuilder getDeleteResultsOrBuilder(); + + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with deleting this
+   * deployment.
+   * 
+ * + * string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleteBuild. + */ + java.lang.String getDeleteBuild(); + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with deleting this
+   * deployment.
+   * 
+ * + * string delete_build = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deleteBuild. + */ + com.google.protobuf.ByteString getDeleteBuildBytes(); + + /** + * + * + *
+   * Output only. Location of Cloud Build logs in Google Cloud Storage,
+   * populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleteLogs. + */ + java.lang.String getDeleteLogs(); + /** + * + * + *
+   * Output only. Location of Cloud Build logs in Google Cloud Storage,
+   * populated when deleting this deployment. Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string delete_logs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deleteLogs. + */ + com.google.protobuf.ByteString getDeleteLogsBytes(); + + /** + * + * + *
+   * Output only. Errors encountered when deleting this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getTfErrorsList(); + /** + * + * + *
+   * Output only. Errors encountered when deleting this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.config.v1.TerraformError getTfErrors(int index); + /** + * + * + *
+   * Output only. Errors encountered when deleting this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getTfErrorsCount(); + /** + * + * + *
+   * Output only. Errors encountered when deleting this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getTfErrorsOrBuilderList(); + /** + * + * + *
+   * Output only. Errors encountered when deleting this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.config.v1.TerraformErrorOrBuilder getTfErrorsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Location of Terraform error logs in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorLogs. + */ + java.lang.String getErrorLogs(); + /** + * + * + *
+   * Output only. Location of Terraform error logs in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string error_logs = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorLogs. + */ + com.google.protobuf.ByteString getErrorLogsBytes(); + + /** + * + * + *
+   * Optional. User-defined location of Cloud Build logs and artifacts in Google
+   * Cloud Storage. Format: `gs://{bucket}/{folder}`
+   *
+   * A default bucket will be bootstrapped if the field is not set or empty.
+   * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+   * Constraints:
+   * - The bucket needs to be in the same project as the deployment
+   * - The path cannot be within the path of `gcs_source`
+   * - The field cannot be updated, including changing its presence
+   * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the artifactsGcsBucket field is set. + */ + boolean hasArtifactsGcsBucket(); + /** + * + * + *
+   * Optional. User-defined location of Cloud Build logs and artifacts in Google
+   * Cloud Storage. Format: `gs://{bucket}/{folder}`
+   *
+   * A default bucket will be bootstrapped if the field is not set or empty.
+   * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+   * Constraints:
+   * - The bucket needs to be in the same project as the deployment
+   * - The path cannot be within the path of `gcs_source`
+   * - The field cannot be updated, including changing its presence
+   * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The artifactsGcsBucket. + */ + java.lang.String getArtifactsGcsBucket(); + /** + * + * + *
+   * Optional. User-defined location of Cloud Build logs and artifacts in Google
+   * Cloud Storage. Format: `gs://{bucket}/{folder}`
+   *
+   * A default bucket will be bootstrapped if the field is not set or empty.
+   * Default bucket format: `gs://<project number>-<region>-blueprint-config`
+   * Constraints:
+   * - The bucket needs to be in the same project as the deployment
+   * - The path cannot be within the path of `gcs_source`
+   * - The field cannot be updated, including changing its presence
+   * 
+ * + * optional string artifacts_gcs_bucket = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for artifactsGcsBucket. + */ + com.google.protobuf.ByteString getArtifactsGcsBucketBytes(); + + /** + * + * + *
+   * Optional. User-specified Service Account (SA) credentials to be used when
+   * actuating resources.
+   * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+   * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the serviceAccount field is set. + */ + boolean hasServiceAccount(); + /** + * + * + *
+   * Optional. User-specified Service Account (SA) credentials to be used when
+   * actuating resources.
+   * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+   * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Optional. User-specified Service Account (SA) credentials to be used when
+   * actuating resources.
+   * Format: `projects/{projectID}/serviceAccounts/{serviceAccount}`
+   * 
+ * + * + * optional string service_account = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * By default, Infra Manager will return a failure when
+   * Terraform encounters a 409 code (resource conflict error) during actuation.
+   * If this flag is set to true, Infra Manager will instead
+   * attempt to automatically import the resource into the Terraform state (for
+   * supported resource types) and continue actuation.
+   *
+   * Not all resource types are supported, refer to documentation.
+   * 
+ * + * optional bool import_existing_resources = 17; + * + * @return Whether the importExistingResources field is set. + */ + boolean hasImportExistingResources(); + /** + * + * + *
+   * By default, Infra Manager will return a failure when
+   * Terraform encounters a 409 code (resource conflict error) during actuation.
+   * If this flag is set to true, Infra Manager will instead
+   * attempt to automatically import the resource into the Terraform state (for
+   * supported resource types) and continue actuation.
+   *
+   * Not all resource types are supported, refer to documentation.
+   * 
+ * + * optional bool import_existing_resources = 17; + * + * @return The importExistingResources. + */ + boolean getImportExistingResources(); + + /** + * + * + *
+   * Optional. The user-specified Cloud Build worker pool resource in which the
+   * Cloud Build job will execute. Format:
+   * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+   * If this field is unspecified, the default Cloud Build worker pool will be
+   * used.
+   * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the workerPool field is set. + */ + boolean hasWorkerPool(); + /** + * + * + *
+   * Optional. The user-specified Cloud Build worker pool resource in which the
+   * Cloud Build job will execute. Format:
+   * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+   * If this field is unspecified, the default Cloud Build worker pool will be
+   * used.
+   * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The workerPool. + */ + java.lang.String getWorkerPool(); + /** + * + * + *
+   * Optional. The user-specified Cloud Build worker pool resource in which the
+   * Cloud Build job will execute. Format:
+   * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+   * If this field is unspecified, the default Cloud Build worker pool will be
+   * used.
+   * 
+ * + * + * optional string worker_pool = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for workerPool. + */ + com.google.protobuf.ByteString getWorkerPoolBytes(); + + /** + * + * + *
+   * Output only. Current lock state of the deployment.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lockState. + */ + int getLockStateValue(); + /** + * + * + *
+   * Output only. Current lock state of the deployment.
+   * 
+ * + * + * .google.cloud.config.v1.Deployment.LockState lock_state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lockState. + */ + com.google.cloud.config.v1.Deployment.LockState getLockState(); + + com.google.cloud.config.v1.Deployment.BlueprintCase getBlueprintCase(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportDeploymentStatefileRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportDeploymentStatefileRequest.java new file mode 100644 index 000000000000..625c709a1829 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportDeploymentStatefileRequest.java @@ -0,0 +1,757 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to export a state file passed to a 'ExportDeploymentStatefile'
+ * call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ExportDeploymentStatefileRequest} + */ +public final class ExportDeploymentStatefileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ExportDeploymentStatefileRequest) + ExportDeploymentStatefileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDeploymentStatefileRequest.newBuilder() to construct. + private ExportDeploymentStatefileRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDeploymentStatefileRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportDeploymentStatefileRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportDeploymentStatefileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportDeploymentStatefileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ExportDeploymentStatefileRequest.class, + com.google.cloud.config.v1.ExportDeploymentStatefileRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DRAFT_FIELD_NUMBER = 3; + private boolean draft_ = false; + /** + * + * + *
+   * Optional. If this flag is set to true, the exported deployment state file
+   * will be the draft state. This will enable the draft file to be validated
+   * before copying it over to the working state on unlock.
+   * 
+ * + * bool draft = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The draft. + */ + @java.lang.Override + public boolean getDraft() { + return draft_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (draft_ != false) { + output.writeBool(3, draft_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (draft_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, draft_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ExportDeploymentStatefileRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ExportDeploymentStatefileRequest other = + (com.google.cloud.config.v1.ExportDeploymentStatefileRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getDraft() != other.getDraft()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + DRAFT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDraft()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.config.v1.ExportDeploymentStatefileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to export a state file passed to a 'ExportDeploymentStatefile'
+   * call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ExportDeploymentStatefileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ExportDeploymentStatefileRequest) + com.google.cloud.config.v1.ExportDeploymentStatefileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportDeploymentStatefileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportDeploymentStatefileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ExportDeploymentStatefileRequest.class, + com.google.cloud.config.v1.ExportDeploymentStatefileRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ExportDeploymentStatefileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + draft_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportDeploymentStatefileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportDeploymentStatefileRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.ExportDeploymentStatefileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportDeploymentStatefileRequest build() { + com.google.cloud.config.v1.ExportDeploymentStatefileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportDeploymentStatefileRequest buildPartial() { + com.google.cloud.config.v1.ExportDeploymentStatefileRequest result = + new com.google.cloud.config.v1.ExportDeploymentStatefileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.ExportDeploymentStatefileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.draft_ = draft_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ExportDeploymentStatefileRequest) { + return mergeFrom((com.google.cloud.config.v1.ExportDeploymentStatefileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ExportDeploymentStatefileRequest other) { + if (other == com.google.cloud.config.v1.ExportDeploymentStatefileRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getDraft() != false) { + setDraft(other.getDraft()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + draft_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean draft_; + /** + * + * + *
+     * Optional. If this flag is set to true, the exported deployment state file
+     * will be the draft state. This will enable the draft file to be validated
+     * before copying it over to the working state on unlock.
+     * 
+ * + * bool draft = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The draft. + */ + @java.lang.Override + public boolean getDraft() { + return draft_; + } + /** + * + * + *
+     * Optional. If this flag is set to true, the exported deployment state file
+     * will be the draft state. This will enable the draft file to be validated
+     * before copying it over to the working state on unlock.
+     * 
+ * + * bool draft = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The draft to set. + * @return This builder for chaining. + */ + public Builder setDraft(boolean value) { + + draft_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If this flag is set to true, the exported deployment state file
+     * will be the draft state. This will enable the draft file to be validated
+     * before copying it over to the working state on unlock.
+     * 
+ * + * bool draft = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDraft() { + bitField0_ = (bitField0_ & ~0x00000002); + draft_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ExportDeploymentStatefileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ExportDeploymentStatefileRequest) + private static final com.google.cloud.config.v1.ExportDeploymentStatefileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ExportDeploymentStatefileRequest(); + } + + public static com.google.cloud.config.v1.ExportDeploymentStatefileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDeploymentStatefileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportDeploymentStatefileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportDeploymentStatefileRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportDeploymentStatefileRequestOrBuilder.java new file mode 100644 index 000000000000..546c357e5f6a --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportDeploymentStatefileRequestOrBuilder.java @@ -0,0 +1,73 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ExportDeploymentStatefileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ExportDeploymentStatefileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. If this flag is set to true, the exported deployment state file
+   * will be the draft state. This will enable the draft file to be validated
+   * before copying it over to the working state on unlock.
+   * 
+ * + * bool draft = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The draft. + */ + boolean getDraft(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportLockInfoRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportLockInfoRequest.java new file mode 100644 index 000000000000..f55d6ab125b3 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportLockInfoRequest.java @@ -0,0 +1,645 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to get a state file lock info passed to a 'ExportLockInfo' call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ExportLockInfoRequest} + */ +public final class ExportLockInfoRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ExportLockInfoRequest) + ExportLockInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportLockInfoRequest.newBuilder() to construct. + private ExportLockInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportLockInfoRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportLockInfoRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportLockInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportLockInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ExportLockInfoRequest.class, + com.google.cloud.config.v1.ExportLockInfoRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ExportLockInfoRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ExportLockInfoRequest other = + (com.google.cloud.config.v1.ExportLockInfoRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ExportLockInfoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a state file lock info passed to a 'ExportLockInfo' call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ExportLockInfoRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ExportLockInfoRequest) + com.google.cloud.config.v1.ExportLockInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportLockInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportLockInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ExportLockInfoRequest.class, + com.google.cloud.config.v1.ExportLockInfoRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ExportLockInfoRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportLockInfoRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportLockInfoRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.ExportLockInfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportLockInfoRequest build() { + com.google.cloud.config.v1.ExportLockInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportLockInfoRequest buildPartial() { + com.google.cloud.config.v1.ExportLockInfoRequest result = + new com.google.cloud.config.v1.ExportLockInfoRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.ExportLockInfoRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ExportLockInfoRequest) { + return mergeFrom((com.google.cloud.config.v1.ExportLockInfoRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ExportLockInfoRequest other) { + if (other == com.google.cloud.config.v1.ExportLockInfoRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ExportLockInfoRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ExportLockInfoRequest) + private static final com.google.cloud.config.v1.ExportLockInfoRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ExportLockInfoRequest(); + } + + public static com.google.cloud.config.v1.ExportLockInfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportLockInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportLockInfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportLockInfoRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportLockInfoRequestOrBuilder.java new file mode 100644 index 000000000000..50b275681cf2 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportLockInfoRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ExportLockInfoRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ExportLockInfoRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportRevisionStatefileRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportRevisionStatefileRequest.java new file mode 100644 index 000000000000..8bc14efb64b7 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportRevisionStatefileRequest.java @@ -0,0 +1,656 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to export a state file passed to a 'ExportRevisionStatefile'
+ * call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ExportRevisionStatefileRequest} + */ +public final class ExportRevisionStatefileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ExportRevisionStatefileRequest) + ExportRevisionStatefileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportRevisionStatefileRequest.newBuilder() to construct. + private ExportRevisionStatefileRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportRevisionStatefileRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportRevisionStatefileRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportRevisionStatefileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportRevisionStatefileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ExportRevisionStatefileRequest.class, + com.google.cloud.config.v1.ExportRevisionStatefileRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ExportRevisionStatefileRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ExportRevisionStatefileRequest other = + (com.google.cloud.config.v1.ExportRevisionStatefileRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.config.v1.ExportRevisionStatefileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to export a state file passed to a 'ExportRevisionStatefile'
+   * call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ExportRevisionStatefileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ExportRevisionStatefileRequest) + com.google.cloud.config.v1.ExportRevisionStatefileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportRevisionStatefileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportRevisionStatefileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ExportRevisionStatefileRequest.class, + com.google.cloud.config.v1.ExportRevisionStatefileRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ExportRevisionStatefileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ExportRevisionStatefileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportRevisionStatefileRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.ExportRevisionStatefileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportRevisionStatefileRequest build() { + com.google.cloud.config.v1.ExportRevisionStatefileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportRevisionStatefileRequest buildPartial() { + com.google.cloud.config.v1.ExportRevisionStatefileRequest result = + new com.google.cloud.config.v1.ExportRevisionStatefileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.ExportRevisionStatefileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ExportRevisionStatefileRequest) { + return mergeFrom((com.google.cloud.config.v1.ExportRevisionStatefileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ExportRevisionStatefileRequest other) { + if (other == com.google.cloud.config.v1.ExportRevisionStatefileRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ExportRevisionStatefileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ExportRevisionStatefileRequest) + private static final com.google.cloud.config.v1.ExportRevisionStatefileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ExportRevisionStatefileRequest(); + } + + public static com.google.cloud.config.v1.ExportRevisionStatefileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportRevisionStatefileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ExportRevisionStatefileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportRevisionStatefileRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportRevisionStatefileRequestOrBuilder.java new file mode 100644 index 000000000000..415a85178da2 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ExportRevisionStatefileRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ExportRevisionStatefileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ExportRevisionStatefileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetDeploymentRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetDeploymentRequest.java new file mode 100644 index 000000000000..d96bc7840344 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetDeploymentRequest.java @@ -0,0 +1,629 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** Protobuf type {@code google.cloud.config.v1.GetDeploymentRequest} */ +public final class GetDeploymentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.GetDeploymentRequest) + GetDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDeploymentRequest.newBuilder() to construct. + private GetDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDeploymentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDeploymentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.GetDeploymentRequest.class, + com.google.cloud.config.v1.GetDeploymentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the deployment. Format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the deployment. Format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.GetDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.GetDeploymentRequest other = + (com.google.cloud.config.v1.GetDeploymentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.GetDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.config.v1.GetDeploymentRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.GetDeploymentRequest) + com.google.cloud.config.v1.GetDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.GetDeploymentRequest.class, + com.google.cloud.config.v1.GetDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.GetDeploymentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.GetDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.GetDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.GetDeploymentRequest build() { + com.google.cloud.config.v1.GetDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.GetDeploymentRequest buildPartial() { + com.google.cloud.config.v1.GetDeploymentRequest result = + new com.google.cloud.config.v1.GetDeploymentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.GetDeploymentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.GetDeploymentRequest) { + return mergeFrom((com.google.cloud.config.v1.GetDeploymentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.GetDeploymentRequest other) { + if (other == com.google.cloud.config.v1.GetDeploymentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the deployment. Format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the deployment. Format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the deployment. Format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the deployment. Format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the deployment. Format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.GetDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.GetDeploymentRequest) + private static final com.google.cloud.config.v1.GetDeploymentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.GetDeploymentRequest(); + } + + public static com.google.cloud.config.v1.GetDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.GetDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetDeploymentRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..821d2427c4f2 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetDeploymentRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface GetDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.GetDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the deployment. Format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the deployment. Format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetResourceRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetResourceRequest.java new file mode 100644 index 000000000000..21de30e65505 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetResourceRequest.java @@ -0,0 +1,644 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to get a Resource from a 'GetResource' call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.GetResourceRequest} + */ +public final class GetResourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.GetResourceRequest) + GetResourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetResourceRequest.newBuilder() to construct. + private GetResourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetResourceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetResourceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.GetResourceRequest.class, + com.google.cloud.config.v1.GetResourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the Resource in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Resource in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.GetResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.GetResourceRequest other = + (com.google.cloud.config.v1.GetResourceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.GetResourceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GetResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.GetResourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a Resource from a 'GetResource' call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.GetResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.GetResourceRequest) + com.google.cloud.config.v1.GetResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.GetResourceRequest.class, + com.google.cloud.config.v1.GetResourceRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.GetResourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.GetResourceRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.GetResourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.GetResourceRequest build() { + com.google.cloud.config.v1.GetResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.GetResourceRequest buildPartial() { + com.google.cloud.config.v1.GetResourceRequest result = + new com.google.cloud.config.v1.GetResourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.GetResourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.GetResourceRequest) { + return mergeFrom((com.google.cloud.config.v1.GetResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.GetResourceRequest other) { + if (other == com.google.cloud.config.v1.GetResourceRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Resource in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Resource in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Resource in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Resource in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Resource in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.GetResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.GetResourceRequest) + private static final com.google.cloud.config.v1.GetResourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.GetResourceRequest(); + } + + public static com.google.cloud.config.v1.GetResourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetResourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.GetResourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetResourceRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetResourceRequestOrBuilder.java new file mode 100644 index 000000000000..856e7415222b --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetResourceRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface GetResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.GetResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Resource in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Resource in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetRevisionRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetRevisionRequest.java new file mode 100644 index 000000000000..1ecf6ec2acca --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetRevisionRequest.java @@ -0,0 +1,644 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to get a Revision from a 'GetRevision' call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.GetRevisionRequest} + */ +public final class GetRevisionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.GetRevisionRequest) + GetRevisionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRevisionRequest.newBuilder() to construct. + private GetRevisionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetRevisionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetRevisionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.GetRevisionRequest.class, + com.google.cloud.config.v1.GetRevisionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the Revision in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Revision in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.GetRevisionRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.GetRevisionRequest other = + (com.google.cloud.config.v1.GetRevisionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GetRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.GetRevisionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to get a Revision from a 'GetRevision' call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.GetRevisionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.GetRevisionRequest) + com.google.cloud.config.v1.GetRevisionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.GetRevisionRequest.class, + com.google.cloud.config.v1.GetRevisionRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.GetRevisionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GetRevisionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.GetRevisionRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.GetRevisionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.GetRevisionRequest build() { + com.google.cloud.config.v1.GetRevisionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.GetRevisionRequest buildPartial() { + com.google.cloud.config.v1.GetRevisionRequest result = + new com.google.cloud.config.v1.GetRevisionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.GetRevisionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.GetRevisionRequest) { + return mergeFrom((com.google.cloud.config.v1.GetRevisionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.GetRevisionRequest other) { + if (other == com.google.cloud.config.v1.GetRevisionRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Revision in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Revision in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Revision in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Revision in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Revision in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.GetRevisionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.GetRevisionRequest) + private static final com.google.cloud.config.v1.GetRevisionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.GetRevisionRequest(); + } + + public static com.google.cloud.config.v1.GetRevisionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRevisionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.GetRevisionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetRevisionRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetRevisionRequestOrBuilder.java new file mode 100644 index 000000000000..cecb92e27e59 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetRevisionRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface GetRevisionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.GetRevisionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Revision in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Revision in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GitSource.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GitSource.java new file mode 100644 index 000000000000..fb3ac2c11092 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GitSource.java @@ -0,0 +1,1110 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A set of files in a Git repository.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.GitSource} + */ +public final class GitSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.GitSource) + GitSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GitSource.newBuilder() to construct. + private GitSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GitSource() { + repo_ = ""; + directory_ = ""; + ref_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GitSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GitSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GitSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.GitSource.class, + com.google.cloud.config.v1.GitSource.Builder.class); + } + + private int bitField0_; + public static final int REPO_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object repo_ = ""; + /** + * + * + *
+   * Optional. Repository URL.
+   * Example: 'https://github.com/kubernetes/examples.git'
+   * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the repo field is set. + */ + @java.lang.Override + public boolean hasRepo() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Repository URL.
+   * Example: 'https://github.com/kubernetes/examples.git'
+   * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The repo. + */ + @java.lang.Override + public java.lang.String getRepo() { + java.lang.Object ref = repo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repo_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Repository URL.
+   * Example: 'https://github.com/kubernetes/examples.git'
+   * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for repo. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRepoBytes() { + java.lang.Object ref = repo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIRECTORY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object directory_ = ""; + /** + * + * + *
+   * Optional. Subdirectory inside the repository.
+   * Example: 'staging/my-package'
+   * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the directory field is set. + */ + @java.lang.Override + public boolean hasDirectory() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. Subdirectory inside the repository.
+   * Example: 'staging/my-package'
+   * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The directory. + */ + @java.lang.Override + public java.lang.String getDirectory() { + java.lang.Object ref = directory_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + directory_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Subdirectory inside the repository.
+   * Example: 'staging/my-package'
+   * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for directory. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDirectoryBytes() { + java.lang.Object ref = directory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + directory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REF_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object ref_ = ""; + /** + * + * + *
+   * Optional. Git reference (e.g. branch or tag).
+   * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ref field is set. + */ + @java.lang.Override + public boolean hasRef() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Optional. Git reference (e.g. branch or tag).
+   * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ref. + */ + @java.lang.Override + public java.lang.String getRef() { + java.lang.Object ref = ref_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ref_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Git reference (e.g. branch or tag).
+   * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ref. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRefBytes() { + java.lang.Object ref = ref_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ref_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, repo_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, directory_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ref_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, repo_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, directory_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ref_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.GitSource)) { + return super.equals(obj); + } + com.google.cloud.config.v1.GitSource other = (com.google.cloud.config.v1.GitSource) obj; + + if (hasRepo() != other.hasRepo()) return false; + if (hasRepo()) { + if (!getRepo().equals(other.getRepo())) return false; + } + if (hasDirectory() != other.hasDirectory()) return false; + if (hasDirectory()) { + if (!getDirectory().equals(other.getDirectory())) return false; + } + if (hasRef() != other.hasRef()) return false; + if (hasRef()) { + if (!getRef().equals(other.getRef())) 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 (hasRepo()) { + hash = (37 * hash) + REPO_FIELD_NUMBER; + hash = (53 * hash) + getRepo().hashCode(); + } + if (hasDirectory()) { + hash = (37 * hash) + DIRECTORY_FIELD_NUMBER; + hash = (53 * hash) + getDirectory().hashCode(); + } + if (hasRef()) { + hash = (37 * hash) + REF_FIELD_NUMBER; + hash = (53 * hash) + getRef().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.GitSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GitSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GitSource parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GitSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GitSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.GitSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.GitSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GitSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.GitSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GitSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.GitSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.GitSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.GitSource 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 set of files in a Git repository.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.GitSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.GitSource) + com.google.cloud.config.v1.GitSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GitSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GitSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.GitSource.class, + com.google.cloud.config.v1.GitSource.Builder.class); + } + + // Construct using com.google.cloud.config.v1.GitSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + repo_ = ""; + directory_ = ""; + ref_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_GitSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.GitSource getDefaultInstanceForType() { + return com.google.cloud.config.v1.GitSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.GitSource build() { + com.google.cloud.config.v1.GitSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.GitSource buildPartial() { + com.google.cloud.config.v1.GitSource result = new com.google.cloud.config.v1.GitSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.GitSource result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.repo_ = repo_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.directory_ = directory_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ref_ = ref_; + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.GitSource) { + return mergeFrom((com.google.cloud.config.v1.GitSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.GitSource other) { + if (other == com.google.cloud.config.v1.GitSource.getDefaultInstance()) return this; + if (other.hasRepo()) { + repo_ = other.repo_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDirectory()) { + directory_ = other.directory_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRef()) { + ref_ = other.ref_; + 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: + { + repo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + directory_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + ref_ = 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 repo_ = ""; + /** + * + * + *
+     * Optional. Repository URL.
+     * Example: 'https://github.com/kubernetes/examples.git'
+     * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the repo field is set. + */ + public boolean hasRepo() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. Repository URL.
+     * Example: 'https://github.com/kubernetes/examples.git'
+     * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The repo. + */ + public java.lang.String getRepo() { + java.lang.Object ref = repo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Repository URL.
+     * Example: 'https://github.com/kubernetes/examples.git'
+     * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for repo. + */ + public com.google.protobuf.ByteString getRepoBytes() { + java.lang.Object ref = repo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Repository URL.
+     * Example: 'https://github.com/kubernetes/examples.git'
+     * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The repo to set. + * @return This builder for chaining. + */ + public Builder setRepo(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + repo_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Repository URL.
+     * Example: 'https://github.com/kubernetes/examples.git'
+     * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRepo() { + repo_ = getDefaultInstance().getRepo(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Repository URL.
+     * Example: 'https://github.com/kubernetes/examples.git'
+     * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for repo to set. + * @return This builder for chaining. + */ + public Builder setRepoBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + repo_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object directory_ = ""; + /** + * + * + *
+     * Optional. Subdirectory inside the repository.
+     * Example: 'staging/my-package'
+     * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the directory field is set. + */ + public boolean hasDirectory() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. Subdirectory inside the repository.
+     * Example: 'staging/my-package'
+     * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The directory. + */ + public java.lang.String getDirectory() { + java.lang.Object ref = directory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + directory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Subdirectory inside the repository.
+     * Example: 'staging/my-package'
+     * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for directory. + */ + public com.google.protobuf.ByteString getDirectoryBytes() { + java.lang.Object ref = directory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + directory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Subdirectory inside the repository.
+     * Example: 'staging/my-package'
+     * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The directory to set. + * @return This builder for chaining. + */ + public Builder setDirectory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + directory_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Subdirectory inside the repository.
+     * Example: 'staging/my-package'
+     * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDirectory() { + directory_ = getDefaultInstance().getDirectory(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Subdirectory inside the repository.
+     * Example: 'staging/my-package'
+     * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for directory to set. + * @return This builder for chaining. + */ + public Builder setDirectoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + directory_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object ref_ = ""; + /** + * + * + *
+     * Optional. Git reference (e.g. branch or tag).
+     * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ref field is set. + */ + public boolean hasRef() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. Git reference (e.g. branch or tag).
+     * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ref. + */ + public java.lang.String getRef() { + java.lang.Object ref = ref_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ref_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Git reference (e.g. branch or tag).
+     * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ref. + */ + public com.google.protobuf.ByteString getRefBytes() { + java.lang.Object ref = ref_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ref_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Git reference (e.g. branch or tag).
+     * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ref to set. + * @return This builder for chaining. + */ + public Builder setRef(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ref_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Git reference (e.g. branch or tag).
+     * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRef() { + ref_ = getDefaultInstance().getRef(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Git reference (e.g. branch or tag).
+     * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for ref to set. + * @return This builder for chaining. + */ + public Builder setRefBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ref_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.GitSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.GitSource) + private static final com.google.cloud.config.v1.GitSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.GitSource(); + } + + public static com.google.cloud.config.v1.GitSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GitSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.GitSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GitSourceOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GitSourceOrBuilder.java new file mode 100644 index 000000000000..d607609f48b7 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GitSourceOrBuilder.java @@ -0,0 +1,142 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface GitSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.GitSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Repository URL.
+   * Example: 'https://github.com/kubernetes/examples.git'
+   * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the repo field is set. + */ + boolean hasRepo(); + /** + * + * + *
+   * Optional. Repository URL.
+   * Example: 'https://github.com/kubernetes/examples.git'
+   * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The repo. + */ + java.lang.String getRepo(); + /** + * + * + *
+   * Optional. Repository URL.
+   * Example: 'https://github.com/kubernetes/examples.git'
+   * 
+ * + * optional string repo = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for repo. + */ + com.google.protobuf.ByteString getRepoBytes(); + + /** + * + * + *
+   * Optional. Subdirectory inside the repository.
+   * Example: 'staging/my-package'
+   * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the directory field is set. + */ + boolean hasDirectory(); + /** + * + * + *
+   * Optional. Subdirectory inside the repository.
+   * Example: 'staging/my-package'
+   * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The directory. + */ + java.lang.String getDirectory(); + /** + * + * + *
+   * Optional. Subdirectory inside the repository.
+   * Example: 'staging/my-package'
+   * 
+ * + * optional string directory = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for directory. + */ + com.google.protobuf.ByteString getDirectoryBytes(); + + /** + * + * + *
+   * Optional. Git reference (e.g. branch or tag).
+   * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ref field is set. + */ + boolean hasRef(); + /** + * + * + *
+   * Optional. Git reference (e.g. branch or tag).
+   * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ref. + */ + java.lang.String getRef(); + /** + * + * + *
+   * Optional. Git reference (e.g. branch or tag).
+   * 
+ * + * optional string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ref. + */ + com.google.protobuf.ByteString getRefBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ImportStatefileRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ImportStatefileRequest.java new file mode 100644 index 000000000000..ec296435c15c --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ImportStatefileRequest.java @@ -0,0 +1,842 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to import a state file passed to a 'ImportStatefile' call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ImportStatefileRequest} + */ +public final class ImportStatefileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ImportStatefileRequest) + ImportStatefileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportStatefileRequest.newBuilder() to construct. + private ImportStatefileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportStatefileRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportStatefileRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ImportStatefileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ImportStatefileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ImportStatefileRequest.class, + com.google.cloud.config.v1.ImportStatefileRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCK_ID_FIELD_NUMBER = 2; + private long lockId_ = 0L; + /** + * + * + *
+   * Required. Lock ID of the lock file to verify that the user who is importing
+   * the state file previously locked the Deployment.
+   * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockId. + */ + @java.lang.Override + public long getLockId() { + return lockId_; + } + + public static final int SKIP_DRAFT_FIELD_NUMBER = 3; + private boolean skipDraft_ = false; + /** + * + * + *
+   * Optional.
+   * 
+ * + * bool skip_draft = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The skipDraft. + */ + @java.lang.Override + public boolean getSkipDraft() { + return skipDraft_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (lockId_ != 0L) { + output.writeInt64(2, lockId_); + } + if (skipDraft_ != false) { + output.writeBool(3, skipDraft_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (lockId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, lockId_); + } + if (skipDraft_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, skipDraft_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ImportStatefileRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ImportStatefileRequest other = + (com.google.cloud.config.v1.ImportStatefileRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getLockId() != other.getLockId()) return false; + if (getSkipDraft() != other.getSkipDraft()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + LOCK_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLockId()); + hash = (37 * hash) + SKIP_DRAFT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipDraft()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ImportStatefileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to import a state file passed to a 'ImportStatefile' call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ImportStatefileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ImportStatefileRequest) + com.google.cloud.config.v1.ImportStatefileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ImportStatefileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ImportStatefileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ImportStatefileRequest.class, + com.google.cloud.config.v1.ImportStatefileRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ImportStatefileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + lockId_ = 0L; + skipDraft_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ImportStatefileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ImportStatefileRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.ImportStatefileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ImportStatefileRequest build() { + com.google.cloud.config.v1.ImportStatefileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ImportStatefileRequest buildPartial() { + com.google.cloud.config.v1.ImportStatefileRequest result = + new com.google.cloud.config.v1.ImportStatefileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.ImportStatefileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lockId_ = lockId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.skipDraft_ = skipDraft_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ImportStatefileRequest) { + return mergeFrom((com.google.cloud.config.v1.ImportStatefileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ImportStatefileRequest other) { + if (other == com.google.cloud.config.v1.ImportStatefileRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getLockId() != 0L) { + setLockId(other.getLockId()); + } + if (other.getSkipDraft() != false) { + setSkipDraft(other.getSkipDraft()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + lockId_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + skipDraft_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the statefile is listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long lockId_; + /** + * + * + *
+     * Required. Lock ID of the lock file to verify that the user who is importing
+     * the state file previously locked the Deployment.
+     * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockId. + */ + @java.lang.Override + public long getLockId() { + return lockId_; + } + /** + * + * + *
+     * Required. Lock ID of the lock file to verify that the user who is importing
+     * the state file previously locked the Deployment.
+     * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The lockId to set. + * @return This builder for chaining. + */ + public Builder setLockId(long value) { + + lockId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Lock ID of the lock file to verify that the user who is importing
+     * the state file previously locked the Deployment.
+     * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLockId() { + bitField0_ = (bitField0_ & ~0x00000002); + lockId_ = 0L; + onChanged(); + return this; + } + + private boolean skipDraft_; + /** + * + * + *
+     * Optional.
+     * 
+ * + * bool skip_draft = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The skipDraft. + */ + @java.lang.Override + public boolean getSkipDraft() { + return skipDraft_; + } + /** + * + * + *
+     * Optional.
+     * 
+ * + * bool skip_draft = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The skipDraft to set. + * @return This builder for chaining. + */ + public Builder setSkipDraft(boolean value) { + + skipDraft_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional.
+     * 
+ * + * bool skip_draft = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSkipDraft() { + bitField0_ = (bitField0_ & ~0x00000004); + skipDraft_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ImportStatefileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ImportStatefileRequest) + private static final com.google.cloud.config.v1.ImportStatefileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ImportStatefileRequest(); + } + + public static com.google.cloud.config.v1.ImportStatefileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportStatefileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ImportStatefileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ImportStatefileRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ImportStatefileRequestOrBuilder.java new file mode 100644 index 000000000000..b82ba82de113 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ImportStatefileRequestOrBuilder.java @@ -0,0 +1,85 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ImportStatefileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ImportStatefileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent in whose context the statefile is listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Lock ID of the lock file to verify that the user who is importing
+   * the state file previously locked the Deployment.
+   * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockId. + */ + long getLockId(); + + /** + * + * + *
+   * Optional.
+   * 
+ * + * bool skip_draft = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The skipDraft. + */ + boolean getSkipDraft(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsRequest.java new file mode 100644 index 000000000000..ad521966ca0d --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsRequest.java @@ -0,0 +1,1430 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** Protobuf type {@code google.cloud.config.v1.ListDeploymentsRequest} */ +public final class ListDeploymentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ListDeploymentsRequest) + ListDeploymentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDeploymentsRequest.newBuilder() to construct. + private ListDeploymentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDeploymentsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDeploymentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListDeploymentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListDeploymentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListDeploymentsRequest.class, + com.google.cloud.config.v1.ListDeploymentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent in whose context the Deployments are listed. The
+   * parent value is in the format:
+   * 'projects/{project_id}/locations/{location}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent in whose context the Deployments are listed. The
+   * parent value is in the format:
+   * 'projects/{project_id}/locations/{location}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * When requesting a page of resources, 'page_size' specifies number of
+   * resources to return. If unspecified or set to 0, all resources will be
+   * returned.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Token returned by previous call to 'ListDeployments' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token returned by previous call to 'ListDeployments' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Lists the Deployments that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+   * operator which is roughly synonymous with equality). {field} can refer to a
+   * proto or JSON field, or a synthetic field. Field names can be camelCase or
+   * snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/foo/locations/us-central1/deployments/bar
+   *
+   * - Filter by labels:
+   *   - Resources that have a key called 'foo'
+   *     labels.foo:*
+   *   - Resources that have a key called 'foo' whose value is 'bar'
+   *     labels.foo = bar
+   *
+   * - Filter by state:
+   *   - Deployments in CREATING state.
+   *     state=CREATING
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Lists the Deployments that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+   * operator which is roughly synonymous with equality). {field} can refer to a
+   * proto or JSON field, or a synthetic field. Field names can be camelCase or
+   * snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/foo/locations/us-central1/deployments/bar
+   *
+   * - Filter by labels:
+   *   - Resources that have a key called 'foo'
+   *     labels.foo:*
+   *   - Resources that have a key called 'foo' whose value is 'bar'
+   *     labels.foo = bar
+   *
+   * - Filter by state:
+   *   - Deployments in CREATING state.
+   *     state=CREATING
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ListDeploymentsRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ListDeploymentsRequest other = + (com.google.cloud.config.v1.ListDeploymentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ListDeploymentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.config.v1.ListDeploymentsRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ListDeploymentsRequest) + com.google.cloud.config.v1.ListDeploymentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListDeploymentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListDeploymentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListDeploymentsRequest.class, + com.google.cloud.config.v1.ListDeploymentsRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ListDeploymentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListDeploymentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListDeploymentsRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.ListDeploymentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ListDeploymentsRequest build() { + com.google.cloud.config.v1.ListDeploymentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListDeploymentsRequest buildPartial() { + com.google.cloud.config.v1.ListDeploymentsRequest result = + new com.google.cloud.config.v1.ListDeploymentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.ListDeploymentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ListDeploymentsRequest) { + return mergeFrom((com.google.cloud.config.v1.ListDeploymentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ListDeploymentsRequest other) { + if (other == com.google.cloud.config.v1.ListDeploymentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent in whose context the Deployments are listed. The
+     * parent value is in the format:
+     * 'projects/{project_id}/locations/{location}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the Deployments are listed. The
+     * parent value is in the format:
+     * 'projects/{project_id}/locations/{location}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the Deployments are listed. The
+     * parent value is in the format:
+     * 'projects/{project_id}/locations/{location}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the Deployments are listed. The
+     * parent value is in the format:
+     * 'projects/{project_id}/locations/{location}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the Deployments are listed. The
+     * parent value is in the format:
+     * 'projects/{project_id}/locations/{location}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * When requesting a page of resources, 'page_size' specifies number of
+     * resources to return. If unspecified or set to 0, all resources will be
+     * returned.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * When requesting a page of resources, 'page_size' specifies number of
+     * resources to return. If unspecified or set to 0, all resources will be
+     * returned.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * When requesting a page of resources, 'page_size' specifies number of
+     * resources to return. If unspecified or set to 0, all resources will be
+     * returned.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Token returned by previous call to 'ListDeployments' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token returned by previous call to 'ListDeployments' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token returned by previous call to 'ListDeployments' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Token returned by previous call to 'ListDeployments' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Token returned by previous call to 'ListDeployments' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Lists the Deployments that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+     * operator which is roughly synonymous with equality). {field} can refer to a
+     * proto or JSON field, or a synthetic field. Field names can be camelCase or
+     * snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/foo/locations/us-central1/deployments/bar
+     *
+     * - Filter by labels:
+     *   - Resources that have a key called 'foo'
+     *     labels.foo:*
+     *   - Resources that have a key called 'foo' whose value is 'bar'
+     *     labels.foo = bar
+     *
+     * - Filter by state:
+     *   - Deployments in CREATING state.
+     *     state=CREATING
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Lists the Deployments that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+     * operator which is roughly synonymous with equality). {field} can refer to a
+     * proto or JSON field, or a synthetic field. Field names can be camelCase or
+     * snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/foo/locations/us-central1/deployments/bar
+     *
+     * - Filter by labels:
+     *   - Resources that have a key called 'foo'
+     *     labels.foo:*
+     *   - Resources that have a key called 'foo' whose value is 'bar'
+     *     labels.foo = bar
+     *
+     * - Filter by state:
+     *   - Deployments in CREATING state.
+     *     state=CREATING
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Lists the Deployments that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+     * operator which is roughly synonymous with equality). {field} can refer to a
+     * proto or JSON field, or a synthetic field. Field names can be camelCase or
+     * snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/foo/locations/us-central1/deployments/bar
+     *
+     * - Filter by labels:
+     *   - Resources that have a key called 'foo'
+     *     labels.foo:*
+     *   - Resources that have a key called 'foo' whose value is 'bar'
+     *     labels.foo = bar
+     *
+     * - Filter by state:
+     *   - Deployments in CREATING state.
+     *     state=CREATING
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the Deployments that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+     * operator which is roughly synonymous with equality). {field} can refer to a
+     * proto or JSON field, or a synthetic field. Field names can be camelCase or
+     * snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/foo/locations/us-central1/deployments/bar
+     *
+     * - Filter by labels:
+     *   - Resources that have a key called 'foo'
+     *     labels.foo:*
+     *   - Resources that have a key called 'foo' whose value is 'bar'
+     *     labels.foo = bar
+     *
+     * - Filter by state:
+     *   - Deployments in CREATING state.
+     *     state=CREATING
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the Deployments that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+     * operator which is roughly synonymous with equality). {field} can refer to a
+     * proto or JSON field, or a synthetic field. Field names can be camelCase or
+     * snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/foo/locations/us-central1/deployments/bar
+     *
+     * - Filter by labels:
+     *   - Resources that have a key called 'foo'
+     *     labels.foo:*
+     *   - Resources that have a key called 'foo' whose value is 'bar'
+     *     labels.foo = bar
+     *
+     * - Filter by state:
+     *   - Deployments in CREATING state.
+     *     state=CREATING
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ListDeploymentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ListDeploymentsRequest) + private static final com.google.cloud.config.v1.ListDeploymentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ListDeploymentsRequest(); + } + + public static com.google.cloud.config.v1.ListDeploymentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeploymentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListDeploymentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsRequestOrBuilder.java new file mode 100644 index 000000000000..c0b381ae9ef5 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsRequestOrBuilder.java @@ -0,0 +1,190 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ListDeploymentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ListDeploymentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent in whose context the Deployments are listed. The
+   * parent value is in the format:
+   * 'projects/{project_id}/locations/{location}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent in whose context the Deployments are listed. The
+   * parent value is in the format:
+   * 'projects/{project_id}/locations/{location}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * When requesting a page of resources, 'page_size' specifies number of
+   * resources to return. If unspecified or set to 0, all resources will be
+   * returned.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Token returned by previous call to 'ListDeployments' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Token returned by previous call to 'ListDeployments' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Lists the Deployments that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+   * operator which is roughly synonymous with equality). {field} can refer to a
+   * proto or JSON field, or a synthetic field. Field names can be camelCase or
+   * snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/foo/locations/us-central1/deployments/bar
+   *
+   * - Filter by labels:
+   *   - Resources that have a key called 'foo'
+   *     labels.foo:*
+   *   - Resources that have a key called 'foo' whose value is 'bar'
+   *     labels.foo = bar
+   *
+   * - Filter by state:
+   *   - Deployments in CREATING state.
+   *     state=CREATING
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Lists the Deployments that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+   * operator which is roughly synonymous with equality). {field} can refer to a
+   * proto or JSON field, or a synthetic field. Field names can be camelCase or
+   * snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/foo/locations/us-central1/deployments/bar
+   *
+   * - Filter by labels:
+   *   - Resources that have a key called 'foo'
+   *     labels.foo:*
+   *   - Resources that have a key called 'foo' whose value is 'bar'
+   *     labels.foo = bar
+   *
+   * - Filter by state:
+   *   - Deployments in CREATING state.
+   *     state=CREATING
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsResponse.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsResponse.java new file mode 100644 index 000000000000..8c76e49e4b7c --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsResponse.java @@ -0,0 +1,1385 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** Protobuf type {@code google.cloud.config.v1.ListDeploymentsResponse} */ +public final class ListDeploymentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ListDeploymentsResponse) + ListDeploymentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDeploymentsResponse.newBuilder() to construct. + private ListDeploymentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDeploymentsResponse() { + deployments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDeploymentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListDeploymentsResponse.class, + com.google.cloud.config.v1.ListDeploymentsResponse.Builder.class); + } + + public static final int DEPLOYMENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List deployments_; + /** + * + * + *
+   * List of [Deployment][google.cloud.config.v1.Deployment]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + @java.lang.Override + public java.util.List getDeploymentsList() { + return deployments_; + } + /** + * + * + *
+   * List of [Deployment][google.cloud.config.v1.Deployment]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + @java.lang.Override + public java.util.List + getDeploymentsOrBuilderList() { + return deployments_; + } + /** + * + * + *
+   * List of [Deployment][google.cloud.config.v1.Deployment]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + @java.lang.Override + public int getDeploymentsCount() { + return deployments_.size(); + } + /** + * + * + *
+   * List of [Deployment][google.cloud.config.v1.Deployment]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + @java.lang.Override + public com.google.cloud.config.v1.Deployment getDeployments(int index) { + return deployments_.get(index); + } + /** + * + * + *
+   * List of [Deployment][google.cloud.config.v1.Deployment]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOrBuilder getDeploymentsOrBuilder(int index) { + return deployments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to be supplied to the next ListDeployments request via `page_token`
+   * to obtain the next set of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to be supplied to the next ListDeployments request via `page_token`
+   * to obtain the next set of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < deployments_.size(); i++) { + output.writeMessage(1, deployments_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < deployments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, deployments_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ListDeploymentsResponse)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ListDeploymentsResponse other = + (com.google.cloud.config.v1.ListDeploymentsResponse) obj; + + if (!getDeploymentsList().equals(other.getDeploymentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeploymentsCount() > 0) { + hash = (37 * hash) + DEPLOYMENTS_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ListDeploymentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.config.v1.ListDeploymentsResponse} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ListDeploymentsResponse) + com.google.cloud.config.v1.ListDeploymentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListDeploymentsResponse.class, + com.google.cloud.config.v1.ListDeploymentsResponse.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ListDeploymentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (deploymentsBuilder_ == null) { + deployments_ = java.util.Collections.emptyList(); + } else { + deployments_ = null; + deploymentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListDeploymentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListDeploymentsResponse getDefaultInstanceForType() { + return com.google.cloud.config.v1.ListDeploymentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ListDeploymentsResponse build() { + com.google.cloud.config.v1.ListDeploymentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListDeploymentsResponse buildPartial() { + com.google.cloud.config.v1.ListDeploymentsResponse result = + new com.google.cloud.config.v1.ListDeploymentsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.config.v1.ListDeploymentsResponse result) { + if (deploymentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deployments_ = java.util.Collections.unmodifiableList(deployments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deployments_ = deployments_; + } else { + result.deployments_ = deploymentsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.config.v1.ListDeploymentsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ListDeploymentsResponse) { + return mergeFrom((com.google.cloud.config.v1.ListDeploymentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ListDeploymentsResponse other) { + if (other == com.google.cloud.config.v1.ListDeploymentsResponse.getDefaultInstance()) + return this; + if (deploymentsBuilder_ == null) { + if (!other.deployments_.isEmpty()) { + if (deployments_.isEmpty()) { + deployments_ = other.deployments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeploymentsIsMutable(); + deployments_.addAll(other.deployments_); + } + onChanged(); + } + } else { + if (!other.deployments_.isEmpty()) { + if (deploymentsBuilder_.isEmpty()) { + deploymentsBuilder_.dispose(); + deploymentsBuilder_ = null; + deployments_ = other.deployments_; + bitField0_ = (bitField0_ & ~0x00000001); + deploymentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDeploymentsFieldBuilder() + : null; + } else { + deploymentsBuilder_.addAllMessages(other.deployments_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.config.v1.Deployment m = + input.readMessage( + com.google.cloud.config.v1.Deployment.parser(), extensionRegistry); + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + deployments_.add(m); + } else { + deploymentsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List deployments_ = + java.util.Collections.emptyList(); + + private void ensureDeploymentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deployments_ = new java.util.ArrayList(deployments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.Deployment, + com.google.cloud.config.v1.Deployment.Builder, + com.google.cloud.config.v1.DeploymentOrBuilder> + deploymentsBuilder_; + + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public java.util.List getDeploymentsList() { + if (deploymentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deployments_); + } else { + return deploymentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public int getDeploymentsCount() { + if (deploymentsBuilder_ == null) { + return deployments_.size(); + } else { + return deploymentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public com.google.cloud.config.v1.Deployment getDeployments(int index) { + if (deploymentsBuilder_ == null) { + return deployments_.get(index); + } else { + return deploymentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public Builder setDeployments(int index, com.google.cloud.config.v1.Deployment value) { + if (deploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentsIsMutable(); + deployments_.set(index, value); + onChanged(); + } else { + deploymentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public Builder setDeployments( + int index, com.google.cloud.config.v1.Deployment.Builder builderForValue) { + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + deployments_.set(index, builderForValue.build()); + onChanged(); + } else { + deploymentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public Builder addDeployments(com.google.cloud.config.v1.Deployment value) { + if (deploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentsIsMutable(); + deployments_.add(value); + onChanged(); + } else { + deploymentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public Builder addDeployments(int index, com.google.cloud.config.v1.Deployment value) { + if (deploymentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentsIsMutable(); + deployments_.add(index, value); + onChanged(); + } else { + deploymentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public Builder addDeployments(com.google.cloud.config.v1.Deployment.Builder builderForValue) { + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + deployments_.add(builderForValue.build()); + onChanged(); + } else { + deploymentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public Builder addDeployments( + int index, com.google.cloud.config.v1.Deployment.Builder builderForValue) { + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + deployments_.add(index, builderForValue.build()); + onChanged(); + } else { + deploymentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public Builder addAllDeployments( + java.lang.Iterable values) { + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deployments_); + onChanged(); + } else { + deploymentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public Builder clearDeployments() { + if (deploymentsBuilder_ == null) { + deployments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deploymentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public Builder removeDeployments(int index) { + if (deploymentsBuilder_ == null) { + ensureDeploymentsIsMutable(); + deployments_.remove(index); + onChanged(); + } else { + deploymentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public com.google.cloud.config.v1.Deployment.Builder getDeploymentsBuilder(int index) { + return getDeploymentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public com.google.cloud.config.v1.DeploymentOrBuilder getDeploymentsOrBuilder(int index) { + if (deploymentsBuilder_ == null) { + return deployments_.get(index); + } else { + return deploymentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public java.util.List + getDeploymentsOrBuilderList() { + if (deploymentsBuilder_ != null) { + return deploymentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deployments_); + } + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public com.google.cloud.config.v1.Deployment.Builder addDeploymentsBuilder() { + return getDeploymentsFieldBuilder() + .addBuilder(com.google.cloud.config.v1.Deployment.getDefaultInstance()); + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public com.google.cloud.config.v1.Deployment.Builder addDeploymentsBuilder(int index) { + return getDeploymentsFieldBuilder() + .addBuilder(index, com.google.cloud.config.v1.Deployment.getDefaultInstance()); + } + /** + * + * + *
+     * List of [Deployment][google.cloud.config.v1.Deployment]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + public java.util.List + getDeploymentsBuilderList() { + return getDeploymentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.Deployment, + com.google.cloud.config.v1.Deployment.Builder, + com.google.cloud.config.v1.DeploymentOrBuilder> + getDeploymentsFieldBuilder() { + if (deploymentsBuilder_ == null) { + deploymentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.Deployment, + com.google.cloud.config.v1.Deployment.Builder, + com.google.cloud.config.v1.DeploymentOrBuilder>( + deployments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deployments_ = null; + } + return deploymentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to be supplied to the next ListDeployments request via `page_token`
+     * to obtain the next set of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to be supplied to the next ListDeployments request via `page_token`
+     * to obtain the next set of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to be supplied to the next ListDeployments request via `page_token`
+     * to obtain the next set of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to be supplied to the next ListDeployments request via `page_token`
+     * to obtain the next set of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to be supplied to the next ListDeployments request via `page_token`
+     * to obtain the next set of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ListDeploymentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ListDeploymentsResponse) + private static final com.google.cloud.config.v1.ListDeploymentsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ListDeploymentsResponse(); + } + + public static com.google.cloud.config.v1.ListDeploymentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeploymentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListDeploymentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsResponseOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsResponseOrBuilder.java new file mode 100644 index 000000000000..a9ffd7f4b013 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListDeploymentsResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ListDeploymentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ListDeploymentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of [Deployment][google.cloud.config.v1.Deployment]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + java.util.List getDeploymentsList(); + /** + * + * + *
+   * List of [Deployment][google.cloud.config.v1.Deployment]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + com.google.cloud.config.v1.Deployment getDeployments(int index); + /** + * + * + *
+   * List of [Deployment][google.cloud.config.v1.Deployment]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + int getDeploymentsCount(); + /** + * + * + *
+   * List of [Deployment][google.cloud.config.v1.Deployment]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + java.util.List + getDeploymentsOrBuilderList(); + /** + * + * + *
+   * List of [Deployment][google.cloud.config.v1.Deployment]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Deployment deployments = 1; + */ + com.google.cloud.config.v1.DeploymentOrBuilder getDeploymentsOrBuilder(int index); + + /** + * + * + *
+   * Token to be supplied to the next ListDeployments request via `page_token`
+   * to obtain the next set of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to be supplied to the next ListDeployments request via `page_token`
+   * to obtain the next set of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesRequest.java new file mode 100644 index 000000000000..5498c6685ad8 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesRequest.java @@ -0,0 +1,1390 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to list Resources passed to a 'ListResources' call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ListResourcesRequest} + */ +public final class ListResourcesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ListResourcesRequest) + ListResourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListResourcesRequest.newBuilder() to construct. + private ListResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListResourcesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListResourcesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListResourcesRequest.class, + com.google.cloud.config.v1.ListResourcesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent in whose context the Resources are listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent in whose context the Resources are listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * When requesting a page of resources, 'page_size' specifies number of
+   * resources to return. If unspecified or set to 0, all resources will be
+   * returned.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Token returned by previous call to 'ListResources' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token returned by previous call to 'ListResources' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Lists the Resources that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=',
+   * '>=',
+   * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
+   * roughly synonymous with equality). {field} can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name =
+   *   "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Lists the Resources that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=',
+   * '>=',
+   * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
+   * roughly synonymous with equality). {field} can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name =
+   *   "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ListResourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ListResourcesRequest other = + (com.google.cloud.config.v1.ListResourcesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ListResourcesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list Resources passed to a 'ListResources' call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ListResourcesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ListResourcesRequest) + com.google.cloud.config.v1.ListResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListResourcesRequest.class, + com.google.cloud.config.v1.ListResourcesRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ListResourcesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListResourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListResourcesRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.ListResourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ListResourcesRequest build() { + com.google.cloud.config.v1.ListResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListResourcesRequest buildPartial() { + com.google.cloud.config.v1.ListResourcesRequest result = + new com.google.cloud.config.v1.ListResourcesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.ListResourcesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ListResourcesRequest) { + return mergeFrom((com.google.cloud.config.v1.ListResourcesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ListResourcesRequest other) { + if (other == com.google.cloud.config.v1.ListResourcesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent in whose context the Resources are listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the Resources are listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the Resources are listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the Resources are listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the Resources are listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * When requesting a page of resources, 'page_size' specifies number of
+     * resources to return. If unspecified or set to 0, all resources will be
+     * returned.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * When requesting a page of resources, 'page_size' specifies number of
+     * resources to return. If unspecified or set to 0, all resources will be
+     * returned.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * When requesting a page of resources, 'page_size' specifies number of
+     * resources to return. If unspecified or set to 0, all resources will be
+     * returned.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Token returned by previous call to 'ListResources' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token returned by previous call to 'ListResources' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token returned by previous call to 'ListResources' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Token returned by previous call to 'ListResources' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Token returned by previous call to 'ListResources' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Lists the Resources that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=',
+     * '>=',
+     * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
+     * roughly synonymous with equality). {field} can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name =
+     *   "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Lists the Resources that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=',
+     * '>=',
+     * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
+     * roughly synonymous with equality). {field} can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name =
+     *   "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Lists the Resources that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=',
+     * '>=',
+     * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
+     * roughly synonymous with equality). {field} can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name =
+     *   "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the Resources that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=',
+     * '>=',
+     * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
+     * roughly synonymous with equality). {field} can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name =
+     *   "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the Resources that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=',
+     * '>=',
+     * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
+     * roughly synonymous with equality). {field} can refer to a proto or JSON
+     * field, or a synthetic field. Field names can be camelCase or snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name =
+     *   "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ListResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ListResourcesRequest) + private static final com.google.cloud.config.v1.ListResourcesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ListResourcesRequest(); + } + + public static com.google.cloud.config.v1.ListResourcesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListResourcesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListResourcesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesRequestOrBuilder.java new file mode 100644 index 000000000000..85da69901358 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesRequestOrBuilder.java @@ -0,0 +1,174 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ListResourcesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ListResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent in whose context the Resources are listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent in whose context the Resources are listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * When requesting a page of resources, 'page_size' specifies number of
+   * resources to return. If unspecified or set to 0, all resources will be
+   * returned.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Token returned by previous call to 'ListResources' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Token returned by previous call to 'ListResources' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Lists the Resources that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=',
+   * '>=',
+   * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
+   * roughly synonymous with equality). {field} can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name =
+   *   "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Lists the Resources that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=',
+   * '>=',
+   * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is
+   * roughly synonymous with equality). {field} can refer to a proto or JSON
+   * field, or a synthetic field. Field names can be camelCase or snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name =
+   *   "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesResponse.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesResponse.java new file mode 100644 index 000000000000..f6b3cfe432ad --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesResponse.java @@ -0,0 +1,1407 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A response to a 'ListResources' call. Contains a list of Resources.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ListResourcesResponse} + */ +public final class ListResourcesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ListResourcesResponse) + ListResourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListResourcesResponse.newBuilder() to construct. + private ListResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListResourcesResponse() { + resources_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListResourcesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListResourcesResponse.class, + com.google.cloud.config.v1.ListResourcesResponse.Builder.class); + } + + public static final int RESOURCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List resources_; + /** + * + * + *
+   * List of [Resources][]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + @java.lang.Override + public java.util.List getResourcesList() { + return resources_; + } + /** + * + * + *
+   * List of [Resources][]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + @java.lang.Override + public java.util.List + getResourcesOrBuilderList() { + return resources_; + } + /** + * + * + *
+   * List of [Resources][]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + @java.lang.Override + public int getResourcesCount() { + return resources_.size(); + } + /** + * + * + *
+   * List of [Resources][]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + @java.lang.Override + public com.google.cloud.config.v1.Resource getResources(int index) { + return resources_.get(index); + } + /** + * + * + *
+   * List of [Resources][]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + @java.lang.Override + public com.google.cloud.config.v1.ResourceOrBuilder getResourcesOrBuilder(int index) { + return resources_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to request the next page of resources from the 'ListResources'
+   * method. The value of an empty string means that there are no more resources
+   * to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to request the next page of resources from the 'ListResources'
+   * method. The value of an empty string means that there are no more resources
+   * to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < resources_.size(); i++) { + output.writeMessage(1, resources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < resources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, resources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ListResourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ListResourcesResponse other = + (com.google.cloud.config.v1.ListResourcesResponse) obj; + + if (!getResourcesList().equals(other.getResourcesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ListResourcesResponse 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 response to a 'ListResources' call. Contains a list of Resources.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ListResourcesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ListResourcesResponse) + com.google.cloud.config.v1.ListResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListResourcesResponse.class, + com.google.cloud.config.v1.ListResourcesResponse.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ListResourcesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + } else { + resources_ = null; + resourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListResourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListResourcesResponse getDefaultInstanceForType() { + return com.google.cloud.config.v1.ListResourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ListResourcesResponse build() { + com.google.cloud.config.v1.ListResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListResourcesResponse buildPartial() { + com.google.cloud.config.v1.ListResourcesResponse result = + new com.google.cloud.config.v1.ListResourcesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.config.v1.ListResourcesResponse result) { + if (resourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.config.v1.ListResourcesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ListResourcesResponse) { + return mergeFrom((com.google.cloud.config.v1.ListResourcesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ListResourcesResponse other) { + if (other == com.google.cloud.config.v1.ListResourcesResponse.getDefaultInstance()) + return this; + if (resourcesBuilder_ == null) { + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + } else { + if (!other.resources_.isEmpty()) { + if (resourcesBuilder_.isEmpty()) { + resourcesBuilder_.dispose(); + resourcesBuilder_ = null; + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + resourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourcesFieldBuilder() + : null; + } else { + resourcesBuilder_.addAllMessages(other.resources_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.config.v1.Resource m = + input.readMessage( + com.google.cloud.config.v1.Resource.parser(), extensionRegistry); + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(m); + } else { + resourcesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List resources_ = + java.util.Collections.emptyList(); + + private void ensureResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resources_ = new java.util.ArrayList(resources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.Resource, + com.google.cloud.config.v1.Resource.Builder, + com.google.cloud.config.v1.ResourceOrBuilder> + resourcesBuilder_; + + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public java.util.List getResourcesList() { + if (resourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resources_); + } else { + return resourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public int getResourcesCount() { + if (resourcesBuilder_ == null) { + return resources_.size(); + } else { + return resourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public com.google.cloud.config.v1.Resource getResources(int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public Builder setResources(int index, com.google.cloud.config.v1.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public Builder setResources( + int index, com.google.cloud.config.v1.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.set(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public Builder addResources(com.google.cloud.config.v1.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + onChanged(); + } else { + resourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public Builder addResources(int index, com.google.cloud.config.v1.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(index, value); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public Builder addResources(com.google.cloud.config.v1.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public Builder addResources( + int index, com.google.cloud.config.v1.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public Builder addAllResources( + java.lang.Iterable values) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_); + onChanged(); + } else { + resourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public Builder removeResources(int index) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.remove(index); + onChanged(); + } else { + resourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public com.google.cloud.config.v1.Resource.Builder getResourcesBuilder(int index) { + return getResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public com.google.cloud.config.v1.ResourceOrBuilder getResourcesOrBuilder(int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public java.util.List + getResourcesOrBuilderList() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resources_); + } + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public com.google.cloud.config.v1.Resource.Builder addResourcesBuilder() { + return getResourcesFieldBuilder() + .addBuilder(com.google.cloud.config.v1.Resource.getDefaultInstance()); + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public com.google.cloud.config.v1.Resource.Builder addResourcesBuilder(int index) { + return getResourcesFieldBuilder() + .addBuilder(index, com.google.cloud.config.v1.Resource.getDefaultInstance()); + } + /** + * + * + *
+     * List of [Resources][]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + public java.util.List getResourcesBuilderList() { + return getResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.Resource, + com.google.cloud.config.v1.Resource.Builder, + com.google.cloud.config.v1.ResourceOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.Resource, + com.google.cloud.config.v1.Resource.Builder, + com.google.cloud.config.v1.ResourceOrBuilder>( + resources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to request the next page of resources from the 'ListResources'
+     * method. The value of an empty string means that there are no more resources
+     * to return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to request the next page of resources from the 'ListResources'
+     * method. The value of an empty string means that there are no more resources
+     * to return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to request the next page of resources from the 'ListResources'
+     * method. The value of an empty string means that there are no more resources
+     * to return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to request the next page of resources from the 'ListResources'
+     * method. The value of an empty string means that there are no more resources
+     * to return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to request the next page of resources from the 'ListResources'
+     * method. The value of an empty string means that there are no more resources
+     * to return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ListResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ListResourcesResponse) + private static final com.google.cloud.config.v1.ListResourcesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ListResourcesResponse(); + } + + public static com.google.cloud.config.v1.ListResourcesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListResourcesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListResourcesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesResponseOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesResponseOrBuilder.java new file mode 100644 index 000000000000..02a67a8d4151 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListResourcesResponseOrBuilder.java @@ -0,0 +1,157 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ListResourcesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ListResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of [Resources][]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + java.util.List getResourcesList(); + /** + * + * + *
+   * List of [Resources][]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + com.google.cloud.config.v1.Resource getResources(int index); + /** + * + * + *
+   * List of [Resources][]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + int getResourcesCount(); + /** + * + * + *
+   * List of [Resources][]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + java.util.List + getResourcesOrBuilderList(); + /** + * + * + *
+   * List of [Resources][]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Resource resources = 1; + */ + com.google.cloud.config.v1.ResourceOrBuilder getResourcesOrBuilder(int index); + + /** + * + * + *
+   * A token to request the next page of resources from the 'ListResources'
+   * method. The value of an empty string means that there are no more resources
+   * to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to request the next page of resources from the 'ListResources'
+   * method. The value of an empty string means that there are no more resources
+   * to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsRequest.java new file mode 100644 index 000000000000..1fe162910bc0 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsRequest.java @@ -0,0 +1,1446 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to list Revisions passed to a 'ListRevisions' call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ListRevisionsRequest} + */ +public final class ListRevisionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ListRevisionsRequest) + ListRevisionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRevisionsRequest.newBuilder() to construct. + private ListRevisionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRevisionsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRevisionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListRevisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListRevisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListRevisionsRequest.class, + com.google.cloud.config.v1.ListRevisionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent in whose context the Revisions are listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent in whose context the Revisions are listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * When requesting a page of resources, `page_size` specifies number of
+   * resources to return. If unspecified or set to 0, all resources will be
+   * returned.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Token returned by previous call to 'ListRevisions' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token returned by previous call to 'ListRevisions' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Lists the Revisions that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+   * operator which is roughly synonymous with equality). {field} can refer to a
+   * proto or JSON field, or a synthetic field. Field names can be camelCase or
+   * snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
+   *
+   * - Filter by labels:
+   *   - Resources that have a key called 'foo'
+   *     labels.foo:*
+   *   - Resources that have a key called 'foo' whose value is 'bar'
+   *     labels.foo = bar
+   *
+   * - Filter by state:
+   *   - Revisions in CREATING state.
+   *     state=CREATING
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Lists the Revisions that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+   * operator which is roughly synonymous with equality). {field} can refer to a
+   * proto or JSON field, or a synthetic field. Field names can be camelCase or
+   * snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
+   *
+   * - Filter by labels:
+   *   - Resources that have a key called 'foo'
+   *     labels.foo:*
+   *   - Resources that have a key called 'foo' whose value is 'bar'
+   *     labels.foo = bar
+   *
+   * - Filter by state:
+   *   - Revisions in CREATING state.
+   *     state=CREATING
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ListRevisionsRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ListRevisionsRequest other = + (com.google.cloud.config.v1.ListRevisionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ListRevisionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to list Revisions passed to a 'ListRevisions' call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ListRevisionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ListRevisionsRequest) + com.google.cloud.config.v1.ListRevisionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListRevisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListRevisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListRevisionsRequest.class, + com.google.cloud.config.v1.ListRevisionsRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ListRevisionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListRevisionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListRevisionsRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.ListRevisionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ListRevisionsRequest build() { + com.google.cloud.config.v1.ListRevisionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListRevisionsRequest buildPartial() { + com.google.cloud.config.v1.ListRevisionsRequest result = + new com.google.cloud.config.v1.ListRevisionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.ListRevisionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ListRevisionsRequest) { + return mergeFrom((com.google.cloud.config.v1.ListRevisionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ListRevisionsRequest other) { + if (other == com.google.cloud.config.v1.ListRevisionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent in whose context the Revisions are listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the Revisions are listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent in whose context the Revisions are listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the Revisions are listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent in whose context the Revisions are listed. The parent
+     * value is in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * When requesting a page of resources, `page_size` specifies number of
+     * resources to return. If unspecified or set to 0, all resources will be
+     * returned.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * When requesting a page of resources, `page_size` specifies number of
+     * resources to return. If unspecified or set to 0, all resources will be
+     * returned.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * When requesting a page of resources, `page_size` specifies number of
+     * resources to return. If unspecified or set to 0, all resources will be
+     * returned.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Token returned by previous call to 'ListRevisions' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token returned by previous call to 'ListRevisions' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token returned by previous call to 'ListRevisions' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Token returned by previous call to 'ListRevisions' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Token returned by previous call to 'ListRevisions' which specifies the
+     * position in the list from where to continue listing the resources.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Lists the Revisions that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+     * operator which is roughly synonymous with equality). {field} can refer to a
+     * proto or JSON field, or a synthetic field. Field names can be camelCase or
+     * snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
+     *
+     * - Filter by labels:
+     *   - Resources that have a key called 'foo'
+     *     labels.foo:*
+     *   - Resources that have a key called 'foo' whose value is 'bar'
+     *     labels.foo = bar
+     *
+     * - Filter by state:
+     *   - Revisions in CREATING state.
+     *     state=CREATING
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Lists the Revisions that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+     * operator which is roughly synonymous with equality). {field} can refer to a
+     * proto or JSON field, or a synthetic field. Field names can be camelCase or
+     * snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
+     *
+     * - Filter by labels:
+     *   - Resources that have a key called 'foo'
+     *     labels.foo:*
+     *   - Resources that have a key called 'foo' whose value is 'bar'
+     *     labels.foo = bar
+     *
+     * - Filter by state:
+     *   - Revisions in CREATING state.
+     *     state=CREATING
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Lists the Revisions that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+     * operator which is roughly synonymous with equality). {field} can refer to a
+     * proto or JSON field, or a synthetic field. Field names can be camelCase or
+     * snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
+     *
+     * - Filter by labels:
+     *   - Resources that have a key called 'foo'
+     *     labels.foo:*
+     *   - Resources that have a key called 'foo' whose value is 'bar'
+     *     labels.foo = bar
+     *
+     * - Filter by state:
+     *   - Revisions in CREATING state.
+     *     state=CREATING
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the Revisions that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+     * operator which is roughly synonymous with equality). {field} can refer to a
+     * proto or JSON field, or a synthetic field. Field names can be camelCase or
+     * snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
+     *
+     * - Filter by labels:
+     *   - Resources that have a key called 'foo'
+     *     labels.foo:*
+     *   - Resources that have a key called 'foo' whose value is 'bar'
+     *     labels.foo = bar
+     *
+     * - Filter by state:
+     *   - Revisions in CREATING state.
+     *     state=CREATING
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Lists the Revisions that match the filter expression. A filter
+     * expression filters the resources listed in the response. The expression
+     * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+     * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+     * operator which is roughly synonymous with equality). {field} can refer to a
+     * proto or JSON field, or a synthetic field. Field names can be camelCase or
+     * snake_case.
+     *
+     * Examples:
+     * - Filter by name:
+     *   name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
+     *
+     * - Filter by labels:
+     *   - Resources that have a key called 'foo'
+     *     labels.foo:*
+     *   - Resources that have a key called 'foo' whose value is 'bar'
+     *     labels.foo = bar
+     *
+     * - Filter by state:
+     *   - Revisions in CREATING state.
+     *     state=CREATING
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to use to sort the list.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ListRevisionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ListRevisionsRequest) + private static final com.google.cloud.config.v1.ListRevisionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ListRevisionsRequest(); + } + + public static com.google.cloud.config.v1.ListRevisionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRevisionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListRevisionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsRequestOrBuilder.java new file mode 100644 index 000000000000..f14ba3148a3f --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsRequestOrBuilder.java @@ -0,0 +1,190 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ListRevisionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ListRevisionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent in whose context the Revisions are listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent in whose context the Revisions are listed. The parent
+   * value is in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * When requesting a page of resources, `page_size` specifies number of
+   * resources to return. If unspecified or set to 0, all resources will be
+   * returned.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Token returned by previous call to 'ListRevisions' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Token returned by previous call to 'ListRevisions' which specifies the
+   * position in the list from where to continue listing the resources.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Lists the Revisions that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+   * operator which is roughly synonymous with equality). {field} can refer to a
+   * proto or JSON field, or a synthetic field. Field names can be camelCase or
+   * snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
+   *
+   * - Filter by labels:
+   *   - Resources that have a key called 'foo'
+   *     labels.foo:*
+   *   - Resources that have a key called 'foo' whose value is 'bar'
+   *     labels.foo = bar
+   *
+   * - Filter by state:
+   *   - Revisions in CREATING state.
+   *     state=CREATING
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Lists the Revisions that match the filter expression. A filter
+   * expression filters the resources listed in the response. The expression
+   * must be of the form '{field} {operator} {value}' where operators: '<', '>',
+   * '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS
+   * operator which is roughly synonymous with equality). {field} can refer to a
+   * proto or JSON field, or a synthetic field. Field names can be camelCase or
+   * snake_case.
+   *
+   * Examples:
+   * - Filter by name:
+   *   name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar
+   *
+   * - Filter by labels:
+   *   - Resources that have a key called 'foo'
+   *     labels.foo:*
+   *   - Resources that have a key called 'foo' whose value is 'bar'
+   *     labels.foo = bar
+   *
+   * - Filter by state:
+   *   - Revisions in CREATING state.
+   *     state=CREATING
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to use to sort the list.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsResponse.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsResponse.java new file mode 100644 index 000000000000..8488c3fd2ac9 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsResponse.java @@ -0,0 +1,1407 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A response to a 'ListRevisions' call. Contains a list of Revisions.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ListRevisionsResponse} + */ +public final class ListRevisionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ListRevisionsResponse) + ListRevisionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRevisionsResponse.newBuilder() to construct. + private ListRevisionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRevisionsResponse() { + revisions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRevisionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListRevisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListRevisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListRevisionsResponse.class, + com.google.cloud.config.v1.ListRevisionsResponse.Builder.class); + } + + public static final int REVISIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List revisions_; + /** + * + * + *
+   * List of [Revision][google.cloud.config.v1.Revision]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + @java.lang.Override + public java.util.List getRevisionsList() { + return revisions_; + } + /** + * + * + *
+   * List of [Revision][google.cloud.config.v1.Revision]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + @java.lang.Override + public java.util.List + getRevisionsOrBuilderList() { + return revisions_; + } + /** + * + * + *
+   * List of [Revision][google.cloud.config.v1.Revision]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + @java.lang.Override + public int getRevisionsCount() { + return revisions_.size(); + } + /** + * + * + *
+   * List of [Revision][google.cloud.config.v1.Revision]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + @java.lang.Override + public com.google.cloud.config.v1.Revision getRevisions(int index) { + return revisions_.get(index); + } + /** + * + * + *
+   * List of [Revision][google.cloud.config.v1.Revision]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + @java.lang.Override + public com.google.cloud.config.v1.RevisionOrBuilder getRevisionsOrBuilder(int index) { + return revisions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to request the next page of resources from the 'ListRevisions'
+   * method. The value of an empty string means that there are no more resources
+   * to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to request the next page of resources from the 'ListRevisions'
+   * method. The value of an empty string means that there are no more resources
+   * to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < revisions_.size(); i++) { + output.writeMessage(1, revisions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < revisions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, revisions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ListRevisionsResponse)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ListRevisionsResponse other = + (com.google.cloud.config.v1.ListRevisionsResponse) obj; + + if (!getRevisionsList().equals(other.getRevisionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRevisionsCount() > 0) { + hash = (37 * hash) + REVISIONS_FIELD_NUMBER; + hash = (53 * hash) + getRevisionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ListRevisionsResponse 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 response to a 'ListRevisions' call. Contains a list of Revisions.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ListRevisionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ListRevisionsResponse) + com.google.cloud.config.v1.ListRevisionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListRevisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListRevisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ListRevisionsResponse.class, + com.google.cloud.config.v1.ListRevisionsResponse.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ListRevisionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (revisionsBuilder_ == null) { + revisions_ = java.util.Collections.emptyList(); + } else { + revisions_ = null; + revisionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ListRevisionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListRevisionsResponse getDefaultInstanceForType() { + return com.google.cloud.config.v1.ListRevisionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ListRevisionsResponse build() { + com.google.cloud.config.v1.ListRevisionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListRevisionsResponse buildPartial() { + com.google.cloud.config.v1.ListRevisionsResponse result = + new com.google.cloud.config.v1.ListRevisionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.config.v1.ListRevisionsResponse result) { + if (revisionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + revisions_ = java.util.Collections.unmodifiableList(revisions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.revisions_ = revisions_; + } else { + result.revisions_ = revisionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.config.v1.ListRevisionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ListRevisionsResponse) { + return mergeFrom((com.google.cloud.config.v1.ListRevisionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ListRevisionsResponse other) { + if (other == com.google.cloud.config.v1.ListRevisionsResponse.getDefaultInstance()) + return this; + if (revisionsBuilder_ == null) { + if (!other.revisions_.isEmpty()) { + if (revisions_.isEmpty()) { + revisions_ = other.revisions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRevisionsIsMutable(); + revisions_.addAll(other.revisions_); + } + onChanged(); + } + } else { + if (!other.revisions_.isEmpty()) { + if (revisionsBuilder_.isEmpty()) { + revisionsBuilder_.dispose(); + revisionsBuilder_ = null; + revisions_ = other.revisions_; + bitField0_ = (bitField0_ & ~0x00000001); + revisionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRevisionsFieldBuilder() + : null; + } else { + revisionsBuilder_.addAllMessages(other.revisions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.config.v1.Revision m = + input.readMessage( + com.google.cloud.config.v1.Revision.parser(), extensionRegistry); + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + revisions_.add(m); + } else { + revisionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List revisions_ = + java.util.Collections.emptyList(); + + private void ensureRevisionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + revisions_ = new java.util.ArrayList(revisions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.Revision, + com.google.cloud.config.v1.Revision.Builder, + com.google.cloud.config.v1.RevisionOrBuilder> + revisionsBuilder_; + + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public java.util.List getRevisionsList() { + if (revisionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(revisions_); + } else { + return revisionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public int getRevisionsCount() { + if (revisionsBuilder_ == null) { + return revisions_.size(); + } else { + return revisionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public com.google.cloud.config.v1.Revision getRevisions(int index) { + if (revisionsBuilder_ == null) { + return revisions_.get(index); + } else { + return revisionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public Builder setRevisions(int index, com.google.cloud.config.v1.Revision value) { + if (revisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRevisionsIsMutable(); + revisions_.set(index, value); + onChanged(); + } else { + revisionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public Builder setRevisions( + int index, com.google.cloud.config.v1.Revision.Builder builderForValue) { + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + revisions_.set(index, builderForValue.build()); + onChanged(); + } else { + revisionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public Builder addRevisions(com.google.cloud.config.v1.Revision value) { + if (revisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRevisionsIsMutable(); + revisions_.add(value); + onChanged(); + } else { + revisionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public Builder addRevisions(int index, com.google.cloud.config.v1.Revision value) { + if (revisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRevisionsIsMutable(); + revisions_.add(index, value); + onChanged(); + } else { + revisionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public Builder addRevisions(com.google.cloud.config.v1.Revision.Builder builderForValue) { + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + revisions_.add(builderForValue.build()); + onChanged(); + } else { + revisionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public Builder addRevisions( + int index, com.google.cloud.config.v1.Revision.Builder builderForValue) { + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + revisions_.add(index, builderForValue.build()); + onChanged(); + } else { + revisionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public Builder addAllRevisions( + java.lang.Iterable values) { + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, revisions_); + onChanged(); + } else { + revisionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public Builder clearRevisions() { + if (revisionsBuilder_ == null) { + revisions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + revisionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public Builder removeRevisions(int index) { + if (revisionsBuilder_ == null) { + ensureRevisionsIsMutable(); + revisions_.remove(index); + onChanged(); + } else { + revisionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public com.google.cloud.config.v1.Revision.Builder getRevisionsBuilder(int index) { + return getRevisionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public com.google.cloud.config.v1.RevisionOrBuilder getRevisionsOrBuilder(int index) { + if (revisionsBuilder_ == null) { + return revisions_.get(index); + } else { + return revisionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public java.util.List + getRevisionsOrBuilderList() { + if (revisionsBuilder_ != null) { + return revisionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(revisions_); + } + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public com.google.cloud.config.v1.Revision.Builder addRevisionsBuilder() { + return getRevisionsFieldBuilder() + .addBuilder(com.google.cloud.config.v1.Revision.getDefaultInstance()); + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public com.google.cloud.config.v1.Revision.Builder addRevisionsBuilder(int index) { + return getRevisionsFieldBuilder() + .addBuilder(index, com.google.cloud.config.v1.Revision.getDefaultInstance()); + } + /** + * + * + *
+     * List of [Revision][google.cloud.config.v1.Revision]s.
+     * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + public java.util.List getRevisionsBuilderList() { + return getRevisionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.Revision, + com.google.cloud.config.v1.Revision.Builder, + com.google.cloud.config.v1.RevisionOrBuilder> + getRevisionsFieldBuilder() { + if (revisionsBuilder_ == null) { + revisionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.Revision, + com.google.cloud.config.v1.Revision.Builder, + com.google.cloud.config.v1.RevisionOrBuilder>( + revisions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + revisions_ = null; + } + return revisionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to request the next page of resources from the 'ListRevisions'
+     * method. The value of an empty string means that there are no more resources
+     * to return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to request the next page of resources from the 'ListRevisions'
+     * method. The value of an empty string means that there are no more resources
+     * to return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to request the next page of resources from the 'ListRevisions'
+     * method. The value of an empty string means that there are no more resources
+     * to return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to request the next page of resources from the 'ListRevisions'
+     * method. The value of an empty string means that there are no more resources
+     * to return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to request the next page of resources from the 'ListRevisions'
+     * method. The value of an empty string means that there are no more resources
+     * to return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ListRevisionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ListRevisionsResponse) + private static final com.google.cloud.config.v1.ListRevisionsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ListRevisionsResponse(); + } + + public static com.google.cloud.config.v1.ListRevisionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRevisionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ListRevisionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsResponseOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsResponseOrBuilder.java new file mode 100644 index 000000000000..8b8a13ac9546 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListRevisionsResponseOrBuilder.java @@ -0,0 +1,157 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ListRevisionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ListRevisionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of [Revision][google.cloud.config.v1.Revision]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + java.util.List getRevisionsList(); + /** + * + * + *
+   * List of [Revision][google.cloud.config.v1.Revision]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + com.google.cloud.config.v1.Revision getRevisions(int index); + /** + * + * + *
+   * List of [Revision][google.cloud.config.v1.Revision]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + int getRevisionsCount(); + /** + * + * + *
+   * List of [Revision][google.cloud.config.v1.Revision]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + java.util.List + getRevisionsOrBuilderList(); + /** + * + * + *
+   * List of [Revision][google.cloud.config.v1.Revision]s.
+   * 
+ * + * repeated .google.cloud.config.v1.Revision revisions = 1; + */ + com.google.cloud.config.v1.RevisionOrBuilder getRevisionsOrBuilder(int index); + + /** + * + * + *
+   * A token to request the next page of resources from the 'ListRevisions'
+   * method. The value of an empty string means that there are no more resources
+   * to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to request the next page of resources from the 'ListRevisions'
+   * method. The value of an empty string means that there are no more resources
+   * to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LocationName.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LocationName.java new file mode 100644 index 000000000000..7e428e7ab440 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * 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.cloud.config.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockDeploymentRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockDeploymentRequest.java new file mode 100644 index 000000000000..13de2ce70927 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockDeploymentRequest.java @@ -0,0 +1,645 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to lock a deployment passed to a 'LockDeployment' call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.LockDeploymentRequest} + */ +public final class LockDeploymentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.LockDeploymentRequest) + LockDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use LockDeploymentRequest.newBuilder() to construct. + private LockDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LockDeploymentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LockDeploymentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_LockDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_LockDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.LockDeploymentRequest.class, + com.google.cloud.config.v1.LockDeploymentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.LockDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.LockDeploymentRequest other = + (com.google.cloud.config.v1.LockDeploymentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.LockDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to lock a deployment passed to a 'LockDeployment' call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.LockDeploymentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.LockDeploymentRequest) + com.google.cloud.config.v1.LockDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_LockDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_LockDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.LockDeploymentRequest.class, + com.google.cloud.config.v1.LockDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.LockDeploymentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_LockDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.LockDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.LockDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.LockDeploymentRequest build() { + com.google.cloud.config.v1.LockDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.LockDeploymentRequest buildPartial() { + com.google.cloud.config.v1.LockDeploymentRequest result = + new com.google.cloud.config.v1.LockDeploymentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.LockDeploymentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.LockDeploymentRequest) { + return mergeFrom((com.google.cloud.config.v1.LockDeploymentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.LockDeploymentRequest other) { + if (other == com.google.cloud.config.v1.LockDeploymentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.LockDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.LockDeploymentRequest) + private static final com.google.cloud.config.v1.LockDeploymentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.LockDeploymentRequest(); + } + + public static com.google.cloud.config.v1.LockDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LockDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.LockDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockDeploymentRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..8b35041a742a --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockDeploymentRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface LockDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.LockDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockInfo.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockInfo.java new file mode 100644 index 000000000000..75ad02ffb0ac --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockInfo.java @@ -0,0 +1,1519 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * Details about the lock which locked the deployment.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.LockInfo} + */ +public final class LockInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.LockInfo) + LockInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use LockInfo.newBuilder() to construct. + private LockInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LockInfo() { + operation_ = ""; + info_ = ""; + who_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LockInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_LockInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_LockInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.LockInfo.class, + com.google.cloud.config.v1.LockInfo.Builder.class); + } + + public static final int LOCK_ID_FIELD_NUMBER = 1; + private long lockId_ = 0L; + /** + * + * + *
+   * Unique ID for the lock to be overridden with generation ID in the backend.
+   * 
+ * + * int64 lock_id = 1; + * + * @return The lockId. + */ + @java.lang.Override + public long getLockId() { + return lockId_; + } + + public static final int OPERATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object operation_ = ""; + /** + * + * + *
+   * Terraform operation, provided by the caller.
+   * 
+ * + * string operation = 2; + * + * @return The operation. + */ + @java.lang.Override + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operation_ = s; + return s; + } + } + /** + * + * + *
+   * Terraform operation, provided by the caller.
+   * 
+ * + * string operation = 2; + * + * @return The bytes for operation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFO_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object info_ = ""; + /** + * + * + *
+   * Extra information to store with the lock, provided by the caller.
+   * 
+ * + * string info = 3; + * + * @return The info. + */ + @java.lang.Override + public java.lang.String getInfo() { + java.lang.Object ref = info_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + info_ = s; + return s; + } + } + /** + * + * + *
+   * Extra information to store with the lock, provided by the caller.
+   * 
+ * + * string info = 3; + * + * @return The bytes for info. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInfoBytes() { + java.lang.Object ref = info_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + info_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WHO_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object who_ = ""; + /** + * + * + *
+   * user@hostname when available
+   * 
+ * + * string who = 4; + * + * @return The who. + */ + @java.lang.Override + public java.lang.String getWho() { + java.lang.Object ref = who_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + who_ = s; + return s; + } + } + /** + * + * + *
+   * user@hostname when available
+   * 
+ * + * string who = 4; + * + * @return The bytes for who. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWhoBytes() { + java.lang.Object ref = who_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + who_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + /** + * + * + *
+   * Terraform version
+   * 
+ * + * string version = 5; + * + * @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; + } + } + /** + * + * + *
+   * Terraform version
+   * 
+ * + * string version = 5; + * + * @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 CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Time that the lock was taken.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Time that the lock was taken.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Time that the lock was taken.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + 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 (lockId_ != 0L) { + output.writeInt64(1, lockId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, operation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(info_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, info_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(who_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, who_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lockId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, lockId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, operation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(info_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, info_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(who_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, who_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.LockInfo)) { + return super.equals(obj); + } + com.google.cloud.config.v1.LockInfo other = (com.google.cloud.config.v1.LockInfo) obj; + + if (getLockId() != other.getLockId()) return false; + if (!getOperation().equals(other.getOperation())) return false; + if (!getInfo().equals(other.getInfo())) return false; + if (!getWho().equals(other.getWho())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) 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) + LOCK_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLockId()); + hash = (37 * hash) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getOperation().hashCode(); + hash = (37 * hash) + INFO_FIELD_NUMBER; + hash = (53 * hash) + getInfo().hashCode(); + hash = (37 * hash) + WHO_FIELD_NUMBER; + hash = (53 * hash) + getWho().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.LockInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.LockInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.LockInfo parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.LockInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.LockInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.LockInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.LockInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.LockInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.LockInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.LockInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.LockInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.LockInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.LockInfo 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 the lock which locked the deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.LockInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.LockInfo) + com.google.cloud.config.v1.LockInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_LockInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_LockInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.LockInfo.class, + com.google.cloud.config.v1.LockInfo.Builder.class); + } + + // Construct using com.google.cloud.config.v1.LockInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lockId_ = 0L; + operation_ = ""; + info_ = ""; + who_ = ""; + version_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_LockInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.LockInfo getDefaultInstanceForType() { + return com.google.cloud.config.v1.LockInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.LockInfo build() { + com.google.cloud.config.v1.LockInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.LockInfo buildPartial() { + com.google.cloud.config.v1.LockInfo result = new com.google.cloud.config.v1.LockInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.LockInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lockId_ = lockId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.operation_ = operation_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.info_ = info_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.who_ = who_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.LockInfo) { + return mergeFrom((com.google.cloud.config.v1.LockInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.LockInfo other) { + if (other == com.google.cloud.config.v1.LockInfo.getDefaultInstance()) return this; + if (other.getLockId() != 0L) { + setLockId(other.getLockId()); + } + if (!other.getOperation().isEmpty()) { + operation_ = other.operation_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getInfo().isEmpty()) { + info_ = other.info_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getWho().isEmpty()) { + who_ = other.who_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + 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: + { + lockId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + operation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + info_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + who_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + 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 long lockId_; + /** + * + * + *
+     * Unique ID for the lock to be overridden with generation ID in the backend.
+     * 
+ * + * int64 lock_id = 1; + * + * @return The lockId. + */ + @java.lang.Override + public long getLockId() { + return lockId_; + } + /** + * + * + *
+     * Unique ID for the lock to be overridden with generation ID in the backend.
+     * 
+ * + * int64 lock_id = 1; + * + * @param value The lockId to set. + * @return This builder for chaining. + */ + public Builder setLockId(long value) { + + lockId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique ID for the lock to be overridden with generation ID in the backend.
+     * 
+ * + * int64 lock_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearLockId() { + bitField0_ = (bitField0_ & ~0x00000001); + lockId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object operation_ = ""; + /** + * + * + *
+     * Terraform operation, provided by the caller.
+     * 
+ * + * string operation = 2; + * + * @return The operation. + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Terraform operation, provided by the caller.
+     * 
+ * + * string operation = 2; + * + * @return The bytes for operation. + */ + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Terraform operation, provided by the caller.
+     * 
+ * + * string operation = 2; + * + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Terraform operation, provided by the caller.
+     * 
+ * + * string operation = 2; + * + * @return This builder for chaining. + */ + public Builder clearOperation() { + operation_ = getDefaultInstance().getOperation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Terraform operation, provided by the caller.
+     * 
+ * + * string operation = 2; + * + * @param value The bytes for operation to set. + * @return This builder for chaining. + */ + public Builder setOperationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object info_ = ""; + /** + * + * + *
+     * Extra information to store with the lock, provided by the caller.
+     * 
+ * + * string info = 3; + * + * @return The info. + */ + public java.lang.String getInfo() { + java.lang.Object ref = info_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + info_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Extra information to store with the lock, provided by the caller.
+     * 
+ * + * string info = 3; + * + * @return The bytes for info. + */ + public com.google.protobuf.ByteString getInfoBytes() { + java.lang.Object ref = info_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + info_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Extra information to store with the lock, provided by the caller.
+     * 
+ * + * string info = 3; + * + * @param value The info to set. + * @return This builder for chaining. + */ + public Builder setInfo(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + info_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Extra information to store with the lock, provided by the caller.
+     * 
+ * + * string info = 3; + * + * @return This builder for chaining. + */ + public Builder clearInfo() { + info_ = getDefaultInstance().getInfo(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Extra information to store with the lock, provided by the caller.
+     * 
+ * + * string info = 3; + * + * @param value The bytes for info to set. + * @return This builder for chaining. + */ + public Builder setInfoBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + info_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object who_ = ""; + /** + * + * + *
+     * user@hostname when available
+     * 
+ * + * string who = 4; + * + * @return The who. + */ + public java.lang.String getWho() { + java.lang.Object ref = who_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + who_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * user@hostname when available
+     * 
+ * + * string who = 4; + * + * @return The bytes for who. + */ + public com.google.protobuf.ByteString getWhoBytes() { + java.lang.Object ref = who_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + who_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * user@hostname when available
+     * 
+ * + * string who = 4; + * + * @param value The who to set. + * @return This builder for chaining. + */ + public Builder setWho(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + who_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * user@hostname when available
+     * 
+ * + * string who = 4; + * + * @return This builder for chaining. + */ + public Builder clearWho() { + who_ = getDefaultInstance().getWho(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * user@hostname when available
+     * 
+ * + * string who = 4; + * + * @param value The bytes for who to set. + * @return This builder for chaining. + */ + public Builder setWhoBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + who_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Terraform version
+     * 
+ * + * string version = 5; + * + * @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; + } + } + /** + * + * + *
+     * Terraform version
+     * 
+ * + * string version = 5; + * + * @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; + } + } + /** + * + * + *
+     * Terraform version
+     * 
+ * + * string version = 5; + * + * @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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Terraform version
+     * 
+ * + * string version = 5; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Terraform version
+     * 
+ * + * string version = 5; + * + * @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_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Time that the lock was taken.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Time that the lock was taken.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time that the lock was taken.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Time that the lock was taken.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Time that the lock was taken.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Time that the lock was taken.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Time that the lock was taken.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time that the lock was taken.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Time that the lock was taken.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.LockInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.LockInfo) + private static final com.google.cloud.config.v1.LockInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.LockInfo(); + } + + public static com.google.cloud.config.v1.LockInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LockInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.LockInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockInfoOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockInfoOrBuilder.java new file mode 100644 index 000000000000..dce292b76709 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/LockInfoOrBuilder.java @@ -0,0 +1,173 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface LockInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.LockInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Unique ID for the lock to be overridden with generation ID in the backend.
+   * 
+ * + * int64 lock_id = 1; + * + * @return The lockId. + */ + long getLockId(); + + /** + * + * + *
+   * Terraform operation, provided by the caller.
+   * 
+ * + * string operation = 2; + * + * @return The operation. + */ + java.lang.String getOperation(); + /** + * + * + *
+   * Terraform operation, provided by the caller.
+   * 
+ * + * string operation = 2; + * + * @return The bytes for operation. + */ + com.google.protobuf.ByteString getOperationBytes(); + + /** + * + * + *
+   * Extra information to store with the lock, provided by the caller.
+   * 
+ * + * string info = 3; + * + * @return The info. + */ + java.lang.String getInfo(); + /** + * + * + *
+   * Extra information to store with the lock, provided by the caller.
+   * 
+ * + * string info = 3; + * + * @return The bytes for info. + */ + com.google.protobuf.ByteString getInfoBytes(); + + /** + * + * + *
+   * user@hostname when available
+   * 
+ * + * string who = 4; + * + * @return The who. + */ + java.lang.String getWho(); + /** + * + * + *
+   * user@hostname when available
+   * 
+ * + * string who = 4; + * + * @return The bytes for who. + */ + com.google.protobuf.ByteString getWhoBytes(); + + /** + * + * + *
+   * Terraform version
+   * 
+ * + * string version = 5; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Terraform version
+   * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Time that the lock was taken.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Time that the lock was taken.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Time that the lock was taken.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/OperationMetadata.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/OperationMetadata.java new file mode 100644 index 000000000000..4c010352af8c --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/OperationMetadata.java @@ -0,0 +1,2235 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.OperationMetadata.class, + com.google.cloud.config.v1.OperationMetadata.Builder.class); + } + + private int resourceMetadataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object resourceMetadata_; + + public enum ResourceMetadataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DEPLOYMENT_METADATA(8), + RESOURCEMETADATA_NOT_SET(0); + private final int value; + + private ResourceMetadataCase(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 ResourceMetadataCase valueOf(int value) { + return forNumber(value); + } + + public static ResourceMetadataCase forNumber(int value) { + switch (value) { + case 8: + return DEPLOYMENT_METADATA; + case 0: + return RESOURCEMETADATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResourceMetadataCase getResourceMetadataCase() { + return ResourceMetadataCase.forNumber(resourceMetadataCase_); + } + + public static final int DEPLOYMENT_METADATA_FIELD_NUMBER = 8; + /** + * + * + *
+   * Output only. Metadata about the deployment operation state.
+   * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deploymentMetadata field is set. + */ + @java.lang.Override + public boolean hasDeploymentMetadata() { + return resourceMetadataCase_ == 8; + } + /** + * + * + *
+   * Output only. Metadata about the deployment operation state.
+   * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deploymentMetadata. + */ + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOperationMetadata getDeploymentMetadata() { + if (resourceMetadataCase_ == 8) { + return (com.google.cloud.config.v1.DeploymentOperationMetadata) resourceMetadata_; + } + return com.google.cloud.config.v1.DeploymentOperationMetadata.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Metadata about the deployment operation state.
+   * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOperationMetadataOrBuilder + getDeploymentMetadataOrBuilder() { + if (resourceMetadataCase_ == 8) { + return (com.google.cloud.config.v1.DeploymentOperationMetadata) resourceMetadata_; + } + return com.google.cloud.config.v1.DeploymentOperationMetadata.getDefaultInstance(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Time when the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation of the
+   * operation. Operations that have successfully been cancelled have
+   * [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + if (resourceMetadataCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.config.v1.DeploymentOperationMetadata) resourceMetadata_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + if (resourceMetadataCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.config.v1.DeploymentOperationMetadata) resourceMetadata_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.config.v1.OperationMetadata other = + (com.google.cloud.config.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getResourceMetadataCase().equals(other.getResourceMetadataCase())) return false; + switch (resourceMetadataCase_) { + case 8: + if (!getDeploymentMetadata().equals(other.getDeploymentMetadata())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + switch (resourceMetadataCase_) { + case 8: + hash = (37 * hash) + DEPLOYMENT_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentMetadata().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.OperationMetadata) + com.google.cloud.config.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.OperationMetadata.class, + com.google.cloud.config.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.config.v1.OperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (deploymentMetadataBuilder_ != null) { + deploymentMetadataBuilder_.clear(); + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + resourceMetadataCase_ = 0; + resourceMetadata_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.config.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.OperationMetadata build() { + com.google.cloud.config.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.OperationMetadata buildPartial() { + com.google.cloud.config.v1.OperationMetadata result = + new com.google.cloud.config.v1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.apiVersion_ = apiVersion_; + } + } + + private void buildPartialOneofs(com.google.cloud.config.v1.OperationMetadata result) { + result.resourceMetadataCase_ = resourceMetadataCase_; + result.resourceMetadata_ = this.resourceMetadata_; + if (resourceMetadataCase_ == 8 && deploymentMetadataBuilder_ != null) { + result.resourceMetadata_ = deploymentMetadataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.config.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.OperationMetadata other) { + if (other == com.google.cloud.config.v1.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000080; + onChanged(); + } + switch (other.getResourceMetadataCase()) { + case DEPLOYMENT_METADATA: + { + mergeDeploymentMetadata(other.getDeploymentMetadata()); + break; + } + case RESOURCEMETADATA_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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + input.readMessage( + getDeploymentMetadataFieldBuilder().getBuilder(), extensionRegistry); + resourceMetadataCase_ = 8; + 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 resourceMetadataCase_ = 0; + private java.lang.Object resourceMetadata_; + + public ResourceMetadataCase getResourceMetadataCase() { + return ResourceMetadataCase.forNumber(resourceMetadataCase_); + } + + public Builder clearResourceMetadata() { + resourceMetadataCase_ = 0; + resourceMetadata_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.DeploymentOperationMetadata, + com.google.cloud.config.v1.DeploymentOperationMetadata.Builder, + com.google.cloud.config.v1.DeploymentOperationMetadataOrBuilder> + deploymentMetadataBuilder_; + /** + * + * + *
+     * Output only. Metadata about the deployment operation state.
+     * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deploymentMetadata field is set. + */ + @java.lang.Override + public boolean hasDeploymentMetadata() { + return resourceMetadataCase_ == 8; + } + /** + * + * + *
+     * Output only. Metadata about the deployment operation state.
+     * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deploymentMetadata. + */ + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOperationMetadata getDeploymentMetadata() { + if (deploymentMetadataBuilder_ == null) { + if (resourceMetadataCase_ == 8) { + return (com.google.cloud.config.v1.DeploymentOperationMetadata) resourceMetadata_; + } + return com.google.cloud.config.v1.DeploymentOperationMetadata.getDefaultInstance(); + } else { + if (resourceMetadataCase_ == 8) { + return deploymentMetadataBuilder_.getMessage(); + } + return com.google.cloud.config.v1.DeploymentOperationMetadata.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Metadata about the deployment operation state.
+     * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeploymentMetadata( + com.google.cloud.config.v1.DeploymentOperationMetadata value) { + if (deploymentMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceMetadata_ = value; + onChanged(); + } else { + deploymentMetadataBuilder_.setMessage(value); + } + resourceMetadataCase_ = 8; + return this; + } + /** + * + * + *
+     * Output only. Metadata about the deployment operation state.
+     * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeploymentMetadata( + com.google.cloud.config.v1.DeploymentOperationMetadata.Builder builderForValue) { + if (deploymentMetadataBuilder_ == null) { + resourceMetadata_ = builderForValue.build(); + onChanged(); + } else { + deploymentMetadataBuilder_.setMessage(builderForValue.build()); + } + resourceMetadataCase_ = 8; + return this; + } + /** + * + * + *
+     * Output only. Metadata about the deployment operation state.
+     * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeploymentMetadata( + com.google.cloud.config.v1.DeploymentOperationMetadata value) { + if (deploymentMetadataBuilder_ == null) { + if (resourceMetadataCase_ == 8 + && resourceMetadata_ + != com.google.cloud.config.v1.DeploymentOperationMetadata.getDefaultInstance()) { + resourceMetadata_ = + com.google.cloud.config.v1.DeploymentOperationMetadata.newBuilder( + (com.google.cloud.config.v1.DeploymentOperationMetadata) resourceMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceMetadata_ = value; + } + onChanged(); + } else { + if (resourceMetadataCase_ == 8) { + deploymentMetadataBuilder_.mergeFrom(value); + } else { + deploymentMetadataBuilder_.setMessage(value); + } + } + resourceMetadataCase_ = 8; + return this; + } + /** + * + * + *
+     * Output only. Metadata about the deployment operation state.
+     * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeploymentMetadata() { + if (deploymentMetadataBuilder_ == null) { + if (resourceMetadataCase_ == 8) { + resourceMetadataCase_ = 0; + resourceMetadata_ = null; + onChanged(); + } + } else { + if (resourceMetadataCase_ == 8) { + resourceMetadataCase_ = 0; + resourceMetadata_ = null; + } + deploymentMetadataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Metadata about the deployment operation state.
+     * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.DeploymentOperationMetadata.Builder + getDeploymentMetadataBuilder() { + return getDeploymentMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Metadata about the deployment operation state.
+     * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOperationMetadataOrBuilder + getDeploymentMetadataOrBuilder() { + if ((resourceMetadataCase_ == 8) && (deploymentMetadataBuilder_ != null)) { + return deploymentMetadataBuilder_.getMessageOrBuilder(); + } else { + if (resourceMetadataCase_ == 8) { + return (com.google.cloud.config.v1.DeploymentOperationMetadata) resourceMetadata_; + } + return com.google.cloud.config.v1.DeploymentOperationMetadata.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Metadata about the deployment operation state.
+     * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.DeploymentOperationMetadata, + com.google.cloud.config.v1.DeploymentOperationMetadata.Builder, + com.google.cloud.config.v1.DeploymentOperationMetadataOrBuilder> + getDeploymentMetadataFieldBuilder() { + if (deploymentMetadataBuilder_ == null) { + if (!(resourceMetadataCase_ == 8)) { + resourceMetadata_ = + com.google.cloud.config.v1.DeploymentOperationMetadata.getDefaultInstance(); + } + deploymentMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.DeploymentOperationMetadata, + com.google.cloud.config.v1.DeploymentOperationMetadata.Builder, + com.google.cloud.config.v1.DeploymentOperationMetadataOrBuilder>( + (com.google.cloud.config.v1.DeploymentOperationMetadata) resourceMetadata_, + getParentForChildren(), + isClean()); + resourceMetadata_ = null; + } + resourceMetadataCase_ = 8; + onChanged(); + return deploymentMetadataBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Time when the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Time when the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation of the
+     * operation. Operations that have successfully been cancelled have
+     * [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation of the
+     * operation. Operations that have successfully been cancelled have
+     * [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation of the
+     * operation. Operations that have successfully been cancelled have
+     * [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000040); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.OperationMetadata) + private static final com.google.cloud.config.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.OperationMetadata(); + } + + public static com.google.cloud.config.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/OperationMetadataOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..0c9f5031a4b6 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,261 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Metadata about the deployment operation state.
+   * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deploymentMetadata field is set. + */ + boolean hasDeploymentMetadata(); + /** + * + * + *
+   * Output only. Metadata about the deployment operation state.
+   * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deploymentMetadata. + */ + com.google.cloud.config.v1.DeploymentOperationMetadata getDeploymentMetadata(); + /** + * + * + *
+   * Output only. Metadata about the deployment operation state.
+   * 
+ * + * + * .google.cloud.config.v1.DeploymentOperationMetadata deployment_metadata = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.config.v1.DeploymentOperationMetadataOrBuilder getDeploymentMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation of the
+   * operation. Operations that have successfully been cancelled have
+   * [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); + + com.google.cloud.config.v1.OperationMetadata.ResourceMetadataCase getResourceMetadataCase(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Resource.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Resource.java new file mode 100644 index 000000000000..0f809159313f --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Resource.java @@ -0,0 +1,2088 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * Resource represents a Google Cloud Platform resource actuated by IM.
+ * Resources are child resources of Revisions.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.Resource} + */ +public final class Resource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.Resource) + ResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Resource() { + name_ = ""; + intent_ = 0; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Resource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Resource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetCaiAssets(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.Resource.class, + com.google.cloud.config.v1.Resource.Builder.class); + } + + /** + * + * + *
+   * Possible intent of the resource.
+   * 
+ * + * Protobuf enum {@code google.cloud.config.v1.Resource.Intent} + */ + public enum Intent implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. This value is used if the intent is omitted.
+     * 
+ * + * INTENT_UNSPECIFIED = 0; + */ + INTENT_UNSPECIFIED(0), + /** + * + * + *
+     * Infra Manager will create this Resource.
+     * 
+ * + * CREATE = 1; + */ + CREATE(1), + /** + * + * + *
+     * Infra Manager will update this Resource.
+     * 
+ * + * UPDATE = 2; + */ + UPDATE(2), + /** + * + * + *
+     * Infra Manager will delete this Resource.
+     * 
+ * + * DELETE = 3; + */ + DELETE(3), + /** + * + * + *
+     * Infra Manager will destroy and recreate this Resource.
+     * 
+ * + * RECREATE = 4; + */ + RECREATE(4), + /** + * + * + *
+     * Infra Manager will leave this Resource untouched.
+     * 
+ * + * UNCHANGED = 5; + */ + UNCHANGED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. This value is used if the intent is omitted.
+     * 
+ * + * INTENT_UNSPECIFIED = 0; + */ + public static final int INTENT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Infra Manager will create this Resource.
+     * 
+ * + * CREATE = 1; + */ + public static final int CREATE_VALUE = 1; + /** + * + * + *
+     * Infra Manager will update this Resource.
+     * 
+ * + * UPDATE = 2; + */ + public static final int UPDATE_VALUE = 2; + /** + * + * + *
+     * Infra Manager will delete this Resource.
+     * 
+ * + * DELETE = 3; + */ + public static final int DELETE_VALUE = 3; + /** + * + * + *
+     * Infra Manager will destroy and recreate this Resource.
+     * 
+ * + * RECREATE = 4; + */ + public static final int RECREATE_VALUE = 4; + /** + * + * + *
+     * Infra Manager will leave this Resource untouched.
+     * 
+ * + * UNCHANGED = 5; + */ + public static final int UNCHANGED_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 Intent 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 Intent forNumber(int value) { + switch (value) { + case 0: + return INTENT_UNSPECIFIED; + case 1: + return CREATE; + case 2: + return UPDATE; + case 3: + return DELETE; + case 4: + return RECREATE; + case 5: + return UNCHANGED; + 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 Intent findValueByNumber(int number) { + return Intent.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.config.v1.Resource.getDescriptor().getEnumTypes().get(0); + } + + private static final Intent[] VALUES = values(); + + public static Intent 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 Intent(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.config.v1.Resource.Intent) + } + + /** + * + * + *
+   * Possible states of a resource.
+   * 
+ * + * Protobuf enum {@code google.cloud.config.v1.Resource.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Resource has been planned for reconcile.
+     * 
+ * + * PLANNED = 1; + */ + PLANNED(1), + /** + * + * + *
+     * Resource is actively reconciling into the intended state.
+     * 
+ * + * IN_PROGRESS = 2; + */ + IN_PROGRESS(2), + /** + * + * + *
+     * Resource has reconciled to intended state.
+     * 
+ * + * RECONCILED = 3; + */ + RECONCILED(3), + /** + * + * + *
+     * Resource failed to reconcile.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Resource has been planned for reconcile.
+     * 
+ * + * PLANNED = 1; + */ + public static final int PLANNED_VALUE = 1; + /** + * + * + *
+     * Resource is actively reconciling into the intended state.
+     * 
+ * + * IN_PROGRESS = 2; + */ + public static final int IN_PROGRESS_VALUE = 2; + /** + * + * + *
+     * Resource has reconciled to intended state.
+     * 
+ * + * RECONCILED = 3; + */ + public static final int RECONCILED_VALUE = 3; + /** + * + * + *
+     * Resource failed to reconcile.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PLANNED; + case 2: + return IN_PROGRESS; + case 3: + return RECONCILED; + case 4: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.config.v1.Resource.getDescriptor().getEnumTypes().get(1); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.config.v1.Resource.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Resource name.
+   * Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name.
+   * Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TERRAFORM_INFO_FIELD_NUMBER = 2; + private com.google.cloud.config.v1.ResourceTerraformInfo terraformInfo_; + /** + * + * + *
+   * Output only. Terraform-specific info if this resource was created using
+   * Terraform.
+   * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terraformInfo field is set. + */ + @java.lang.Override + public boolean hasTerraformInfo() { + return terraformInfo_ != null; + } + /** + * + * + *
+   * Output only. Terraform-specific info if this resource was created using
+   * Terraform.
+   * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terraformInfo. + */ + @java.lang.Override + public com.google.cloud.config.v1.ResourceTerraformInfo getTerraformInfo() { + return terraformInfo_ == null + ? com.google.cloud.config.v1.ResourceTerraformInfo.getDefaultInstance() + : terraformInfo_; + } + /** + * + * + *
+   * Output only. Terraform-specific info if this resource was created using
+   * Terraform.
+   * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.ResourceTerraformInfoOrBuilder getTerraformInfoOrBuilder() { + return terraformInfo_ == null + ? com.google.cloud.config.v1.ResourceTerraformInfo.getDefaultInstance() + : terraformInfo_; + } + + public static final int CAI_ASSETS_FIELD_NUMBER = 3; + + private static final class CaiAssetsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.config.v1.ResourceCAIInfo> + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Resource_CaiAssetsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.config.v1.ResourceCAIInfo.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField + caiAssets_; + + private com.google.protobuf.MapField + internalGetCaiAssets() { + if (caiAssets_ == null) { + return com.google.protobuf.MapField.emptyMapField(CaiAssetsDefaultEntryHolder.defaultEntry); + } + return caiAssets_; + } + + public int getCaiAssetsCount() { + return internalGetCaiAssets().getMap().size(); + } + /** + * + * + *
+   * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+   * ID). CAI type format follows
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+   * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsCaiAssets(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCaiAssets().getMap().containsKey(key); + } + /** Use {@link #getCaiAssetsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getCaiAssets() { + return getCaiAssetsMap(); + } + /** + * + * + *
+   * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+   * ID). CAI type format follows
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+   * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getCaiAssetsMap() { + return internalGetCaiAssets().getMap(); + } + /** + * + * + *
+   * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+   * ID). CAI type format follows
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+   * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.config.v1.ResourceCAIInfo getCaiAssetsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.config.v1.ResourceCAIInfo defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCaiAssets().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+   * ID). CAI type format follows
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+   * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.ResourceCAIInfo getCaiAssetsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCaiAssets().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int INTENT_FIELD_NUMBER = 4; + private int intent_ = 0; + /** + * + * + *
+   * Output only. Intent of the resource.
+   * 
+ * + * + * .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for intent. + */ + @java.lang.Override + public int getIntentValue() { + return intent_; + } + /** + * + * + *
+   * Output only. Intent of the resource.
+   * 
+ * + * + * .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The intent. + */ + @java.lang.Override + public com.google.cloud.config.v1.Resource.Intent getIntent() { + com.google.cloud.config.v1.Resource.Intent result = + com.google.cloud.config.v1.Resource.Intent.forNumber(intent_); + return result == null ? com.google.cloud.config.v1.Resource.Intent.UNRECOGNIZED : result; + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + * + * + *
+   * Output only. Current state of the resource.
+   * 
+ * + * + * .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. Current state of the resource.
+   * 
+ * + * + * .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.config.v1.Resource.State getState() { + com.google.cloud.config.v1.Resource.State result = + com.google.cloud.config.v1.Resource.State.forNumber(state_); + return result == null ? com.google.cloud.config.v1.Resource.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (terraformInfo_ != null) { + output.writeMessage(2, getTerraformInfo()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetCaiAssets(), CaiAssetsDefaultEntryHolder.defaultEntry, 3); + if (intent_ != com.google.cloud.config.v1.Resource.Intent.INTENT_UNSPECIFIED.getNumber()) { + output.writeEnum(4, intent_); + } + if (state_ != com.google.cloud.config.v1.Resource.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (terraformInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTerraformInfo()); + } + for (java.util.Map.Entry entry : + internalGetCaiAssets().getMap().entrySet()) { + com.google.protobuf.MapEntry + caiAssets__ = + CaiAssetsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, caiAssets__); + } + if (intent_ != com.google.cloud.config.v1.Resource.Intent.INTENT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, intent_); + } + if (state_ != com.google.cloud.config.v1.Resource.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.Resource)) { + return super.equals(obj); + } + com.google.cloud.config.v1.Resource other = (com.google.cloud.config.v1.Resource) obj; + + if (!getName().equals(other.getName())) return false; + if (hasTerraformInfo() != other.hasTerraformInfo()) return false; + if (hasTerraformInfo()) { + if (!getTerraformInfo().equals(other.getTerraformInfo())) return false; + } + if (!internalGetCaiAssets().equals(other.internalGetCaiAssets())) return false; + if (intent_ != other.intent_) return false; + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasTerraformInfo()) { + hash = (37 * hash) + TERRAFORM_INFO_FIELD_NUMBER; + hash = (53 * hash) + getTerraformInfo().hashCode(); + } + if (!internalGetCaiAssets().getMap().isEmpty()) { + hash = (37 * hash) + CAI_ASSETS_FIELD_NUMBER; + hash = (53 * hash) + internalGetCaiAssets().hashCode(); + } + hash = (37 * hash) + INTENT_FIELD_NUMBER; + hash = (53 * hash) + intent_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.Resource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Resource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Resource parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Resource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Resource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Resource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Resource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Resource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.Resource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Resource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.Resource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Resource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.Resource 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; + } + /** + * + * + *
+   * Resource represents a Google Cloud Platform resource actuated by IM.
+   * Resources are child resources of Revisions.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.Resource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.Resource) + com.google.cloud.config.v1.ResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Resource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetCaiAssets(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableCaiAssets(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.Resource.class, + com.google.cloud.config.v1.Resource.Builder.class); + } + + // Construct using com.google.cloud.config.v1.Resource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + terraformInfo_ = null; + if (terraformInfoBuilder_ != null) { + terraformInfoBuilder_.dispose(); + terraformInfoBuilder_ = null; + } + internalGetMutableCaiAssets().clear(); + intent_ = 0; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Resource_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.Resource getDefaultInstanceForType() { + return com.google.cloud.config.v1.Resource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.Resource build() { + com.google.cloud.config.v1.Resource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.Resource buildPartial() { + com.google.cloud.config.v1.Resource result = new com.google.cloud.config.v1.Resource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.Resource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.terraformInfo_ = + terraformInfoBuilder_ == null ? terraformInfo_ : terraformInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.caiAssets_ = internalGetCaiAssets(); + result.caiAssets_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.intent_ = intent_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.Resource) { + return mergeFrom((com.google.cloud.config.v1.Resource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.Resource other) { + if (other == com.google.cloud.config.v1.Resource.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTerraformInfo()) { + mergeTerraformInfo(other.getTerraformInfo()); + } + internalGetMutableCaiAssets().mergeFrom(other.internalGetCaiAssets()); + bitField0_ |= 0x00000004; + if (other.intent_ != 0) { + setIntentValue(other.getIntentValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTerraformInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.config.v1.ResourceCAIInfo> + caiAssets__ = + input.readMessage( + CaiAssetsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableCaiAssets() + .getMutableMap() + .put(caiAssets__.getKey(), caiAssets__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + intent_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name.
+     * Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.config.v1.ResourceTerraformInfo terraformInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ResourceTerraformInfo, + com.google.cloud.config.v1.ResourceTerraformInfo.Builder, + com.google.cloud.config.v1.ResourceTerraformInfoOrBuilder> + terraformInfoBuilder_; + /** + * + * + *
+     * Output only. Terraform-specific info if this resource was created using
+     * Terraform.
+     * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terraformInfo field is set. + */ + public boolean hasTerraformInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. Terraform-specific info if this resource was created using
+     * Terraform.
+     * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terraformInfo. + */ + public com.google.cloud.config.v1.ResourceTerraformInfo getTerraformInfo() { + if (terraformInfoBuilder_ == null) { + return terraformInfo_ == null + ? com.google.cloud.config.v1.ResourceTerraformInfo.getDefaultInstance() + : terraformInfo_; + } else { + return terraformInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Terraform-specific info if this resource was created using
+     * Terraform.
+     * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTerraformInfo(com.google.cloud.config.v1.ResourceTerraformInfo value) { + if (terraformInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + terraformInfo_ = value; + } else { + terraformInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Terraform-specific info if this resource was created using
+     * Terraform.
+     * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTerraformInfo( + com.google.cloud.config.v1.ResourceTerraformInfo.Builder builderForValue) { + if (terraformInfoBuilder_ == null) { + terraformInfo_ = builderForValue.build(); + } else { + terraformInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Terraform-specific info if this resource was created using
+     * Terraform.
+     * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTerraformInfo(com.google.cloud.config.v1.ResourceTerraformInfo value) { + if (terraformInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && terraformInfo_ != null + && terraformInfo_ + != com.google.cloud.config.v1.ResourceTerraformInfo.getDefaultInstance()) { + getTerraformInfoBuilder().mergeFrom(value); + } else { + terraformInfo_ = value; + } + } else { + terraformInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Terraform-specific info if this resource was created using
+     * Terraform.
+     * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTerraformInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + terraformInfo_ = null; + if (terraformInfoBuilder_ != null) { + terraformInfoBuilder_.dispose(); + terraformInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Terraform-specific info if this resource was created using
+     * Terraform.
+     * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.ResourceTerraformInfo.Builder getTerraformInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTerraformInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Terraform-specific info if this resource was created using
+     * Terraform.
+     * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.ResourceTerraformInfoOrBuilder getTerraformInfoOrBuilder() { + if (terraformInfoBuilder_ != null) { + return terraformInfoBuilder_.getMessageOrBuilder(); + } else { + return terraformInfo_ == null + ? com.google.cloud.config.v1.ResourceTerraformInfo.getDefaultInstance() + : terraformInfo_; + } + } + /** + * + * + *
+     * Output only. Terraform-specific info if this resource was created using
+     * Terraform.
+     * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ResourceTerraformInfo, + com.google.cloud.config.v1.ResourceTerraformInfo.Builder, + com.google.cloud.config.v1.ResourceTerraformInfoOrBuilder> + getTerraformInfoFieldBuilder() { + if (terraformInfoBuilder_ == null) { + terraformInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ResourceTerraformInfo, + com.google.cloud.config.v1.ResourceTerraformInfo.Builder, + com.google.cloud.config.v1.ResourceTerraformInfoOrBuilder>( + getTerraformInfo(), getParentForChildren(), isClean()); + terraformInfo_ = null; + } + return terraformInfoBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.ResourceCAIInfo> + caiAssets_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.ResourceCAIInfo> + internalGetCaiAssets() { + if (caiAssets_ == null) { + return com.google.protobuf.MapField.emptyMapField(CaiAssetsDefaultEntryHolder.defaultEntry); + } + return caiAssets_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.ResourceCAIInfo> + internalGetMutableCaiAssets() { + if (caiAssets_ == null) { + caiAssets_ = + com.google.protobuf.MapField.newMapField(CaiAssetsDefaultEntryHolder.defaultEntry); + } + if (!caiAssets_.isMutable()) { + caiAssets_ = caiAssets_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return caiAssets_; + } + + public int getCaiAssetsCount() { + return internalGetCaiAssets().getMap().size(); + } + /** + * + * + *
+     * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+     * ID). CAI type format follows
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+     * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsCaiAssets(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCaiAssets().getMap().containsKey(key); + } + /** Use {@link #getCaiAssetsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getCaiAssets() { + return getCaiAssetsMap(); + } + /** + * + * + *
+     * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+     * ID). CAI type format follows
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+     * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getCaiAssetsMap() { + return internalGetCaiAssets().getMap(); + } + /** + * + * + *
+     * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+     * ID). CAI type format follows
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+     * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.config.v1.ResourceCAIInfo getCaiAssetsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.config.v1.ResourceCAIInfo defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCaiAssets().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+     * ID). CAI type format follows
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+     * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.ResourceCAIInfo getCaiAssetsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCaiAssets().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCaiAssets() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableCaiAssets().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+     * ID). CAI type format follows
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+     * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeCaiAssets(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableCaiAssets().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableCaiAssets() { + bitField0_ |= 0x00000004; + return internalGetMutableCaiAssets().getMutableMap(); + } + /** + * + * + *
+     * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+     * ID). CAI type format follows
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+     * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putCaiAssets( + java.lang.String key, com.google.cloud.config.v1.ResourceCAIInfo value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableCaiAssets().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+     * ID). CAI type format follows
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+     * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllCaiAssets( + java.util.Map values) { + internalGetMutableCaiAssets().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private int intent_ = 0; + /** + * + * + *
+     * Output only. Intent of the resource.
+     * 
+ * + * + * .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for intent. + */ + @java.lang.Override + public int getIntentValue() { + return intent_; + } + /** + * + * + *
+     * Output only. Intent of the resource.
+     * 
+ * + * + * .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for intent to set. + * @return This builder for chaining. + */ + public Builder setIntentValue(int value) { + intent_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Intent of the resource.
+     * 
+ * + * + * .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The intent. + */ + @java.lang.Override + public com.google.cloud.config.v1.Resource.Intent getIntent() { + com.google.cloud.config.v1.Resource.Intent result = + com.google.cloud.config.v1.Resource.Intent.forNumber(intent_); + return result == null ? com.google.cloud.config.v1.Resource.Intent.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Intent of the resource.
+     * 
+ * + * + * .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The intent to set. + * @return This builder for chaining. + */ + public Builder setIntent(com.google.cloud.config.v1.Resource.Intent value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + intent_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Intent of the resource.
+     * 
+ * + * + * .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearIntent() { + bitField0_ = (bitField0_ & ~0x00000008); + intent_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current state of the resource.
+     * 
+ * + * + * .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. Current state of the resource.
+     * 
+ * + * + * .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the resource.
+     * 
+ * + * + * .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.config.v1.Resource.State getState() { + com.google.cloud.config.v1.Resource.State result = + com.google.cloud.config.v1.Resource.State.forNumber(state_); + return result == null ? com.google.cloud.config.v1.Resource.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current state of the resource.
+     * 
+ * + * + * .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.config.v1.Resource.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the resource.
+     * 
+ * + * + * .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + state_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.Resource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.Resource) + private static final com.google.cloud.config.v1.Resource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.Resource(); + } + + public static com.google.cloud.config.v1.Resource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.Resource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceCAIInfo.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceCAIInfo.java new file mode 100644 index 000000000000..fe19bbfac539 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceCAIInfo.java @@ -0,0 +1,630 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * CAI info of a Resource.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ResourceCAIInfo} + */ +public final class ResourceCAIInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ResourceCAIInfo) + ResourceCAIInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceCAIInfo.newBuilder() to construct. + private ResourceCAIInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceCAIInfo() { + fullResourceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceCAIInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ResourceCAIInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ResourceCAIInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ResourceCAIInfo.class, + com.google.cloud.config.v1.ResourceCAIInfo.Builder.class); + } + + public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fullResourceName_ = ""; + /** + * + * + *
+   * CAI resource name in the format following
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * 
+ * + * string full_resource_name = 1; + * + * @return The fullResourceName. + */ + @java.lang.Override + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } + } + /** + * + * + *
+   * CAI resource name in the format following
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * 
+ * + * string full_resource_name = 1; + * + * @return The bytes for fullResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullResourceName_ = 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(fullResourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); + } + 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(fullResourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ResourceCAIInfo)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ResourceCAIInfo other = + (com.google.cloud.config.v1.ResourceCAIInfo) obj; + + if (!getFullResourceName().equals(other.getFullResourceName())) 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) + FULL_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullResourceName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ResourceCAIInfo 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; + } + /** + * + * + *
+   * CAI info of a Resource.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ResourceCAIInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ResourceCAIInfo) + com.google.cloud.config.v1.ResourceCAIInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ResourceCAIInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ResourceCAIInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ResourceCAIInfo.class, + com.google.cloud.config.v1.ResourceCAIInfo.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ResourceCAIInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fullResourceName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ResourceCAIInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ResourceCAIInfo getDefaultInstanceForType() { + return com.google.cloud.config.v1.ResourceCAIInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ResourceCAIInfo build() { + com.google.cloud.config.v1.ResourceCAIInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ResourceCAIInfo buildPartial() { + com.google.cloud.config.v1.ResourceCAIInfo result = + new com.google.cloud.config.v1.ResourceCAIInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.ResourceCAIInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fullResourceName_ = fullResourceName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ResourceCAIInfo) { + return mergeFrom((com.google.cloud.config.v1.ResourceCAIInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ResourceCAIInfo other) { + if (other == com.google.cloud.config.v1.ResourceCAIInfo.getDefaultInstance()) return this; + if (!other.getFullResourceName().isEmpty()) { + fullResourceName_ = other.fullResourceName_; + 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: + { + fullResourceName_ = 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 fullResourceName_ = ""; + /** + * + * + *
+     * CAI resource name in the format following
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * 
+ * + * string full_resource_name = 1; + * + * @return The fullResourceName. + */ + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * CAI resource name in the format following
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * 
+ * + * string full_resource_name = 1; + * + * @return The bytes for fullResourceName. + */ + public com.google.protobuf.ByteString getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * CAI resource name in the format following
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * 
+ * + * string full_resource_name = 1; + * + * @param value The fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fullResourceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * CAI resource name in the format following
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * 
+ * + * string full_resource_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFullResourceName() { + fullResourceName_ = getDefaultInstance().getFullResourceName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * CAI resource name in the format following
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * 
+ * + * string full_resource_name = 1; + * + * @param value The bytes for fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fullResourceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ResourceCAIInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ResourceCAIInfo) + private static final com.google.cloud.config.v1.ResourceCAIInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ResourceCAIInfo(); + } + + public static com.google.cloud.config.v1.ResourceCAIInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceCAIInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ResourceCAIInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceCAIInfoOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceCAIInfoOrBuilder.java new file mode 100644 index 000000000000..ee2fc78d9c89 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceCAIInfoOrBuilder.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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ResourceCAIInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ResourceCAIInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * CAI resource name in the format following
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * 
+ * + * string full_resource_name = 1; + * + * @return The fullResourceName. + */ + java.lang.String getFullResourceName(); + /** + * + * + *
+   * CAI resource name in the format following
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * 
+ * + * string full_resource_name = 1; + * + * @return The bytes for fullResourceName. + */ + com.google.protobuf.ByteString getFullResourceNameBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceName.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceName.java new file mode 100644 index 000000000000..cdbf5b84df66 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceName.java @@ -0,0 +1,297 @@ +/* + * 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.cloud.config.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ResourceName implements com.google.api.resourcenames.ResourceName { + private static final PathTemplate PROJECT_LOCATION_DEPLOYMENT_REVISION_RESOURCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String deployment; + private final String revision; + private final String resource; + + @Deprecated + protected ResourceName() { + project = null; + location = null; + deployment = null; + revision = null; + resource = null; + } + + private ResourceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deployment = Preconditions.checkNotNull(builder.getDeployment()); + revision = Preconditions.checkNotNull(builder.getRevision()); + resource = Preconditions.checkNotNull(builder.getResource()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeployment() { + return deployment; + } + + public String getRevision() { + return revision; + } + + public String getResource() { + return resource; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ResourceName of( + String project, String location, String deployment, String revision, String resource) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeployment(deployment) + .setRevision(revision) + .setResource(resource) + .build(); + } + + public static String format( + String project, String location, String deployment, String revision, String resource) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeployment(deployment) + .setRevision(revision) + .setResource(resource) + .build() + .toString(); + } + + public static ResourceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DEPLOYMENT_REVISION_RESOURCE.validatedMatch( + formattedString, "ResourceName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("deployment"), + matchMap.get("revision"), + matchMap.get("resource")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ResourceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DEPLOYMENT_REVISION_RESOURCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (deployment != null) { + fieldMapBuilder.put("deployment", deployment); + } + if (revision != null) { + fieldMapBuilder.put("revision", revision); + } + if (resource != null) { + fieldMapBuilder.put("resource", resource); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DEPLOYMENT_REVISION_RESOURCE.instantiate( + "project", + project, + "location", + location, + "deployment", + deployment, + "revision", + revision, + "resource", + resource); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ResourceName that = ((ResourceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.deployment, that.deployment) + && Objects.equals(this.revision, that.revision) + && Objects.equals(this.resource, that.resource); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(deployment); + h *= 1000003; + h ^= Objects.hashCode(revision); + h *= 1000003; + h ^= Objects.hashCode(resource); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}. + */ + public static class Builder { + private String project; + private String location; + private String deployment; + private String revision; + private String resource; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeployment() { + return deployment; + } + + public String getRevision() { + return revision; + } + + public String getResource() { + return resource; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDeployment(String deployment) { + this.deployment = deployment; + return this; + } + + public Builder setRevision(String revision) { + this.revision = revision; + return this; + } + + public Builder setResource(String resource) { + this.resource = resource; + return this; + } + + private Builder(ResourceName resourceName) { + this.project = resourceName.project; + this.location = resourceName.location; + this.deployment = resourceName.deployment; + this.revision = resourceName.revision; + this.resource = resourceName.resource; + } + + public ResourceName build() { + return new ResourceName(this); + } + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceOrBuilder.java new file mode 100644 index 000000000000..68bc85db05de --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceOrBuilder.java @@ -0,0 +1,234 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name.
+   * Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name.
+   * Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Terraform-specific info if this resource was created using
+   * Terraform.
+   * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terraformInfo field is set. + */ + boolean hasTerraformInfo(); + /** + * + * + *
+   * Output only. Terraform-specific info if this resource was created using
+   * Terraform.
+   * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terraformInfo. + */ + com.google.cloud.config.v1.ResourceTerraformInfo getTerraformInfo(); + /** + * + * + *
+   * Output only. Terraform-specific info if this resource was created using
+   * Terraform.
+   * 
+ * + * + * .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.config.v1.ResourceTerraformInfoOrBuilder getTerraformInfoOrBuilder(); + + /** + * + * + *
+   * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+   * ID). CAI type format follows
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+   * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getCaiAssetsCount(); + /** + * + * + *
+   * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+   * ID). CAI type format follows
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+   * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsCaiAssets(java.lang.String key); + /** Use {@link #getCaiAssetsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getCaiAssets(); + /** + * + * + *
+   * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+   * ID). CAI type format follows
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+   * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getCaiAssetsMap(); + /** + * + * + *
+   * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+   * ID). CAI type format follows
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+   * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + com.google.cloud.config.v1.ResourceCAIInfo getCaiAssetsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.config.v1.ResourceCAIInfo defaultValue); + /** + * + * + *
+   * Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
+   * ID). CAI type format follows
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types
+   * 
+ * + * + * map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.config.v1.ResourceCAIInfo getCaiAssetsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Intent of the resource.
+   * 
+ * + * + * .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for intent. + */ + int getIntentValue(); + /** + * + * + *
+   * Output only. Intent of the resource.
+   * 
+ * + * + * .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The intent. + */ + com.google.cloud.config.v1.Resource.Intent getIntent(); + + /** + * + * + *
+   * Output only. Current state of the resource.
+   * 
+ * + * + * .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current state of the resource.
+   * 
+ * + * + * .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.config.v1.Resource.State getState(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceTerraformInfo.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceTerraformInfo.java new file mode 100644 index 000000000000..77e5ea917a96 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceTerraformInfo.java @@ -0,0 +1,995 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * Terraform info of a Resource.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.ResourceTerraformInfo} + */ +public final class ResourceTerraformInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.ResourceTerraformInfo) + ResourceTerraformInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceTerraformInfo.newBuilder() to construct. + private ResourceTerraformInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceTerraformInfo() { + address_ = ""; + type_ = ""; + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceTerraformInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ResourceTerraformInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ResourceTerraformInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ResourceTerraformInfo.class, + com.google.cloud.config.v1.ResourceTerraformInfo.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object address_ = ""; + /** + * + * + *
+   * TF resource address that uniquely identifies this resource within this
+   * deployment.
+   * 
+ * + * string address = 1; + * + * @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; + } + } + /** + * + * + *
+   * TF resource address that uniquely identifies this resource within this
+   * deployment.
+   * 
+ * + * string address = 1; + * + * @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 TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+   * TF resource type
+   * 
+ * + * string type = 2; + * + * @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; + } + } + /** + * + * + *
+   * TF resource type
+   * 
+ * + * string type = 2; + * + * @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 ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * ID attribute of the TF resource
+   * 
+ * + * string id = 3; + * + * @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; + } + } + /** + * + * + *
+   * ID attribute of the TF resource
+   * 
+ * + * string id = 3; + * + * @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; + } + } + + 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(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_); + } + 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(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.ResourceTerraformInfo)) { + return super.equals(obj); + } + com.google.cloud.config.v1.ResourceTerraformInfo other = + (com.google.cloud.config.v1.ResourceTerraformInfo) obj; + + if (!getAddress().equals(other.getAddress())) return false; + if (!getType().equals(other.getType())) return false; + if (!getId().equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.ResourceTerraformInfo 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; + } + /** + * + * + *
+   * Terraform info of a Resource.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.ResourceTerraformInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.ResourceTerraformInfo) + com.google.cloud.config.v1.ResourceTerraformInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ResourceTerraformInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ResourceTerraformInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.ResourceTerraformInfo.class, + com.google.cloud.config.v1.ResourceTerraformInfo.Builder.class); + } + + // Construct using com.google.cloud.config.v1.ResourceTerraformInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + address_ = ""; + type_ = ""; + id_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_ResourceTerraformInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.ResourceTerraformInfo getDefaultInstanceForType() { + return com.google.cloud.config.v1.ResourceTerraformInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.ResourceTerraformInfo build() { + com.google.cloud.config.v1.ResourceTerraformInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.ResourceTerraformInfo buildPartial() { + com.google.cloud.config.v1.ResourceTerraformInfo result = + new com.google.cloud.config.v1.ResourceTerraformInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.ResourceTerraformInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.address_ = address_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.id_ = id_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.ResourceTerraformInfo) { + return mergeFrom((com.google.cloud.config.v1.ResourceTerraformInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.ResourceTerraformInfo other) { + if (other == com.google.cloud.config.v1.ResourceTerraformInfo.getDefaultInstance()) + return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + 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: + { + address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + id_ = 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 address_ = ""; + /** + * + * + *
+     * TF resource address that uniquely identifies this resource within this
+     * deployment.
+     * 
+ * + * string address = 1; + * + * @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; + } + } + /** + * + * + *
+     * TF resource address that uniquely identifies this resource within this
+     * deployment.
+     * 
+ * + * string address = 1; + * + * @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; + } + } + /** + * + * + *
+     * TF resource address that uniquely identifies this resource within this
+     * deployment.
+     * 
+ * + * string address = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * TF resource address that uniquely identifies this resource within this
+     * deployment.
+     * 
+ * + * string address = 1; + * + * @return This builder for chaining. + */ + public Builder clearAddress() { + address_ = getDefaultInstance().getAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * TF resource address that uniquely identifies this resource within this
+     * deployment.
+     * 
+ * + * string address = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * TF resource type
+     * 
+ * + * string type = 2; + * + * @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; + } + } + /** + * + * + *
+     * TF resource type
+     * 
+ * + * string type = 2; + * + * @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; + } + } + /** + * + * + *
+     * TF resource type
+     * 
+ * + * string type = 2; + * + * @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; + } + /** + * + * + *
+     * TF resource type
+     * 
+ * + * string type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * TF resource type
+     * 
+ * + * string type = 2; + * + * @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 id_ = ""; + /** + * + * + *
+     * ID attribute of the TF resource
+     * 
+ * + * string id = 3; + * + * @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; + } + } + /** + * + * + *
+     * ID attribute of the TF resource
+     * 
+ * + * string id = 3; + * + * @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; + } + } + /** + * + * + *
+     * ID attribute of the TF resource
+     * 
+ * + * string id = 3; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * ID attribute of the TF resource
+     * 
+ * + * string id = 3; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * ID attribute of the TF resource
+     * 
+ * + * string id = 3; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.ResourceTerraformInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.ResourceTerraformInfo) + private static final com.google.cloud.config.v1.ResourceTerraformInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.ResourceTerraformInfo(); + } + + public static com.google.cloud.config.v1.ResourceTerraformInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceTerraformInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.ResourceTerraformInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceTerraformInfoOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceTerraformInfoOrBuilder.java new file mode 100644 index 000000000000..331319819781 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ResourceTerraformInfoOrBuilder.java @@ -0,0 +1,102 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface ResourceTerraformInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.ResourceTerraformInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * TF resource address that uniquely identifies this resource within this
+   * deployment.
+   * 
+ * + * string address = 1; + * + * @return The address. + */ + java.lang.String getAddress(); + /** + * + * + *
+   * TF resource address that uniquely identifies this resource within this
+   * deployment.
+   * 
+ * + * string address = 1; + * + * @return The bytes for address. + */ + com.google.protobuf.ByteString getAddressBytes(); + + /** + * + * + *
+   * TF resource type
+   * 
+ * + * string type = 2; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * TF resource type
+   * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * ID attribute of the TF resource
+   * 
+ * + * string id = 3; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * ID attribute of the TF resource
+   * 
+ * + * string id = 3; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Revision.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Revision.java new file mode 100644 index 000000000000..21cf706beb8b --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Revision.java @@ -0,0 +1,4811 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A child resource of a Deployment generated by a 'CreateDeployment' or
+ * 'UpdateDeployment' call. Each Revision contains metadata pertaining to a
+ * snapshot of a particular Deployment.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.Revision} + */ +public final class Revision extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.Revision) + RevisionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Revision.newBuilder() to construct. + private Revision(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Revision() { + name_ = ""; + action_ = 0; + state_ = 0; + stateDetail_ = ""; + errorCode_ = 0; + build_ = ""; + logs_ = ""; + tfErrors_ = java.util.Collections.emptyList(); + errorLogs_ = ""; + serviceAccount_ = ""; + workerPool_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Revision(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Revision_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Revision_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.Revision.class, + com.google.cloud.config.v1.Revision.Builder.class); + } + + /** + * + * + *
+   * Actions that generate a revision.
+   * 
+ * + * Protobuf enum {@code google.cloud.config.v1.Revision.Action} + */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. This value is used if the action is omitted.
+     * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + ACTION_UNSPECIFIED(0), + /** + * + * + *
+     * The revision was generated by creating a deployment.
+     * 
+ * + * CREATE = 1; + */ + CREATE(1), + /** + * + * + *
+     * The revision was generated by updating a deployment.
+     * 
+ * + * UPDATE = 2; + */ + UPDATE(2), + /** + * + * + *
+     * The revision was deleted.
+     * 
+ * + * DELETE = 3; + */ + DELETE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. This value is used if the action is omitted.
+     * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + public static final int ACTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The revision was generated by creating a deployment.
+     * 
+ * + * CREATE = 1; + */ + public static final int CREATE_VALUE = 1; + /** + * + * + *
+     * The revision was generated by updating a deployment.
+     * 
+ * + * UPDATE = 2; + */ + public static final int UPDATE_VALUE = 2; + /** + * + * + *
+     * The revision was deleted.
+     * 
+ * + * DELETE = 3; + */ + public static final int DELETE_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 Action 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 Action forNumber(int value) { + switch (value) { + case 0: + return ACTION_UNSPECIFIED; + case 1: + return CREATE; + case 2: + return UPDATE; + case 3: + return DELETE; + 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 Action findValueByNumber(int number) { + return Action.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.config.v1.Revision.getDescriptor().getEnumTypes().get(0); + } + + private static final Action[] VALUES = values(); + + public static Action 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 Action(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.config.v1.Revision.Action) + } + + /** + * + * + *
+   * Possible states of a revision.
+   * 
+ * + * Protobuf enum {@code google.cloud.config.v1.Revision.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The revision is being applied.
+     * 
+ * + * APPLYING = 1; + */ + APPLYING(1), + /** + * + * + *
+     * The revision was applied successfully.
+     * 
+ * + * APPLIED = 2; + */ + APPLIED(2), + /** + * + * + *
+     * The revision could not be applied successfully.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The revision is being applied.
+     * 
+ * + * APPLYING = 1; + */ + public static final int APPLYING_VALUE = 1; + /** + * + * + *
+     * The revision was applied successfully.
+     * 
+ * + * APPLIED = 2; + */ + public static final int APPLIED_VALUE = 2; + /** + * + * + *
+     * The revision could not be applied successfully.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return APPLYING; + case 2: + return APPLIED; + case 3: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.config.v1.Revision.getDescriptor().getEnumTypes().get(1); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.config.v1.Revision.State) + } + + /** + * + * + *
+   * Possible errors if Revision could not be created or updated successfully.
+   * 
+ * + * Protobuf enum {@code google.cloud.config.v1.Revision.ErrorCode} + */ + public enum ErrorCode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No error code was specified.
+     * 
+ * + * ERROR_CODE_UNSPECIFIED = 0; + */ + ERROR_CODE_UNSPECIFIED(0), + /** + * + * + *
+     * Cloud Build failed due to a permission issue.
+     * 
+ * + * CLOUD_BUILD_PERMISSION_DENIED = 1; + */ + CLOUD_BUILD_PERMISSION_DENIED(1), + /** + * + * + *
+     * Cloud Build job associated with creating or updating a deployment could
+     * not be started.
+     * 
+ * + * APPLY_BUILD_API_FAILED = 4; + */ + APPLY_BUILD_API_FAILED(4), + /** + * + * + *
+     * Cloud Build job associated with creating or updating a deployment was
+     * started but failed.
+     * 
+ * + * APPLY_BUILD_RUN_FAILED = 5; + */ + APPLY_BUILD_RUN_FAILED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No error code was specified.
+     * 
+ * + * ERROR_CODE_UNSPECIFIED = 0; + */ + public static final int ERROR_CODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Cloud Build failed due to a permission issue.
+     * 
+ * + * CLOUD_BUILD_PERMISSION_DENIED = 1; + */ + public static final int CLOUD_BUILD_PERMISSION_DENIED_VALUE = 1; + /** + * + * + *
+     * Cloud Build job associated with creating or updating a deployment could
+     * not be started.
+     * 
+ * + * APPLY_BUILD_API_FAILED = 4; + */ + public static final int APPLY_BUILD_API_FAILED_VALUE = 4; + /** + * + * + *
+     * Cloud Build job associated with creating or updating a deployment was
+     * started but failed.
+     * 
+ * + * APPLY_BUILD_RUN_FAILED = 5; + */ + public static final int APPLY_BUILD_RUN_FAILED_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 ErrorCode 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 ErrorCode forNumber(int value) { + switch (value) { + case 0: + return ERROR_CODE_UNSPECIFIED; + case 1: + return CLOUD_BUILD_PERMISSION_DENIED; + case 4: + return APPLY_BUILD_API_FAILED; + case 5: + return APPLY_BUILD_RUN_FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ErrorCode findValueByNumber(int number) { + return ErrorCode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.config.v1.Revision.getDescriptor().getEnumTypes().get(2); + } + + private static final ErrorCode[] VALUES = values(); + + public static ErrorCode 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 ErrorCode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.config.v1.Revision.ErrorCode) + } + + private int blueprintCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object blueprint_; + + public enum BlueprintCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TERRAFORM_BLUEPRINT(6), + BLUEPRINT_NOT_SET(0); + private final int value; + + private BlueprintCase(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 BlueprintCase valueOf(int value) { + return forNumber(value); + } + + public static BlueprintCase forNumber(int value) { + switch (value) { + case 6: + return TERRAFORM_BLUEPRINT; + case 0: + return BLUEPRINT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BlueprintCase getBlueprintCase() { + return BlueprintCase.forNumber(blueprintCase_); + } + + public static final int TERRAFORM_BLUEPRINT_FIELD_NUMBER = 6; + /** + * + * + *
+   * Output only. A blueprint described using Terraform's HashiCorp
+   * Configuration Language as a root module.
+   * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terraformBlueprint field is set. + */ + @java.lang.Override + public boolean hasTerraformBlueprint() { + return blueprintCase_ == 6; + } + /** + * + * + *
+   * Output only. A blueprint described using Terraform's HashiCorp
+   * Configuration Language as a root module.
+   * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terraformBlueprint. + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprint getTerraformBlueprint() { + if (blueprintCase_ == 6) { + return (com.google.cloud.config.v1.TerraformBlueprint) blueprint_; + } + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. A blueprint described using Terraform's HashiCorp
+   * Configuration Language as a root module.
+   * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprintOrBuilder getTerraformBlueprintOrBuilder() { + if (blueprintCase_ == 6) { + return (com.google.cloud.config.v1.TerraformBlueprint) blueprint_; + } + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Revision name. Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}/
+   * revisions/{revision}`
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Revision name. Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}/
+   * revisions/{revision}`
+   * 
+ * + * 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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ACTION_FIELD_NUMBER = 4; + private int action_ = 0; + /** + * + * + *
+   * Output only. The action which created this revision
+   * 
+ * + * + * .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+   * Output only. The action which created this revision
+   * 
+ * + * + * .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The action. + */ + @java.lang.Override + public com.google.cloud.config.v1.Revision.Action getAction() { + com.google.cloud.config.v1.Revision.Action result = + com.google.cloud.config.v1.Revision.Action.forNumber(action_); + return result == null ? com.google.cloud.config.v1.Revision.Action.UNRECOGNIZED : result; + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + * + * + *
+   * Output only. Current state of the revision.
+   * 
+ * + * + * .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. Current state of the revision.
+   * 
+ * + * + * .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.config.v1.Revision.State getState() { + com.google.cloud.config.v1.Revision.State result = + com.google.cloud.config.v1.Revision.State.forNumber(state_); + return result == null ? com.google.cloud.config.v1.Revision.State.UNRECOGNIZED : result; + } + + public static final int APPLY_RESULTS_FIELD_NUMBER = 7; + private com.google.cloud.config.v1.ApplyResults applyResults_; + /** + * + * + *
+   * Output only. Outputs and artifacts from applying a deployment.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the applyResults field is set. + */ + @java.lang.Override + public boolean hasApplyResults() { + return applyResults_ != null; + } + /** + * + * + *
+   * Output only. Outputs and artifacts from applying a deployment.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The applyResults. + */ + @java.lang.Override + public com.google.cloud.config.v1.ApplyResults getApplyResults() { + return applyResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : applyResults_; + } + /** + * + * + *
+   * Output only. Outputs and artifacts from applying a deployment.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.ApplyResultsOrBuilder getApplyResultsOrBuilder() { + return applyResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : applyResults_; + } + + public static final int STATE_DETAIL_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object stateDetail_ = ""; + /** + * + * + *
+   * Output only. Additional info regarding the current state.
+   * 
+ * + * string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDetail. + */ + @java.lang.Override + public java.lang.String getStateDetail() { + java.lang.Object ref = stateDetail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateDetail_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Additional info regarding the current state.
+   * 
+ * + * string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDetail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStateDetailBytes() { + java.lang.Object ref = stateDetail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_CODE_FIELD_NUMBER = 9; + private int errorCode_ = 0; + /** + * + * + *
+   * Output only. Code describing any errors that may have occurred.
+   * 
+ * + * + * .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for errorCode. + */ + @java.lang.Override + public int getErrorCodeValue() { + return errorCode_; + } + /** + * + * + *
+   * Output only. Code describing any errors that may have occurred.
+   * 
+ * + * + * .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The errorCode. + */ + @java.lang.Override + public com.google.cloud.config.v1.Revision.ErrorCode getErrorCode() { + com.google.cloud.config.v1.Revision.ErrorCode result = + com.google.cloud.config.v1.Revision.ErrorCode.forNumber(errorCode_); + return result == null ? com.google.cloud.config.v1.Revision.ErrorCode.UNRECOGNIZED : result; + } + + public static final int BUILD_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object build_ = ""; + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with this revision.
+   * 
+ * + * string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The build. + */ + @java.lang.Override + public java.lang.String getBuild() { + java.lang.Object ref = build_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + build_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with this revision.
+   * 
+ * + * string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for build. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBuildBytes() { + java.lang.Object ref = build_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + build_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object logs_ = ""; + /** + * + * + *
+   * Output only. Location of Revision operation logs in
+   * `gs://{bucket}/{object}` format.
+   * 
+ * + * string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logs. + */ + @java.lang.Override + public java.lang.String getLogs() { + java.lang.Object ref = logs_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logs_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Location of Revision operation logs in
+   * `gs://{bucket}/{object}` format.
+   * 
+ * + * string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for logs. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLogsBytes() { + java.lang.Object ref = logs_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TF_ERRORS_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private java.util.List tfErrors_; + /** + * + * + *
+   * Output only. Errors encountered when creating or updating this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getTfErrorsList() { + return tfErrors_; + } + /** + * + * + *
+   * Output only. Errors encountered when creating or updating this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getTfErrorsOrBuilderList() { + return tfErrors_; + } + /** + * + * + *
+   * Output only. Errors encountered when creating or updating this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getTfErrorsCount() { + return tfErrors_.size(); + } + /** + * + * + *
+   * Output only. Errors encountered when creating or updating this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformError getTfErrors(int index) { + return tfErrors_.get(index); + } + /** + * + * + *
+   * Output only. Errors encountered when creating or updating this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformErrorOrBuilder getTfErrorsOrBuilder(int index) { + return tfErrors_.get(index); + } + + public static final int ERROR_LOGS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object errorLogs_ = ""; + /** + * + * + *
+   * Output only. Location of Terraform error logs in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorLogs. + */ + @java.lang.Override + public java.lang.String getErrorLogs() { + java.lang.Object ref = errorLogs_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorLogs_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Location of Terraform error logs in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorLogs. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorLogsBytes() { + java.lang.Object ref = errorLogs_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorLogs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * Output only. User-specified Service Account (SA) to be used as credential
+   * to manage resources. Format:
+   * `projects/{projectID}/serviceAccounts/{serviceAccount}`
+   * 
+ * + * + * string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. User-specified Service Account (SA) to be used as credential
+   * to manage resources. Format:
+   * `projects/{projectID}/serviceAccounts/{serviceAccount}`
+   * 
+ * + * + * string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_EXISTING_RESOURCES_FIELD_NUMBER = 15; + private boolean importExistingResources_ = false; + /** + * + * + *
+   * Output only. By default, Infra Manager will return a failure when
+   * Terraform encounters a 409 code (resource conflict error) during actuation.
+   * If this flag is set to true, Infra Manager will instead
+   * attempt to automatically import the resource into the Terraform state (for
+   * supported resource types) and continue actuation.
+   *
+   * Not all resource types are supported, refer to documentation.
+   * 
+ * + * bool import_existing_resources = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The importExistingResources. + */ + @java.lang.Override + public boolean getImportExistingResources() { + return importExistingResources_; + } + + public static final int WORKER_POOL_FIELD_NUMBER = 17; + + @SuppressWarnings("serial") + private volatile java.lang.Object workerPool_ = ""; + /** + * + * + *
+   * Output only. The user-specified Cloud Build worker pool resource in which
+   * the Cloud Build job will execute. Format:
+   * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+   * If this field is unspecified, the default Cloud Build worker pool will be
+   * used.
+   * 
+ * + * + * string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The workerPool. + */ + @java.lang.Override + public java.lang.String getWorkerPool() { + java.lang.Object ref = workerPool_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workerPool_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The user-specified Cloud Build worker pool resource in which
+   * the Cloud Build job will execute. Format:
+   * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+   * If this field is unspecified, the default Cloud Build worker pool will be
+   * used.
+   * 
+ * + * + * string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for workerPool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWorkerPoolBytes() { + java.lang.Object ref = workerPool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workerPool_ = 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 (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (action_ != com.google.cloud.config.v1.Revision.Action.ACTION_UNSPECIFIED.getNumber()) { + output.writeEnum(4, action_); + } + if (state_ != com.google.cloud.config.v1.Revision.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (blueprintCase_ == 6) { + output.writeMessage(6, (com.google.cloud.config.v1.TerraformBlueprint) blueprint_); + } + if (applyResults_ != null) { + output.writeMessage(7, getApplyResults()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateDetail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, stateDetail_); + } + if (errorCode_ + != com.google.cloud.config.v1.Revision.ErrorCode.ERROR_CODE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, errorCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(build_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, build_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logs_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, logs_); + } + for (int i = 0; i < tfErrors_.size(); i++) { + output.writeMessage(12, tfErrors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorLogs_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, errorLogs_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, serviceAccount_); + } + if (importExistingResources_ != false) { + output.writeBool(15, importExistingResources_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerPool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, workerPool_); + } + 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 (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (action_ != com.google.cloud.config.v1.Revision.Action.ACTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, action_); + } + if (state_ != com.google.cloud.config.v1.Revision.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (blueprintCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.config.v1.TerraformBlueprint) blueprint_); + } + if (applyResults_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getApplyResults()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateDetail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, stateDetail_); + } + if (errorCode_ + != com.google.cloud.config.v1.Revision.ErrorCode.ERROR_CODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, errorCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(build_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, build_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logs_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, logs_); + } + for (int i = 0; i < tfErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, tfErrors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorLogs_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, errorLogs_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, serviceAccount_); + } + if (importExistingResources_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, importExistingResources_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerPool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, workerPool_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.Revision)) { + return super.equals(obj); + } + com.google.cloud.config.v1.Revision other = (com.google.cloud.config.v1.Revision) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (action_ != other.action_) return false; + if (state_ != other.state_) return false; + if (hasApplyResults() != other.hasApplyResults()) return false; + if (hasApplyResults()) { + if (!getApplyResults().equals(other.getApplyResults())) return false; + } + if (!getStateDetail().equals(other.getStateDetail())) return false; + if (errorCode_ != other.errorCode_) return false; + if (!getBuild().equals(other.getBuild())) return false; + if (!getLogs().equals(other.getLogs())) return false; + if (!getTfErrorsList().equals(other.getTfErrorsList())) return false; + if (!getErrorLogs().equals(other.getErrorLogs())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (getImportExistingResources() != other.getImportExistingResources()) return false; + if (!getWorkerPool().equals(other.getWorkerPool())) return false; + if (!getBlueprintCase().equals(other.getBlueprintCase())) return false; + switch (blueprintCase_) { + case 6: + if (!getTerraformBlueprint().equals(other.getTerraformBlueprint())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasApplyResults()) { + hash = (37 * hash) + APPLY_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getApplyResults().hashCode(); + } + hash = (37 * hash) + STATE_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getStateDetail().hashCode(); + hash = (37 * hash) + ERROR_CODE_FIELD_NUMBER; + hash = (53 * hash) + errorCode_; + hash = (37 * hash) + BUILD_FIELD_NUMBER; + hash = (53 * hash) + getBuild().hashCode(); + hash = (37 * hash) + LOGS_FIELD_NUMBER; + hash = (53 * hash) + getLogs().hashCode(); + if (getTfErrorsCount() > 0) { + hash = (37 * hash) + TF_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getTfErrorsList().hashCode(); + } + hash = (37 * hash) + ERROR_LOGS_FIELD_NUMBER; + hash = (53 * hash) + getErrorLogs().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + IMPORT_EXISTING_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getImportExistingResources()); + hash = (37 * hash) + WORKER_POOL_FIELD_NUMBER; + hash = (53 * hash) + getWorkerPool().hashCode(); + switch (blueprintCase_) { + case 6: + hash = (37 * hash) + TERRAFORM_BLUEPRINT_FIELD_NUMBER; + hash = (53 * hash) + getTerraformBlueprint().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.Revision parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Revision parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Revision parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Revision parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Revision parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Revision parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Revision parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Revision parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.Revision parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Revision parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.Revision parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Revision parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.Revision 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 child resource of a Deployment generated by a 'CreateDeployment' or
+   * 'UpdateDeployment' call. Each Revision contains metadata pertaining to a
+   * snapshot of a particular Deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.Revision} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.Revision) + com.google.cloud.config.v1.RevisionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Revision_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Revision_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.Revision.class, + com.google.cloud.config.v1.Revision.Builder.class); + } + + // Construct using com.google.cloud.config.v1.Revision.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (terraformBlueprintBuilder_ != null) { + terraformBlueprintBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + action_ = 0; + state_ = 0; + applyResults_ = null; + if (applyResultsBuilder_ != null) { + applyResultsBuilder_.dispose(); + applyResultsBuilder_ = null; + } + stateDetail_ = ""; + errorCode_ = 0; + build_ = ""; + logs_ = ""; + if (tfErrorsBuilder_ == null) { + tfErrors_ = java.util.Collections.emptyList(); + } else { + tfErrors_ = null; + tfErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + errorLogs_ = ""; + serviceAccount_ = ""; + importExistingResources_ = false; + workerPool_ = ""; + blueprintCase_ = 0; + blueprint_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Revision_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.Revision getDefaultInstanceForType() { + return com.google.cloud.config.v1.Revision.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.Revision build() { + com.google.cloud.config.v1.Revision result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.Revision buildPartial() { + com.google.cloud.config.v1.Revision result = new com.google.cloud.config.v1.Revision(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.config.v1.Revision result) { + if (tfErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + tfErrors_ = java.util.Collections.unmodifiableList(tfErrors_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.tfErrors_ = tfErrors_; + } else { + result.tfErrors_ = tfErrorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.config.v1.Revision result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.action_ = action_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.applyResults_ = + applyResultsBuilder_ == null ? applyResults_ : applyResultsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.stateDetail_ = stateDetail_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.errorCode_ = errorCode_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.build_ = build_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.logs_ = logs_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.errorLogs_ = errorLogs_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.importExistingResources_ = importExistingResources_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.workerPool_ = workerPool_; + } + } + + private void buildPartialOneofs(com.google.cloud.config.v1.Revision result) { + result.blueprintCase_ = blueprintCase_; + result.blueprint_ = this.blueprint_; + if (blueprintCase_ == 6 && terraformBlueprintBuilder_ != null) { + result.blueprint_ = terraformBlueprintBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.Revision) { + return mergeFrom((com.google.cloud.config.v1.Revision) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.Revision other) { + if (other == com.google.cloud.config.v1.Revision.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasApplyResults()) { + mergeApplyResults(other.getApplyResults()); + } + if (!other.getStateDetail().isEmpty()) { + stateDetail_ = other.stateDetail_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.errorCode_ != 0) { + setErrorCodeValue(other.getErrorCodeValue()); + } + if (!other.getBuild().isEmpty()) { + build_ = other.build_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getLogs().isEmpty()) { + logs_ = other.logs_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (tfErrorsBuilder_ == null) { + if (!other.tfErrors_.isEmpty()) { + if (tfErrors_.isEmpty()) { + tfErrors_ = other.tfErrors_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureTfErrorsIsMutable(); + tfErrors_.addAll(other.tfErrors_); + } + onChanged(); + } + } else { + if (!other.tfErrors_.isEmpty()) { + if (tfErrorsBuilder_.isEmpty()) { + tfErrorsBuilder_.dispose(); + tfErrorsBuilder_ = null; + tfErrors_ = other.tfErrors_; + bitField0_ = (bitField0_ & ~0x00000800); + tfErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTfErrorsFieldBuilder() + : null; + } else { + tfErrorsBuilder_.addAllMessages(other.tfErrors_); + } + } + } + if (!other.getErrorLogs().isEmpty()) { + errorLogs_ = other.errorLogs_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.getImportExistingResources() != false) { + setImportExistingResources(other.getImportExistingResources()); + } + if (!other.getWorkerPool().isEmpty()) { + workerPool_ = other.workerPool_; + bitField0_ |= 0x00008000; + onChanged(); + } + switch (other.getBlueprintCase()) { + case TERRAFORM_BLUEPRINT: + { + mergeTerraformBlueprint(other.getTerraformBlueprint()); + break; + } + case BLUEPRINT_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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 32: + { + action_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 40: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 40 + case 50: + { + input.readMessage( + getTerraformBlueprintFieldBuilder().getBuilder(), extensionRegistry); + blueprintCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getApplyResultsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + stateDetail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + errorCode_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: + { + build_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + logs_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + com.google.cloud.config.v1.TerraformError m = + input.readMessage( + com.google.cloud.config.v1.TerraformError.parser(), extensionRegistry); + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + tfErrors_.add(m); + } else { + tfErrorsBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: + { + errorLogs_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 120: + { + importExistingResources_ = input.readBool(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 138: + { + workerPool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 138 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int blueprintCase_ = 0; + private java.lang.Object blueprint_; + + public BlueprintCase getBlueprintCase() { + return BlueprintCase.forNumber(blueprintCase_); + } + + public Builder clearBlueprint() { + blueprintCase_ = 0; + blueprint_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.TerraformBlueprint, + com.google.cloud.config.v1.TerraformBlueprint.Builder, + com.google.cloud.config.v1.TerraformBlueprintOrBuilder> + terraformBlueprintBuilder_; + /** + * + * + *
+     * Output only. A blueprint described using Terraform's HashiCorp
+     * Configuration Language as a root module.
+     * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terraformBlueprint field is set. + */ + @java.lang.Override + public boolean hasTerraformBlueprint() { + return blueprintCase_ == 6; + } + /** + * + * + *
+     * Output only. A blueprint described using Terraform's HashiCorp
+     * Configuration Language as a root module.
+     * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terraformBlueprint. + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprint getTerraformBlueprint() { + if (terraformBlueprintBuilder_ == null) { + if (blueprintCase_ == 6) { + return (com.google.cloud.config.v1.TerraformBlueprint) blueprint_; + } + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } else { + if (blueprintCase_ == 6) { + return terraformBlueprintBuilder_.getMessage(); + } + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. A blueprint described using Terraform's HashiCorp
+     * Configuration Language as a root module.
+     * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTerraformBlueprint(com.google.cloud.config.v1.TerraformBlueprint value) { + if (terraformBlueprintBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + blueprint_ = value; + onChanged(); + } else { + terraformBlueprintBuilder_.setMessage(value); + } + blueprintCase_ = 6; + return this; + } + /** + * + * + *
+     * Output only. A blueprint described using Terraform's HashiCorp
+     * Configuration Language as a root module.
+     * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTerraformBlueprint( + com.google.cloud.config.v1.TerraformBlueprint.Builder builderForValue) { + if (terraformBlueprintBuilder_ == null) { + blueprint_ = builderForValue.build(); + onChanged(); + } else { + terraformBlueprintBuilder_.setMessage(builderForValue.build()); + } + blueprintCase_ = 6; + return this; + } + /** + * + * + *
+     * Output only. A blueprint described using Terraform's HashiCorp
+     * Configuration Language as a root module.
+     * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTerraformBlueprint(com.google.cloud.config.v1.TerraformBlueprint value) { + if (terraformBlueprintBuilder_ == null) { + if (blueprintCase_ == 6 + && blueprint_ != com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance()) { + blueprint_ = + com.google.cloud.config.v1.TerraformBlueprint.newBuilder( + (com.google.cloud.config.v1.TerraformBlueprint) blueprint_) + .mergeFrom(value) + .buildPartial(); + } else { + blueprint_ = value; + } + onChanged(); + } else { + if (blueprintCase_ == 6) { + terraformBlueprintBuilder_.mergeFrom(value); + } else { + terraformBlueprintBuilder_.setMessage(value); + } + } + blueprintCase_ = 6; + return this; + } + /** + * + * + *
+     * Output only. A blueprint described using Terraform's HashiCorp
+     * Configuration Language as a root module.
+     * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTerraformBlueprint() { + if (terraformBlueprintBuilder_ == null) { + if (blueprintCase_ == 6) { + blueprintCase_ = 0; + blueprint_ = null; + onChanged(); + } + } else { + if (blueprintCase_ == 6) { + blueprintCase_ = 0; + blueprint_ = null; + } + terraformBlueprintBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. A blueprint described using Terraform's HashiCorp
+     * Configuration Language as a root module.
+     * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformBlueprint.Builder getTerraformBlueprintBuilder() { + return getTerraformBlueprintFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. A blueprint described using Terraform's HashiCorp
+     * Configuration Language as a root module.
+     * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprintOrBuilder getTerraformBlueprintOrBuilder() { + if ((blueprintCase_ == 6) && (terraformBlueprintBuilder_ != null)) { + return terraformBlueprintBuilder_.getMessageOrBuilder(); + } else { + if (blueprintCase_ == 6) { + return (com.google.cloud.config.v1.TerraformBlueprint) blueprint_; + } + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. A blueprint described using Terraform's HashiCorp
+     * Configuration Language as a root module.
+     * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.TerraformBlueprint, + com.google.cloud.config.v1.TerraformBlueprint.Builder, + com.google.cloud.config.v1.TerraformBlueprintOrBuilder> + getTerraformBlueprintFieldBuilder() { + if (terraformBlueprintBuilder_ == null) { + if (!(blueprintCase_ == 6)) { + blueprint_ = com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + terraformBlueprintBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.TerraformBlueprint, + com.google.cloud.config.v1.TerraformBlueprint.Builder, + com.google.cloud.config.v1.TerraformBlueprintOrBuilder>( + (com.google.cloud.config.v1.TerraformBlueprint) blueprint_, + getParentForChildren(), + isClean()); + blueprint_ = null; + } + blueprintCase_ = 6; + onChanged(); + return terraformBlueprintBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Revision name. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}/
+     * revisions/{revision}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Revision name. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}/
+     * revisions/{revision}`
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Revision name. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}/
+     * revisions/{revision}`
+     * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Revision name. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}/
+     * revisions/{revision}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Revision name. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}/
+     * revisions/{revision}`
+     * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Time when the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the revision was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Time when the revision was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the revision was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the revision was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the revision was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the revision was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the revision was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the revision was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the revision was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int action_ = 0; + /** + * + * + *
+     * Output only. The action which created this revision
+     * 
+ * + * + * .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+     * Output only. The action which created this revision
+     * 
+ * + * + * .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The action which created this revision
+     * 
+ * + * + * .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The action. + */ + @java.lang.Override + public com.google.cloud.config.v1.Revision.Action getAction() { + com.google.cloud.config.v1.Revision.Action result = + com.google.cloud.config.v1.Revision.Action.forNumber(action_); + return result == null ? com.google.cloud.config.v1.Revision.Action.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The action which created this revision
+     * 
+ * + * + * .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(com.google.cloud.config.v1.Revision.Action value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + action_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The action which created this revision
+     * 
+ * + * + * .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000010); + action_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current state of the revision.
+     * 
+ * + * + * .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. Current state of the revision.
+     * 
+ * + * + * .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the revision.
+     * 
+ * + * + * .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.config.v1.Revision.State getState() { + com.google.cloud.config.v1.Revision.State result = + com.google.cloud.config.v1.Revision.State.forNumber(state_); + return result == null ? com.google.cloud.config.v1.Revision.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current state of the revision.
+     * 
+ * + * + * .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.config.v1.Revision.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the revision.
+     * 
+ * + * + * .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.config.v1.ApplyResults applyResults_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ApplyResults, + com.google.cloud.config.v1.ApplyResults.Builder, + com.google.cloud.config.v1.ApplyResultsOrBuilder> + applyResultsBuilder_; + /** + * + * + *
+     * Output only. Outputs and artifacts from applying a deployment.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the applyResults field is set. + */ + public boolean hasApplyResults() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Outputs and artifacts from applying a deployment.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The applyResults. + */ + public com.google.cloud.config.v1.ApplyResults getApplyResults() { + if (applyResultsBuilder_ == null) { + return applyResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : applyResults_; + } else { + return applyResultsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Outputs and artifacts from applying a deployment.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setApplyResults(com.google.cloud.config.v1.ApplyResults value) { + if (applyResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + applyResults_ = value; + } else { + applyResultsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Outputs and artifacts from applying a deployment.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setApplyResults( + com.google.cloud.config.v1.ApplyResults.Builder builderForValue) { + if (applyResultsBuilder_ == null) { + applyResults_ = builderForValue.build(); + } else { + applyResultsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Outputs and artifacts from applying a deployment.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeApplyResults(com.google.cloud.config.v1.ApplyResults value) { + if (applyResultsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && applyResults_ != null + && applyResults_ != com.google.cloud.config.v1.ApplyResults.getDefaultInstance()) { + getApplyResultsBuilder().mergeFrom(value); + } else { + applyResults_ = value; + } + } else { + applyResultsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Outputs and artifacts from applying a deployment.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearApplyResults() { + bitField0_ = (bitField0_ & ~0x00000040); + applyResults_ = null; + if (applyResultsBuilder_ != null) { + applyResultsBuilder_.dispose(); + applyResultsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Outputs and artifacts from applying a deployment.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.ApplyResults.Builder getApplyResultsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getApplyResultsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Outputs and artifacts from applying a deployment.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.ApplyResultsOrBuilder getApplyResultsOrBuilder() { + if (applyResultsBuilder_ != null) { + return applyResultsBuilder_.getMessageOrBuilder(); + } else { + return applyResults_ == null + ? com.google.cloud.config.v1.ApplyResults.getDefaultInstance() + : applyResults_; + } + } + /** + * + * + *
+     * Output only. Outputs and artifacts from applying a deployment.
+     * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ApplyResults, + com.google.cloud.config.v1.ApplyResults.Builder, + com.google.cloud.config.v1.ApplyResultsOrBuilder> + getApplyResultsFieldBuilder() { + if (applyResultsBuilder_ == null) { + applyResultsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.ApplyResults, + com.google.cloud.config.v1.ApplyResults.Builder, + com.google.cloud.config.v1.ApplyResultsOrBuilder>( + getApplyResults(), getParentForChildren(), isClean()); + applyResults_ = null; + } + return applyResultsBuilder_; + } + + private java.lang.Object stateDetail_ = ""; + /** + * + * + *
+     * Output only. Additional info regarding the current state.
+     * 
+ * + * string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDetail. + */ + public java.lang.String getStateDetail() { + java.lang.Object ref = stateDetail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateDetail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Additional info regarding the current state.
+     * 
+ * + * string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDetail. + */ + public com.google.protobuf.ByteString getStateDetailBytes() { + java.lang.Object ref = stateDetail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDetail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Additional info regarding the current state.
+     * 
+ * + * string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The stateDetail to set. + * @return This builder for chaining. + */ + public Builder setStateDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stateDetail_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional info regarding the current state.
+     * 
+ * + * string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStateDetail() { + stateDetail_ = getDefaultInstance().getStateDetail(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional info regarding the current state.
+     * 
+ * + * string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for stateDetail to set. + * @return This builder for chaining. + */ + public Builder setStateDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stateDetail_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int errorCode_ = 0; + /** + * + * + *
+     * Output only. Code describing any errors that may have occurred.
+     * 
+ * + * + * .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for errorCode. + */ + @java.lang.Override + public int getErrorCodeValue() { + return errorCode_; + } + /** + * + * + *
+     * Output only. Code describing any errors that may have occurred.
+     * 
+ * + * + * .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for errorCode to set. + * @return This builder for chaining. + */ + public Builder setErrorCodeValue(int value) { + errorCode_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Code describing any errors that may have occurred.
+     * 
+ * + * + * .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The errorCode. + */ + @java.lang.Override + public com.google.cloud.config.v1.Revision.ErrorCode getErrorCode() { + com.google.cloud.config.v1.Revision.ErrorCode result = + com.google.cloud.config.v1.Revision.ErrorCode.forNumber(errorCode_); + return result == null ? com.google.cloud.config.v1.Revision.ErrorCode.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Code describing any errors that may have occurred.
+     * 
+ * + * + * .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The errorCode to set. + * @return This builder for chaining. + */ + public Builder setErrorCode(com.google.cloud.config.v1.Revision.ErrorCode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + errorCode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Code describing any errors that may have occurred.
+     * 
+ * + * + * .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearErrorCode() { + bitField0_ = (bitField0_ & ~0x00000100); + errorCode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object build_ = ""; + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with this revision.
+     * 
+ * + * string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The build. + */ + public java.lang.String getBuild() { + java.lang.Object ref = build_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + build_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with this revision.
+     * 
+ * + * string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for build. + */ + public com.google.protobuf.ByteString getBuildBytes() { + java.lang.Object ref = build_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + build_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with this revision.
+     * 
+ * + * string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The build to set. + * @return This builder for chaining. + */ + public Builder setBuild(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + build_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with this revision.
+     * 
+ * + * string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBuild() { + build_ = getDefaultInstance().getBuild(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Build instance UUID associated with this revision.
+     * 
+ * + * string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for build to set. + * @return This builder for chaining. + */ + public Builder setBuildBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + build_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object logs_ = ""; + /** + * + * + *
+     * Output only. Location of Revision operation logs in
+     * `gs://{bucket}/{object}` format.
+     * 
+ * + * string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logs. + */ + public java.lang.String getLogs() { + java.lang.Object ref = logs_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logs_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Location of Revision operation logs in
+     * `gs://{bucket}/{object}` format.
+     * 
+ * + * string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for logs. + */ + public com.google.protobuf.ByteString getLogsBytes() { + java.lang.Object ref = logs_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Location of Revision operation logs in
+     * `gs://{bucket}/{object}` format.
+     * 
+ * + * string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The logs to set. + * @return This builder for chaining. + */ + public Builder setLogs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + logs_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of Revision operation logs in
+     * `gs://{bucket}/{object}` format.
+     * 
+ * + * string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLogs() { + logs_ = getDefaultInstance().getLogs(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of Revision operation logs in
+     * `gs://{bucket}/{object}` format.
+     * 
+ * + * string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for logs to set. + * @return This builder for chaining. + */ + public Builder setLogsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + logs_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.util.List tfErrors_ = + java.util.Collections.emptyList(); + + private void ensureTfErrorsIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + tfErrors_ = new java.util.ArrayList(tfErrors_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.TerraformError, + com.google.cloud.config.v1.TerraformError.Builder, + com.google.cloud.config.v1.TerraformErrorOrBuilder> + tfErrorsBuilder_; + + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getTfErrorsList() { + if (tfErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tfErrors_); + } else { + return tfErrorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getTfErrorsCount() { + if (tfErrorsBuilder_ == null) { + return tfErrors_.size(); + } else { + return tfErrorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformError getTfErrors(int index) { + if (tfErrorsBuilder_ == null) { + return tfErrors_.get(index); + } else { + return tfErrorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTfErrors(int index, com.google.cloud.config.v1.TerraformError value) { + if (tfErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTfErrorsIsMutable(); + tfErrors_.set(index, value); + onChanged(); + } else { + tfErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTfErrors( + int index, com.google.cloud.config.v1.TerraformError.Builder builderForValue) { + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + tfErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + tfErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTfErrors(com.google.cloud.config.v1.TerraformError value) { + if (tfErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTfErrorsIsMutable(); + tfErrors_.add(value); + onChanged(); + } else { + tfErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTfErrors(int index, com.google.cloud.config.v1.TerraformError value) { + if (tfErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTfErrorsIsMutable(); + tfErrors_.add(index, value); + onChanged(); + } else { + tfErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTfErrors(com.google.cloud.config.v1.TerraformError.Builder builderForValue) { + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + tfErrors_.add(builderForValue.build()); + onChanged(); + } else { + tfErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTfErrors( + int index, com.google.cloud.config.v1.TerraformError.Builder builderForValue) { + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + tfErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + tfErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllTfErrors( + java.lang.Iterable values) { + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tfErrors_); + onChanged(); + } else { + tfErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTfErrors() { + if (tfErrorsBuilder_ == null) { + tfErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + tfErrorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeTfErrors(int index) { + if (tfErrorsBuilder_ == null) { + ensureTfErrorsIsMutable(); + tfErrors_.remove(index); + onChanged(); + } else { + tfErrorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformError.Builder getTfErrorsBuilder(int index) { + return getTfErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformErrorOrBuilder getTfErrorsOrBuilder(int index) { + if (tfErrorsBuilder_ == null) { + return tfErrors_.get(index); + } else { + return tfErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTfErrorsOrBuilderList() { + if (tfErrorsBuilder_ != null) { + return tfErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tfErrors_); + } + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformError.Builder addTfErrorsBuilder() { + return getTfErrorsFieldBuilder() + .addBuilder(com.google.cloud.config.v1.TerraformError.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.config.v1.TerraformError.Builder addTfErrorsBuilder(int index) { + return getTfErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.config.v1.TerraformError.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Errors encountered when creating or updating this deployment.
+     * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+     * for full details.
+     * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTfErrorsBuilderList() { + return getTfErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.TerraformError, + com.google.cloud.config.v1.TerraformError.Builder, + com.google.cloud.config.v1.TerraformErrorOrBuilder> + getTfErrorsFieldBuilder() { + if (tfErrorsBuilder_ == null) { + tfErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.config.v1.TerraformError, + com.google.cloud.config.v1.TerraformError.Builder, + com.google.cloud.config.v1.TerraformErrorOrBuilder>( + tfErrors_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); + tfErrors_ = null; + } + return tfErrorsBuilder_; + } + + private java.lang.Object errorLogs_ = ""; + /** + * + * + *
+     * Output only. Location of Terraform error logs in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorLogs. + */ + public java.lang.String getErrorLogs() { + java.lang.Object ref = errorLogs_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorLogs_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Location of Terraform error logs in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorLogs. + */ + public com.google.protobuf.ByteString getErrorLogsBytes() { + java.lang.Object ref = errorLogs_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorLogs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Location of Terraform error logs in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The errorLogs to set. + * @return This builder for chaining. + */ + public Builder setErrorLogs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + errorLogs_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of Terraform error logs in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearErrorLogs() { + errorLogs_ = getDefaultInstance().getErrorLogs(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Location of Terraform error logs in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`.
+     * 
+ * + * string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for errorLogs to set. + * @return This builder for chaining. + */ + public Builder setErrorLogsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + errorLogs_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Output only. User-specified Service Account (SA) to be used as credential
+     * to manage resources. Format:
+     * `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. User-specified Service Account (SA) to be used as credential
+     * to manage resources. Format:
+     * `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. User-specified Service Account (SA) to be used as credential
+     * to manage resources. Format:
+     * `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. User-specified Service Account (SA) to be used as credential
+     * to manage resources. Format:
+     * `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. User-specified Service Account (SA) to be used as credential
+     * to manage resources. Format:
+     * `projects/{projectID}/serviceAccounts/{serviceAccount}`
+     * 
+ * + * + * string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private boolean importExistingResources_; + /** + * + * + *
+     * Output only. By default, Infra Manager will return a failure when
+     * Terraform encounters a 409 code (resource conflict error) during actuation.
+     * If this flag is set to true, Infra Manager will instead
+     * attempt to automatically import the resource into the Terraform state (for
+     * supported resource types) and continue actuation.
+     *
+     * Not all resource types are supported, refer to documentation.
+     * 
+ * + * bool import_existing_resources = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The importExistingResources. + */ + @java.lang.Override + public boolean getImportExistingResources() { + return importExistingResources_; + } + /** + * + * + *
+     * Output only. By default, Infra Manager will return a failure when
+     * Terraform encounters a 409 code (resource conflict error) during actuation.
+     * If this flag is set to true, Infra Manager will instead
+     * attempt to automatically import the resource into the Terraform state (for
+     * supported resource types) and continue actuation.
+     *
+     * Not all resource types are supported, refer to documentation.
+     * 
+ * + * bool import_existing_resources = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The importExistingResources to set. + * @return This builder for chaining. + */ + public Builder setImportExistingResources(boolean value) { + + importExistingResources_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. By default, Infra Manager will return a failure when
+     * Terraform encounters a 409 code (resource conflict error) during actuation.
+     * If this flag is set to true, Infra Manager will instead
+     * attempt to automatically import the resource into the Terraform state (for
+     * supported resource types) and continue actuation.
+     *
+     * Not all resource types are supported, refer to documentation.
+     * 
+ * + * bool import_existing_resources = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearImportExistingResources() { + bitField0_ = (bitField0_ & ~0x00004000); + importExistingResources_ = false; + onChanged(); + return this; + } + + private java.lang.Object workerPool_ = ""; + /** + * + * + *
+     * Output only. The user-specified Cloud Build worker pool resource in which
+     * the Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The workerPool. + */ + public java.lang.String getWorkerPool() { + java.lang.Object ref = workerPool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workerPool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The user-specified Cloud Build worker pool resource in which
+     * the Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for workerPool. + */ + public com.google.protobuf.ByteString getWorkerPoolBytes() { + java.lang.Object ref = workerPool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workerPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The user-specified Cloud Build worker pool resource in which
+     * the Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The workerPool to set. + * @return This builder for chaining. + */ + public Builder setWorkerPool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + workerPool_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The user-specified Cloud Build worker pool resource in which
+     * the Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearWorkerPool() { + workerPool_ = getDefaultInstance().getWorkerPool(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The user-specified Cloud Build worker pool resource in which
+     * the Cloud Build job will execute. Format:
+     * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+     * If this field is unspecified, the default Cloud Build worker pool will be
+     * used.
+     * 
+ * + * + * string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for workerPool to set. + * @return This builder for chaining. + */ + public Builder setWorkerPoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + workerPool_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.Revision) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.Revision) + private static final com.google.cloud.config.v1.Revision DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.Revision(); + } + + public static com.google.cloud.config.v1.Revision getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Revision parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.Revision getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/RevisionName.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/RevisionName.java new file mode 100644 index 000000000000..1456964acec3 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/RevisionName.java @@ -0,0 +1,261 @@ +/* + * 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.cloud.config.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class RevisionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DEPLOYMENT_REVISION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String deployment; + private final String revision; + + @Deprecated + protected RevisionName() { + project = null; + location = null; + deployment = null; + revision = null; + } + + private RevisionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deployment = Preconditions.checkNotNull(builder.getDeployment()); + revision = Preconditions.checkNotNull(builder.getRevision()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeployment() { + return deployment; + } + + public String getRevision() { + return revision; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RevisionName of( + String project, String location, String deployment, String revision) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeployment(deployment) + .setRevision(revision) + .build(); + } + + public static String format(String project, String location, String deployment, String revision) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeployment(deployment) + .setRevision(revision) + .build() + .toString(); + } + + public static RevisionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DEPLOYMENT_REVISION.validatedMatch( + formattedString, "RevisionName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("deployment"), + matchMap.get("revision")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (RevisionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DEPLOYMENT_REVISION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (deployment != null) { + fieldMapBuilder.put("deployment", deployment); + } + if (revision != null) { + fieldMapBuilder.put("revision", revision); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DEPLOYMENT_REVISION.instantiate( + "project", project, "location", location, "deployment", deployment, "revision", revision); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + RevisionName that = ((RevisionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.deployment, that.deployment) + && Objects.equals(this.revision, that.revision); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(deployment); + h *= 1000003; + h ^= Objects.hashCode(revision); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}. + */ + public static class Builder { + private String project; + private String location; + private String deployment; + private String revision; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeployment() { + return deployment; + } + + public String getRevision() { + return revision; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDeployment(String deployment) { + this.deployment = deployment; + return this; + } + + public Builder setRevision(String revision) { + this.revision = revision; + return this; + } + + private Builder(RevisionName revisionName) { + this.project = revisionName.project; + this.location = revisionName.location; + this.deployment = revisionName.deployment; + this.revision = revisionName.revision; + } + + public RevisionName build() { + return new RevisionName(this); + } + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/RevisionOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/RevisionOrBuilder.java new file mode 100644 index 000000000000..1d03bb4a1892 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/RevisionOrBuilder.java @@ -0,0 +1,569 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface RevisionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.Revision) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. A blueprint described using Terraform's HashiCorp
+   * Configuration Language as a root module.
+   * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terraformBlueprint field is set. + */ + boolean hasTerraformBlueprint(); + /** + * + * + *
+   * Output only. A blueprint described using Terraform's HashiCorp
+   * Configuration Language as a root module.
+   * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terraformBlueprint. + */ + com.google.cloud.config.v1.TerraformBlueprint getTerraformBlueprint(); + /** + * + * + *
+   * Output only. A blueprint described using Terraform's HashiCorp
+   * Configuration Language as a root module.
+   * 
+ * + * + * .google.cloud.config.v1.TerraformBlueprint terraform_blueprint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.config.v1.TerraformBlueprintOrBuilder getTerraformBlueprintOrBuilder(); + + /** + * + * + *
+   * Revision name. Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}/
+   * revisions/{revision}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Revision name. Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}/
+   * revisions/{revision}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the revision was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The action which created this revision
+   * 
+ * + * + * .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + /** + * + * + *
+   * Output only. The action which created this revision
+   * 
+ * + * + * .google.cloud.config.v1.Revision.Action action = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The action. + */ + com.google.cloud.config.v1.Revision.Action getAction(); + + /** + * + * + *
+   * Output only. Current state of the revision.
+   * 
+ * + * + * .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current state of the revision.
+   * 
+ * + * + * .google.cloud.config.v1.Revision.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.config.v1.Revision.State getState(); + + /** + * + * + *
+   * Output only. Outputs and artifacts from applying a deployment.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the applyResults field is set. + */ + boolean hasApplyResults(); + /** + * + * + *
+   * Output only. Outputs and artifacts from applying a deployment.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The applyResults. + */ + com.google.cloud.config.v1.ApplyResults getApplyResults(); + /** + * + * + *
+   * Output only. Outputs and artifacts from applying a deployment.
+   * 
+ * + * + * .google.cloud.config.v1.ApplyResults apply_results = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.config.v1.ApplyResultsOrBuilder getApplyResultsOrBuilder(); + + /** + * + * + *
+   * Output only. Additional info regarding the current state.
+   * 
+ * + * string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDetail. + */ + java.lang.String getStateDetail(); + /** + * + * + *
+   * Output only. Additional info regarding the current state.
+   * 
+ * + * string state_detail = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDetail. + */ + com.google.protobuf.ByteString getStateDetailBytes(); + + /** + * + * + *
+   * Output only. Code describing any errors that may have occurred.
+   * 
+ * + * + * .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for errorCode. + */ + int getErrorCodeValue(); + /** + * + * + *
+   * Output only. Code describing any errors that may have occurred.
+   * 
+ * + * + * .google.cloud.config.v1.Revision.ErrorCode error_code = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The errorCode. + */ + com.google.cloud.config.v1.Revision.ErrorCode getErrorCode(); + + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with this revision.
+   * 
+ * + * string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The build. + */ + java.lang.String getBuild(); + /** + * + * + *
+   * Output only. Cloud Build instance UUID associated with this revision.
+   * 
+ * + * string build = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for build. + */ + com.google.protobuf.ByteString getBuildBytes(); + + /** + * + * + *
+   * Output only. Location of Revision operation logs in
+   * `gs://{bucket}/{object}` format.
+   * 
+ * + * string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logs. + */ + java.lang.String getLogs(); + /** + * + * + *
+   * Output only. Location of Revision operation logs in
+   * `gs://{bucket}/{object}` format.
+   * 
+ * + * string logs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for logs. + */ + com.google.protobuf.ByteString getLogsBytes(); + + /** + * + * + *
+   * Output only. Errors encountered when creating or updating this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getTfErrorsList(); + /** + * + * + *
+   * Output only. Errors encountered when creating or updating this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.config.v1.TerraformError getTfErrors(int index); + /** + * + * + *
+   * Output only. Errors encountered when creating or updating this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getTfErrorsCount(); + /** + * + * + *
+   * Output only. Errors encountered when creating or updating this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getTfErrorsOrBuilderList(); + /** + * + * + *
+   * Output only. Errors encountered when creating or updating this deployment.
+   * Errors are truncated to 10 entries, see `delete_results` and `error_logs`
+   * for full details.
+   * 
+ * + * + * repeated .google.cloud.config.v1.TerraformError tf_errors = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.config.v1.TerraformErrorOrBuilder getTfErrorsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Location of Terraform error logs in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The errorLogs. + */ + java.lang.String getErrorLogs(); + /** + * + * + *
+   * Output only. Location of Terraform error logs in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`.
+   * 
+ * + * string error_logs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for errorLogs. + */ + com.google.protobuf.ByteString getErrorLogsBytes(); + + /** + * + * + *
+   * Output only. User-specified Service Account (SA) to be used as credential
+   * to manage resources. Format:
+   * `projects/{projectID}/serviceAccounts/{serviceAccount}`
+   * 
+ * + * + * string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Output only. User-specified Service Account (SA) to be used as credential
+   * to manage resources. Format:
+   * `projects/{projectID}/serviceAccounts/{serviceAccount}`
+   * 
+ * + * + * string service_account = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Output only. By default, Infra Manager will return a failure when
+   * Terraform encounters a 409 code (resource conflict error) during actuation.
+   * If this flag is set to true, Infra Manager will instead
+   * attempt to automatically import the resource into the Terraform state (for
+   * supported resource types) and continue actuation.
+   *
+   * Not all resource types are supported, refer to documentation.
+   * 
+ * + * bool import_existing_resources = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The importExistingResources. + */ + boolean getImportExistingResources(); + + /** + * + * + *
+   * Output only. The user-specified Cloud Build worker pool resource in which
+   * the Cloud Build job will execute. Format:
+   * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+   * If this field is unspecified, the default Cloud Build worker pool will be
+   * used.
+   * 
+ * + * + * string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The workerPool. + */ + java.lang.String getWorkerPool(); + /** + * + * + *
+   * Output only. The user-specified Cloud Build worker pool resource in which
+   * the Cloud Build job will execute. Format:
+   * `projects/{project}/locations/{location}/workerPools/{workerPoolId}`.
+   * If this field is unspecified, the default Cloud Build worker pool will be
+   * used.
+   * 
+ * + * + * string worker_pool = 17 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for workerPool. + */ + com.google.protobuf.ByteString getWorkerPoolBytes(); + + com.google.cloud.config.v1.Revision.BlueprintCase getBlueprintCase(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Statefile.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Statefile.java new file mode 100644 index 000000000000..696acebd02f1 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/Statefile.java @@ -0,0 +1,627 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * Contains info about a Terraform state file
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.Statefile} + */ +public final class Statefile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.Statefile) + StatefileOrBuilder { + private static final long serialVersionUID = 0L; + // Use Statefile.newBuilder() to construct. + private Statefile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Statefile() { + signedUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Statefile(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Statefile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Statefile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.Statefile.class, + com.google.cloud.config.v1.Statefile.Builder.class); + } + + public static final int SIGNED_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object signedUri_ = ""; + /** + * + * + *
+   * Output only. Cloud Storage signed URI used for downloading or uploading the
+   * state file.
+   * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The signedUri. + */ + @java.lang.Override + public java.lang.String getSignedUri() { + java.lang.Object ref = signedUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Cloud Storage signed URI used for downloading or uploading the
+   * state file.
+   * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for signedUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignedUriBytes() { + java.lang.Object ref = signedUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + signedUri_ = 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(signedUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signedUri_); + } + 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(signedUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signedUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.Statefile)) { + return super.equals(obj); + } + com.google.cloud.config.v1.Statefile other = (com.google.cloud.config.v1.Statefile) obj; + + if (!getSignedUri().equals(other.getSignedUri())) 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) + SIGNED_URI_FIELD_NUMBER; + hash = (53 * hash) + getSignedUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.Statefile parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Statefile parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Statefile parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Statefile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Statefile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.Statefile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.Statefile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Statefile parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.Statefile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Statefile parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.Statefile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.Statefile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.Statefile 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; + } + /** + * + * + *
+   * Contains info about a Terraform state file
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.Statefile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.Statefile) + com.google.cloud.config.v1.StatefileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Statefile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Statefile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.Statefile.class, + com.google.cloud.config.v1.Statefile.Builder.class); + } + + // Construct using com.google.cloud.config.v1.Statefile.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + signedUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_Statefile_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.Statefile getDefaultInstanceForType() { + return com.google.cloud.config.v1.Statefile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.Statefile build() { + com.google.cloud.config.v1.Statefile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.Statefile buildPartial() { + com.google.cloud.config.v1.Statefile result = new com.google.cloud.config.v1.Statefile(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.Statefile result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.signedUri_ = signedUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.Statefile) { + return mergeFrom((com.google.cloud.config.v1.Statefile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.Statefile other) { + if (other == com.google.cloud.config.v1.Statefile.getDefaultInstance()) return this; + if (!other.getSignedUri().isEmpty()) { + signedUri_ = other.signedUri_; + 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: + { + signedUri_ = 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 signedUri_ = ""; + /** + * + * + *
+     * Output only. Cloud Storage signed URI used for downloading or uploading the
+     * state file.
+     * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The signedUri. + */ + public java.lang.String getSignedUri() { + java.lang.Object ref = signedUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Storage signed URI used for downloading or uploading the
+     * state file.
+     * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for signedUri. + */ + public com.google.protobuf.ByteString getSignedUriBytes() { + java.lang.Object ref = signedUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + signedUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Cloud Storage signed URI used for downloading or uploading the
+     * state file.
+     * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The signedUri to set. + * @return This builder for chaining. + */ + public Builder setSignedUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + signedUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Storage signed URI used for downloading or uploading the
+     * state file.
+     * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSignedUri() { + signedUri_ = getDefaultInstance().getSignedUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Cloud Storage signed URI used for downloading or uploading the
+     * state file.
+     * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for signedUri to set. + * @return This builder for chaining. + */ + public Builder setSignedUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + signedUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.Statefile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.Statefile) + private static final com.google.cloud.config.v1.Statefile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.Statefile(); + } + + public static com.google.cloud.config.v1.Statefile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Statefile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.Statefile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/StatefileOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/StatefileOrBuilder.java new file mode 100644 index 000000000000..de23ff6889dc --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/StatefileOrBuilder.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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface StatefileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.Statefile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Cloud Storage signed URI used for downloading or uploading the
+   * state file.
+   * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The signedUri. + */ + java.lang.String getSignedUri(); + /** + * + * + *
+   * Output only. Cloud Storage signed URI used for downloading or uploading the
+   * state file.
+   * 
+ * + * string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for signedUri. + */ + com.google.protobuf.ByteString getSignedUriBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformBlueprint.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformBlueprint.java new file mode 100644 index 000000000000..47686897185e --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformBlueprint.java @@ -0,0 +1,1469 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * TerraformBlueprint describes the source of a Terraform root module which
+ * describes the resources and configs to be deployed.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.TerraformBlueprint} + */ +public final class TerraformBlueprint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.TerraformBlueprint) + TerraformBlueprintOrBuilder { + private static final long serialVersionUID = 0L; + // Use TerraformBlueprint.newBuilder() to construct. + private TerraformBlueprint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TerraformBlueprint() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TerraformBlueprint(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformBlueprint_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetInputValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformBlueprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.TerraformBlueprint.class, + com.google.cloud.config.v1.TerraformBlueprint.Builder.class); + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_SOURCE(1), + GIT_SOURCE(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(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 SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: + return GCS_SOURCE; + case 2: + return GIT_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Required. URI of an object in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   *
+   * URI may also specify an object version for zipped objects.
+   * Format: `gs://{bucket}/{object}#{version}`
+   * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the gcsSource field is set. + */ + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + * + * + *
+   * Required. URI of an object in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   *
+   * URI may also specify an object version for zipped objects.
+   * Format: `gs://{bucket}/{object}#{version}`
+   * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsSource. + */ + public java.lang.String getGcsSource() { + java.lang.Object ref = ""; + if (sourceCase_ == 1) { + ref = source_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 1) { + source_ = s; + } + return s; + } + } + /** + * + * + *
+   * Required. URI of an object in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   *
+   * URI may also specify an object version for zipped objects.
+   * Format: `gs://{bucket}/{object}#{version}`
+   * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsSource. + */ + public com.google.protobuf.ByteString getGcsSourceBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 1) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 1) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GIT_SOURCE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Required. URI of a public Git repo.
+   * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the gitSource field is set. + */ + @java.lang.Override + public boolean hasGitSource() { + return sourceCase_ == 2; + } + /** + * + * + *
+   * Required. URI of a public Git repo.
+   * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The gitSource. + */ + @java.lang.Override + public com.google.cloud.config.v1.GitSource getGitSource() { + if (sourceCase_ == 2) { + return (com.google.cloud.config.v1.GitSource) source_; + } + return com.google.cloud.config.v1.GitSource.getDefaultInstance(); + } + /** + * + * + *
+   * Required. URI of a public Git repo.
+   * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.GitSourceOrBuilder getGitSourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.config.v1.GitSource) source_; + } + return com.google.cloud.config.v1.GitSource.getDefaultInstance(); + } + + public static final int INPUT_VALUES_FIELD_NUMBER = 4; + + private static final class InputValuesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.config.v1.TerraformVariable> + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformBlueprint_InputValuesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.config.v1.TerraformVariable.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.TerraformVariable> + inputValues_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.TerraformVariable> + internalGetInputValues() { + if (inputValues_ == null) { + return com.google.protobuf.MapField.emptyMapField(InputValuesDefaultEntryHolder.defaultEntry); + } + return inputValues_; + } + + public int getInputValuesCount() { + return internalGetInputValues().getMap().size(); + } + /** + * + * + *
+   * Input variable values for the Terraform blueprint.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + @java.lang.Override + public boolean containsInputValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetInputValues().getMap().containsKey(key); + } + /** Use {@link #getInputValuesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getInputValues() { + return getInputValuesMap(); + } + /** + * + * + *
+   * Input variable values for the Terraform blueprint.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + @java.lang.Override + public java.util.Map + getInputValuesMap() { + return internalGetInputValues().getMap(); + } + /** + * + * + *
+   * Input variable values for the Terraform blueprint.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + @java.lang.Override + public /* nullable */ com.google.cloud.config.v1.TerraformVariable getInputValuesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.config.v1.TerraformVariable defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetInputValues().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Input variable values for the Terraform blueprint.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformVariable getInputValuesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetInputValues().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 (sourceCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_); + } + if (sourceCase_ == 2) { + output.writeMessage(2, (com.google.cloud.config.v1.GitSource) source_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetInputValues(), InputValuesDefaultEntryHolder.defaultEntry, 4); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, source_); + } + if (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.config.v1.GitSource) source_); + } + for (java.util.Map.Entry entry : + internalGetInputValues().getMap().entrySet()) { + com.google.protobuf.MapEntry + inputValues__ = + InputValuesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, inputValues__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.TerraformBlueprint)) { + return super.equals(obj); + } + com.google.cloud.config.v1.TerraformBlueprint other = + (com.google.cloud.config.v1.TerraformBlueprint) obj; + + if (!internalGetInputValues().equals(other.internalGetInputValues())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getGcsSource().equals(other.getGcsSource())) return false; + break; + case 2: + if (!getGitSource().equals(other.getGitSource())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetInputValues().getMap().isEmpty()) { + hash = (37 * hash) + INPUT_VALUES_FIELD_NUMBER; + hash = (53 * hash) + internalGetInputValues().hashCode(); + } + switch (sourceCase_) { + case 1: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 2: + hash = (37 * hash) + GIT_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGitSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformBlueprint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.TerraformBlueprint 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; + } + /** + * + * + *
+   * TerraformBlueprint describes the source of a Terraform root module which
+   * describes the resources and configs to be deployed.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.TerraformBlueprint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.TerraformBlueprint) + com.google.cloud.config.v1.TerraformBlueprintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformBlueprint_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetInputValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableInputValues(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformBlueprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.TerraformBlueprint.class, + com.google.cloud.config.v1.TerraformBlueprint.Builder.class); + } + + // Construct using com.google.cloud.config.v1.TerraformBlueprint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gitSourceBuilder_ != null) { + gitSourceBuilder_.clear(); + } + internalGetMutableInputValues().clear(); + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformBlueprint_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprint getDefaultInstanceForType() { + return com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprint build() { + com.google.cloud.config.v1.TerraformBlueprint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprint buildPartial() { + com.google.cloud.config.v1.TerraformBlueprint result = + new com.google.cloud.config.v1.TerraformBlueprint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.TerraformBlueprint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.inputValues_ = internalGetInputValues(); + result.inputValues_.makeImmutable(); + } + } + + private void buildPartialOneofs(com.google.cloud.config.v1.TerraformBlueprint result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 2 && gitSourceBuilder_ != null) { + result.source_ = gitSourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.TerraformBlueprint) { + return mergeFrom((com.google.cloud.config.v1.TerraformBlueprint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.TerraformBlueprint other) { + if (other == com.google.cloud.config.v1.TerraformBlueprint.getDefaultInstance()) return this; + internalGetMutableInputValues().mergeFrom(other.internalGetInputValues()); + bitField0_ |= 0x00000004; + switch (other.getSourceCase()) { + case GCS_SOURCE: + { + sourceCase_ = 1; + source_ = other.source_; + onChanged(); + break; + } + case GIT_SOURCE: + { + mergeGitSource(other.getGitSource()); + break; + } + case SOURCE_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(); + sourceCase_ = 1; + source_ = s; + break; + } // case 10 + case 18: + { + input.readMessage(getGitSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 34: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.config.v1.TerraformVariable> + inputValues__ = + input.readMessage( + InputValuesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableInputValues() + .getMutableMap() + .put(inputValues__.getKey(), inputValues__.getValue()); + bitField0_ |= 0x00000004; + 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 sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Required. URI of an object in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     *
+     * URI may also specify an object version for zipped objects.
+     * Format: `gs://{bucket}/{object}#{version}`
+     * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the gcsSource field is set. + */ + @java.lang.Override + public boolean hasGcsSource() { + return sourceCase_ == 1; + } + /** + * + * + *
+     * Required. URI of an object in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     *
+     * URI may also specify an object version for zipped objects.
+     * Format: `gs://{bucket}/{object}#{version}`
+     * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsSource. + */ + @java.lang.Override + public java.lang.String getGcsSource() { + java.lang.Object ref = ""; + if (sourceCase_ == 1) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 1) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. URI of an object in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     *
+     * URI may also specify an object version for zipped objects.
+     * Format: `gs://{bucket}/{object}#{version}`
+     * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsSource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsSourceBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 1) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 1) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. URI of an object in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     *
+     * URI may also specify an object version for zipped objects.
+     * Format: `gs://{bucket}/{object}#{version}`
+     * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The gcsSource to set. + * @return This builder for chaining. + */ + public Builder setGcsSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 1; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. URI of an object in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     *
+     * URI may also specify an object version for zipped objects.
+     * Format: `gs://{bucket}/{object}#{version}`
+     * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGcsSource() { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. URI of an object in Google Cloud Storage.
+     * Format: `gs://{bucket}/{object}`
+     *
+     * URI may also specify an object version for zipped objects.
+     * Format: `gs://{bucket}/{object}#{version}`
+     * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for gcsSource to set. + * @return This builder for chaining. + */ + public Builder setGcsSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 1; + source_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.GitSource, + com.google.cloud.config.v1.GitSource.Builder, + com.google.cloud.config.v1.GitSourceOrBuilder> + gitSourceBuilder_; + /** + * + * + *
+     * Required. URI of a public Git repo.
+     * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the gitSource field is set. + */ + @java.lang.Override + public boolean hasGitSource() { + return sourceCase_ == 2; + } + /** + * + * + *
+     * Required. URI of a public Git repo.
+     * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The gitSource. + */ + @java.lang.Override + public com.google.cloud.config.v1.GitSource getGitSource() { + if (gitSourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.cloud.config.v1.GitSource) source_; + } + return com.google.cloud.config.v1.GitSource.getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return gitSourceBuilder_.getMessage(); + } + return com.google.cloud.config.v1.GitSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Required. URI of a public Git repo.
+     * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGitSource(com.google.cloud.config.v1.GitSource value) { + if (gitSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gitSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Required. URI of a public Git repo.
+     * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGitSource(com.google.cloud.config.v1.GitSource.Builder builderForValue) { + if (gitSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gitSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Required. URI of a public Git repo.
+     * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGitSource(com.google.cloud.config.v1.GitSource value) { + if (gitSourceBuilder_ == null) { + if (sourceCase_ == 2 + && source_ != com.google.cloud.config.v1.GitSource.getDefaultInstance()) { + source_ = + com.google.cloud.config.v1.GitSource.newBuilder( + (com.google.cloud.config.v1.GitSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + gitSourceBuilder_.mergeFrom(value); + } else { + gitSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 2; + return this; + } + /** + * + * + *
+     * Required. URI of a public Git repo.
+     * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGitSource() { + if (gitSourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + gitSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. URI of a public Git repo.
+     * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.config.v1.GitSource.Builder getGitSourceBuilder() { + return getGitSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. URI of a public Git repo.
+     * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.GitSourceOrBuilder getGitSourceOrBuilder() { + if ((sourceCase_ == 2) && (gitSourceBuilder_ != null)) { + return gitSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.cloud.config.v1.GitSource) source_; + } + return com.google.cloud.config.v1.GitSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Required. URI of a public Git repo.
+     * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.GitSource, + com.google.cloud.config.v1.GitSource.Builder, + com.google.cloud.config.v1.GitSourceOrBuilder> + getGitSourceFieldBuilder() { + if (gitSourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = com.google.cloud.config.v1.GitSource.getDefaultInstance(); + } + gitSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.GitSource, + com.google.cloud.config.v1.GitSource.Builder, + com.google.cloud.config.v1.GitSourceOrBuilder>( + (com.google.cloud.config.v1.GitSource) source_, getParentForChildren(), isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + return gitSourceBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.TerraformVariable> + inputValues_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.TerraformVariable> + internalGetInputValues() { + if (inputValues_ == null) { + return com.google.protobuf.MapField.emptyMapField( + InputValuesDefaultEntryHolder.defaultEntry); + } + return inputValues_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.config.v1.TerraformVariable> + internalGetMutableInputValues() { + if (inputValues_ == null) { + inputValues_ = + com.google.protobuf.MapField.newMapField(InputValuesDefaultEntryHolder.defaultEntry); + } + if (!inputValues_.isMutable()) { + inputValues_ = inputValues_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return inputValues_; + } + + public int getInputValuesCount() { + return internalGetInputValues().getMap().size(); + } + /** + * + * + *
+     * Input variable values for the Terraform blueprint.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + @java.lang.Override + public boolean containsInputValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetInputValues().getMap().containsKey(key); + } + /** Use {@link #getInputValuesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getInputValues() { + return getInputValuesMap(); + } + /** + * + * + *
+     * Input variable values for the Terraform blueprint.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + @java.lang.Override + public java.util.Map + getInputValuesMap() { + return internalGetInputValues().getMap(); + } + /** + * + * + *
+     * Input variable values for the Terraform blueprint.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + @java.lang.Override + public /* nullable */ com.google.cloud.config.v1.TerraformVariable getInputValuesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.config.v1.TerraformVariable defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetInputValues().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Input variable values for the Terraform blueprint.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + @java.lang.Override + public com.google.cloud.config.v1.TerraformVariable getInputValuesOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetInputValues().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearInputValues() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableInputValues().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Input variable values for the Terraform blueprint.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + public Builder removeInputValues(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableInputValues().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableInputValues() { + bitField0_ |= 0x00000004; + return internalGetMutableInputValues().getMutableMap(); + } + /** + * + * + *
+     * Input variable values for the Terraform blueprint.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + public Builder putInputValues( + java.lang.String key, com.google.cloud.config.v1.TerraformVariable value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableInputValues().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * Input variable values for the Terraform blueprint.
+     * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + public Builder putAllInputValues( + java.util.Map values) { + internalGetMutableInputValues().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.TerraformBlueprint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.TerraformBlueprint) + private static final com.google.cloud.config.v1.TerraformBlueprint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.TerraformBlueprint(); + } + + public static com.google.cloud.config.v1.TerraformBlueprint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TerraformBlueprint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformBlueprint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformBlueprintOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformBlueprintOrBuilder.java new file mode 100644 index 000000000000..97a590677615 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformBlueprintOrBuilder.java @@ -0,0 +1,175 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface TerraformBlueprintOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.TerraformBlueprint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. URI of an object in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   *
+   * URI may also specify an object version for zipped objects.
+   * Format: `gs://{bucket}/{object}#{version}`
+   * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the gcsSource field is set. + */ + boolean hasGcsSource(); + /** + * + * + *
+   * Required. URI of an object in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   *
+   * URI may also specify an object version for zipped objects.
+   * Format: `gs://{bucket}/{object}#{version}`
+   * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsSource. + */ + java.lang.String getGcsSource(); + /** + * + * + *
+   * Required. URI of an object in Google Cloud Storage.
+   * Format: `gs://{bucket}/{object}`
+   *
+   * URI may also specify an object version for zipped objects.
+   * Format: `gs://{bucket}/{object}#{version}`
+   * 
+ * + * string gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsSource. + */ + com.google.protobuf.ByteString getGcsSourceBytes(); + + /** + * + * + *
+   * Required. URI of a public Git repo.
+   * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the gitSource field is set. + */ + boolean hasGitSource(); + /** + * + * + *
+   * Required. URI of a public Git repo.
+   * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The gitSource. + */ + com.google.cloud.config.v1.GitSource getGitSource(); + /** + * + * + *
+   * Required. URI of a public Git repo.
+   * 
+ * + * + * .google.cloud.config.v1.GitSource git_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.config.v1.GitSourceOrBuilder getGitSourceOrBuilder(); + + /** + * + * + *
+   * Input variable values for the Terraform blueprint.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + int getInputValuesCount(); + /** + * + * + *
+   * Input variable values for the Terraform blueprint.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + boolean containsInputValues(java.lang.String key); + /** Use {@link #getInputValuesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getInputValues(); + /** + * + * + *
+   * Input variable values for the Terraform blueprint.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + java.util.Map getInputValuesMap(); + /** + * + * + *
+   * Input variable values for the Terraform blueprint.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + /* nullable */ + com.google.cloud.config.v1.TerraformVariable getInputValuesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.config.v1.TerraformVariable defaultValue); + /** + * + * + *
+   * Input variable values for the Terraform blueprint.
+   * 
+ * + * map<string, .google.cloud.config.v1.TerraformVariable> input_values = 4; + */ + com.google.cloud.config.v1.TerraformVariable getInputValuesOrThrow(java.lang.String key); + + com.google.cloud.config.v1.TerraformBlueprint.SourceCase getSourceCase(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformError.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformError.java new file mode 100644 index 000000000000..17424d8885ff --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformError.java @@ -0,0 +1,1164 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * Errors encountered during actuation using Terraform
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.TerraformError} + */ +public final class TerraformError extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.TerraformError) + TerraformErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use TerraformError.newBuilder() to construct. + private TerraformError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TerraformError() { + resourceAddress_ = ""; + errorDescription_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TerraformError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.TerraformError.class, + com.google.cloud.config.v1.TerraformError.Builder.class); + } + + public static final int RESOURCE_ADDRESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceAddress_ = ""; + /** + * + * + *
+   * Address of the resource associated with the error,
+   * e.g. `google_compute_network.vpc_network`.
+   * 
+ * + * string resource_address = 1; + * + * @return The resourceAddress. + */ + @java.lang.Override + public java.lang.String getResourceAddress() { + java.lang.Object ref = resourceAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceAddress_ = s; + return s; + } + } + /** + * + * + *
+   * Address of the resource associated with the error,
+   * e.g. `google_compute_network.vpc_network`.
+   * 
+ * + * string resource_address = 1; + * + * @return The bytes for resourceAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceAddressBytes() { + java.lang.Object ref = resourceAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HTTP_RESPONSE_CODE_FIELD_NUMBER = 2; + private int httpResponseCode_ = 0; + /** + * + * + *
+   * HTTP response code returned from Google Cloud Platform APIs when Terraform
+   * fails to provision the resource. If unset or 0, no HTTP response code was
+   * returned by Terraform.
+   * 
+ * + * int32 http_response_code = 2; + * + * @return The httpResponseCode. + */ + @java.lang.Override + public int getHttpResponseCode() { + return httpResponseCode_; + } + + public static final int ERROR_DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object errorDescription_ = ""; + /** + * + * + *
+   * A human-readable error description.
+   * 
+ * + * string error_description = 3; + * + * @return The errorDescription. + */ + @java.lang.Override + public java.lang.String getErrorDescription() { + java.lang.Object ref = errorDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorDescription_ = s; + return s; + } + } + /** + * + * + *
+   * A human-readable error description.
+   * 
+ * + * string error_description = 3; + * + * @return The bytes for errorDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorDescriptionBytes() { + java.lang.Object ref = errorDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_FIELD_NUMBER = 4; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Original error response from underlying Google API, if available.
+   * 
+ * + * .google.rpc.Status error = 4; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return error_ != null; + } + /** + * + * + *
+   * Original error response from underlying Google API, if available.
+   * 
+ * + * .google.rpc.Status error = 4; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Original error response from underlying Google API, if available.
+   * 
+ * + * .google.rpc.Status error = 4; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + 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(resourceAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceAddress_); + } + if (httpResponseCode_ != 0) { + output.writeInt32(2, httpResponseCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, errorDescription_); + } + if (error_ != null) { + output.writeMessage(4, getError()); + } + 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(resourceAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceAddress_); + } + if (httpResponseCode_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, httpResponseCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, errorDescription_); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getError()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.TerraformError)) { + return super.equals(obj); + } + com.google.cloud.config.v1.TerraformError other = + (com.google.cloud.config.v1.TerraformError) obj; + + if (!getResourceAddress().equals(other.getResourceAddress())) return false; + if (getHttpResponseCode() != other.getHttpResponseCode()) return false; + if (!getErrorDescription().equals(other.getErrorDescription())) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) 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) + RESOURCE_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getResourceAddress().hashCode(); + hash = (37 * hash) + HTTP_RESPONSE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getHttpResponseCode(); + hash = (37 * hash) + ERROR_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getErrorDescription().hashCode(); + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.TerraformError parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformError parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformError parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformError parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.TerraformError 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; + } + /** + * + * + *
+   * Errors encountered during actuation using Terraform
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.TerraformError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.TerraformError) + com.google.cloud.config.v1.TerraformErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.TerraformError.class, + com.google.cloud.config.v1.TerraformError.Builder.class); + } + + // Construct using com.google.cloud.config.v1.TerraformError.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceAddress_ = ""; + httpResponseCode_ = 0; + errorDescription_ = ""; + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformError_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformError getDefaultInstanceForType() { + return com.google.cloud.config.v1.TerraformError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformError build() { + com.google.cloud.config.v1.TerraformError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformError buildPartial() { + com.google.cloud.config.v1.TerraformError result = + new com.google.cloud.config.v1.TerraformError(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.TerraformError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceAddress_ = resourceAddress_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.httpResponseCode_ = httpResponseCode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.errorDescription_ = errorDescription_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.TerraformError) { + return mergeFrom((com.google.cloud.config.v1.TerraformError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.TerraformError other) { + if (other == com.google.cloud.config.v1.TerraformError.getDefaultInstance()) return this; + if (!other.getResourceAddress().isEmpty()) { + resourceAddress_ = other.resourceAddress_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getHttpResponseCode() != 0) { + setHttpResponseCode(other.getHttpResponseCode()); + } + if (!other.getErrorDescription().isEmpty()) { + errorDescription_ = other.errorDescription_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasError()) { + mergeError(other.getError()); + } + 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: + { + resourceAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + httpResponseCode_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + errorDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getErrorFieldBuilder().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 java.lang.Object resourceAddress_ = ""; + /** + * + * + *
+     * Address of the resource associated with the error,
+     * e.g. `google_compute_network.vpc_network`.
+     * 
+ * + * string resource_address = 1; + * + * @return The resourceAddress. + */ + public java.lang.String getResourceAddress() { + java.lang.Object ref = resourceAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Address of the resource associated with the error,
+     * e.g. `google_compute_network.vpc_network`.
+     * 
+ * + * string resource_address = 1; + * + * @return The bytes for resourceAddress. + */ + public com.google.protobuf.ByteString getResourceAddressBytes() { + java.lang.Object ref = resourceAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Address of the resource associated with the error,
+     * e.g. `google_compute_network.vpc_network`.
+     * 
+ * + * string resource_address = 1; + * + * @param value The resourceAddress to set. + * @return This builder for chaining. + */ + public Builder setResourceAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Address of the resource associated with the error,
+     * e.g. `google_compute_network.vpc_network`.
+     * 
+ * + * string resource_address = 1; + * + * @return This builder for chaining. + */ + public Builder clearResourceAddress() { + resourceAddress_ = getDefaultInstance().getResourceAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Address of the resource associated with the error,
+     * e.g. `google_compute_network.vpc_network`.
+     * 
+ * + * string resource_address = 1; + * + * @param value The bytes for resourceAddress to set. + * @return This builder for chaining. + */ + public Builder setResourceAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int httpResponseCode_; + /** + * + * + *
+     * HTTP response code returned from Google Cloud Platform APIs when Terraform
+     * fails to provision the resource. If unset or 0, no HTTP response code was
+     * returned by Terraform.
+     * 
+ * + * int32 http_response_code = 2; + * + * @return The httpResponseCode. + */ + @java.lang.Override + public int getHttpResponseCode() { + return httpResponseCode_; + } + /** + * + * + *
+     * HTTP response code returned from Google Cloud Platform APIs when Terraform
+     * fails to provision the resource. If unset or 0, no HTTP response code was
+     * returned by Terraform.
+     * 
+ * + * int32 http_response_code = 2; + * + * @param value The httpResponseCode to set. + * @return This builder for chaining. + */ + public Builder setHttpResponseCode(int value) { + + httpResponseCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * HTTP response code returned from Google Cloud Platform APIs when Terraform
+     * fails to provision the resource. If unset or 0, no HTTP response code was
+     * returned by Terraform.
+     * 
+ * + * int32 http_response_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearHttpResponseCode() { + bitField0_ = (bitField0_ & ~0x00000002); + httpResponseCode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object errorDescription_ = ""; + /** + * + * + *
+     * A human-readable error description.
+     * 
+ * + * string error_description = 3; + * + * @return The errorDescription. + */ + public java.lang.String getErrorDescription() { + java.lang.Object ref = errorDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A human-readable error description.
+     * 
+ * + * string error_description = 3; + * + * @return The bytes for errorDescription. + */ + public com.google.protobuf.ByteString getErrorDescriptionBytes() { + java.lang.Object ref = errorDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A human-readable error description.
+     * 
+ * + * string error_description = 3; + * + * @param value The errorDescription to set. + * @return This builder for chaining. + */ + public Builder setErrorDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + errorDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable error description.
+     * 
+ * + * string error_description = 3; + * + * @return This builder for chaining. + */ + public Builder clearErrorDescription() { + errorDescription_ = getDefaultInstance().getErrorDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A human-readable error description.
+     * 
+ * + * string error_description = 3; + * + * @param value The bytes for errorDescription to set. + * @return This builder for chaining. + */ + public Builder setErrorDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + errorDescription_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Original error response from underlying Google API, if available.
+     * 
+ * + * .google.rpc.Status error = 4; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Original error response from underlying Google API, if available.
+     * 
+ * + * .google.rpc.Status error = 4; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Original error response from underlying Google API, if available.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Original error response from underlying Google API, if available.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Original error response from underlying Google API, if available.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Original error response from underlying Google API, if available.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000008); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Original error response from underlying Google API, if available.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Original error response from underlying Google API, if available.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Original error response from underlying Google API, if available.
+     * 
+ * + * .google.rpc.Status error = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.TerraformError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.TerraformError) + private static final com.google.cloud.config.v1.TerraformError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.TerraformError(); + } + + public static com.google.cloud.config.v1.TerraformError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TerraformError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformErrorOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformErrorOrBuilder.java new file mode 100644 index 000000000000..35ab4fa24907 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformErrorOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface TerraformErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.TerraformError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Address of the resource associated with the error,
+   * e.g. `google_compute_network.vpc_network`.
+   * 
+ * + * string resource_address = 1; + * + * @return The resourceAddress. + */ + java.lang.String getResourceAddress(); + /** + * + * + *
+   * Address of the resource associated with the error,
+   * e.g. `google_compute_network.vpc_network`.
+   * 
+ * + * string resource_address = 1; + * + * @return The bytes for resourceAddress. + */ + com.google.protobuf.ByteString getResourceAddressBytes(); + + /** + * + * + *
+   * HTTP response code returned from Google Cloud Platform APIs when Terraform
+   * fails to provision the resource. If unset or 0, no HTTP response code was
+   * returned by Terraform.
+   * 
+ * + * int32 http_response_code = 2; + * + * @return The httpResponseCode. + */ + int getHttpResponseCode(); + + /** + * + * + *
+   * A human-readable error description.
+   * 
+ * + * string error_description = 3; + * + * @return The errorDescription. + */ + java.lang.String getErrorDescription(); + /** + * + * + *
+   * A human-readable error description.
+   * 
+ * + * string error_description = 3; + * + * @return The bytes for errorDescription. + */ + com.google.protobuf.ByteString getErrorDescriptionBytes(); + + /** + * + * + *
+   * Original error response from underlying Google API, if available.
+   * 
+ * + * .google.rpc.Status error = 4; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Original error response from underlying Google API, if available.
+   * 
+ * + * .google.rpc.Status error = 4; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Original error response from underlying Google API, if available.
+   * 
+ * + * .google.rpc.Status error = 4; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformOutput.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformOutput.java new file mode 100644 index 000000000000..44f2e49630df --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformOutput.java @@ -0,0 +1,792 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * Describes a Terraform output.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.TerraformOutput} + */ +public final class TerraformOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.TerraformOutput) + TerraformOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use TerraformOutput.newBuilder() to construct. + private TerraformOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TerraformOutput() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TerraformOutput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.TerraformOutput.class, + com.google.cloud.config.v1.TerraformOutput.Builder.class); + } + + public static final int SENSITIVE_FIELD_NUMBER = 1; + private boolean sensitive_ = false; + /** + * + * + *
+   * Identifies whether Terraform has set this output as a potential
+   * sensitive value.
+   * 
+ * + * bool sensitive = 1; + * + * @return The sensitive. + */ + @java.lang.Override + public boolean getSensitive() { + return sensitive_; + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.Value value_; + /** + * + * + *
+   * Value of output.
+   * 
+ * + * .google.protobuf.Value value = 2; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return value_ != null; + } + /** + * + * + *
+   * Value of output.
+   * 
+ * + * .google.protobuf.Value value = 2; + * + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.Value getValue() { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } + /** + * + * + *
+   * Value of output.
+   * 
+ * + * .google.protobuf.Value value = 2; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } + + 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 (sensitive_ != false) { + output.writeBool(1, sensitive_); + } + if (value_ != null) { + output.writeMessage(2, getValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sensitive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, sensitive_); + } + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.TerraformOutput)) { + return super.equals(obj); + } + com.google.cloud.config.v1.TerraformOutput other = + (com.google.cloud.config.v1.TerraformOutput) obj; + + if (getSensitive() != other.getSensitive()) return false; + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue().equals(other.getValue())) 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) + SENSITIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSensitive()); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.TerraformOutput parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformOutput parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformOutput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformOutput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformOutput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformOutput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformOutput parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformOutput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformOutput parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformOutput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformOutput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.TerraformOutput 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 a Terraform output.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.TerraformOutput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.TerraformOutput) + com.google.cloud.config.v1.TerraformOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.TerraformOutput.class, + com.google.cloud.config.v1.TerraformOutput.Builder.class); + } + + // Construct using com.google.cloud.config.v1.TerraformOutput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sensitive_ = false; + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformOutput getDefaultInstanceForType() { + return com.google.cloud.config.v1.TerraformOutput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformOutput build() { + com.google.cloud.config.v1.TerraformOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformOutput buildPartial() { + com.google.cloud.config.v1.TerraformOutput result = + new com.google.cloud.config.v1.TerraformOutput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.TerraformOutput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sensitive_ = sensitive_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = valueBuilder_ == null ? value_ : valueBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.TerraformOutput) { + return mergeFrom((com.google.cloud.config.v1.TerraformOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.TerraformOutput other) { + if (other == com.google.cloud.config.v1.TerraformOutput.getDefaultInstance()) return this; + if (other.getSensitive() != false) { + setSensitive(other.getSensitive()); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + 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: + { + sensitive_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getValueFieldBuilder().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 boolean sensitive_; + /** + * + * + *
+     * Identifies whether Terraform has set this output as a potential
+     * sensitive value.
+     * 
+ * + * bool sensitive = 1; + * + * @return The sensitive. + */ + @java.lang.Override + public boolean getSensitive() { + return sensitive_; + } + /** + * + * + *
+     * Identifies whether Terraform has set this output as a potential
+     * sensitive value.
+     * 
+ * + * bool sensitive = 1; + * + * @param value The sensitive to set. + * @return This builder for chaining. + */ + public Builder setSensitive(boolean value) { + + sensitive_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifies whether Terraform has set this output as a potential
+     * sensitive value.
+     * 
+ * + * bool sensitive = 1; + * + * @return This builder for chaining. + */ + public Builder clearSensitive() { + bitField0_ = (bitField0_ & ~0x00000001); + sensitive_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + valueBuilder_; + /** + * + * + *
+     * Value of output.
+     * 
+ * + * .google.protobuf.Value value = 2; + * + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Value of output.
+     * 
+ * + * .google.protobuf.Value value = 2; + * + * @return The value. + */ + public com.google.protobuf.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Value of output.
+     * 
+ * + * .google.protobuf.Value value = 2; + */ + public Builder setValue(com.google.protobuf.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + } else { + valueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of output.
+     * 
+ * + * .google.protobuf.Value value = 2; + */ + public Builder setValue(com.google.protobuf.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of output.
+     * 
+ * + * .google.protobuf.Value value = 2; + */ + public Builder mergeValue(com.google.protobuf.Value value) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && value_ != null + && value_ != com.google.protobuf.Value.getDefaultInstance()) { + getValueBuilder().mergeFrom(value); + } else { + value_ = value; + } + } else { + valueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of output.
+     * 
+ * + * .google.protobuf.Value value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Value of output.
+     * 
+ * + * .google.protobuf.Value value = 2; + */ + public com.google.protobuf.Value.Builder getValueBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Value of output.
+     * 
+ * + * .google.protobuf.Value value = 2; + */ + public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } + } + /** + * + * + *
+     * Value of output.
+     * 
+ * + * .google.protobuf.Value value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>(getValue(), getParentForChildren(), isClean()); + value_ = null; + } + return valueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.TerraformOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.TerraformOutput) + private static final com.google.cloud.config.v1.TerraformOutput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.TerraformOutput(); + } + + public static com.google.cloud.config.v1.TerraformOutput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TerraformOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformOutput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformOutputOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformOutputOrBuilder.java new file mode 100644 index 000000000000..636bb5b5797c --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformOutputOrBuilder.java @@ -0,0 +1,74 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface TerraformOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.TerraformOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifies whether Terraform has set this output as a potential
+   * sensitive value.
+   * 
+ * + * bool sensitive = 1; + * + * @return The sensitive. + */ + boolean getSensitive(); + + /** + * + * + *
+   * Value of output.
+   * 
+ * + * .google.protobuf.Value value = 2; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+   * Value of output.
+   * 
+ * + * .google.protobuf.Value value = 2; + * + * @return The value. + */ + com.google.protobuf.Value getValue(); + /** + * + * + *
+   * Value of output.
+   * 
+ * + * .google.protobuf.Value value = 2; + */ + com.google.protobuf.ValueOrBuilder getValueOrBuilder(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformVariable.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformVariable.java new file mode 100644 index 000000000000..093e64221bcf --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformVariable.java @@ -0,0 +1,696 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A Terraform input variable.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.TerraformVariable} + */ +public final class TerraformVariable extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.TerraformVariable) + TerraformVariableOrBuilder { + private static final long serialVersionUID = 0L; + // Use TerraformVariable.newBuilder() to construct. + private TerraformVariable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TerraformVariable() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TerraformVariable(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformVariable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformVariable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.TerraformVariable.class, + com.google.cloud.config.v1.TerraformVariable.Builder.class); + } + + public static final int INPUT_VALUE_FIELD_NUMBER = 5; + private com.google.protobuf.Value inputValue_; + /** + * + * + *
+   * Input variable value.
+   * 
+ * + * .google.protobuf.Value input_value = 5; + * + * @return Whether the inputValue field is set. + */ + @java.lang.Override + public boolean hasInputValue() { + return inputValue_ != null; + } + /** + * + * + *
+   * Input variable value.
+   * 
+ * + * .google.protobuf.Value input_value = 5; + * + * @return The inputValue. + */ + @java.lang.Override + public com.google.protobuf.Value getInputValue() { + return inputValue_ == null ? com.google.protobuf.Value.getDefaultInstance() : inputValue_; + } + /** + * + * + *
+   * Input variable value.
+   * 
+ * + * .google.protobuf.Value input_value = 5; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getInputValueOrBuilder() { + return inputValue_ == null ? com.google.protobuf.Value.getDefaultInstance() : inputValue_; + } + + 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 (inputValue_ != null) { + output.writeMessage(5, getInputValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInputValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.TerraformVariable)) { + return super.equals(obj); + } + com.google.cloud.config.v1.TerraformVariable other = + (com.google.cloud.config.v1.TerraformVariable) obj; + + if (hasInputValue() != other.hasInputValue()) return false; + if (hasInputValue()) { + if (!getInputValue().equals(other.getInputValue())) 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 (hasInputValue()) { + hash = (37 * hash) + INPUT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getInputValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.TerraformVariable parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformVariable parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformVariable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformVariable parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformVariable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.TerraformVariable parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformVariable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformVariable parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformVariable parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformVariable parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.TerraformVariable parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.TerraformVariable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.TerraformVariable 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 Terraform input variable.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.TerraformVariable} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.TerraformVariable) + com.google.cloud.config.v1.TerraformVariableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformVariable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformVariable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.TerraformVariable.class, + com.google.cloud.config.v1.TerraformVariable.Builder.class); + } + + // Construct using com.google.cloud.config.v1.TerraformVariable.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inputValue_ = null; + if (inputValueBuilder_ != null) { + inputValueBuilder_.dispose(); + inputValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_TerraformVariable_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformVariable getDefaultInstanceForType() { + return com.google.cloud.config.v1.TerraformVariable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformVariable build() { + com.google.cloud.config.v1.TerraformVariable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformVariable buildPartial() { + com.google.cloud.config.v1.TerraformVariable result = + new com.google.cloud.config.v1.TerraformVariable(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.TerraformVariable result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.inputValue_ = inputValueBuilder_ == null ? inputValue_ : inputValueBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.TerraformVariable) { + return mergeFrom((com.google.cloud.config.v1.TerraformVariable) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.TerraformVariable other) { + if (other == com.google.cloud.config.v1.TerraformVariable.getDefaultInstance()) return this; + if (other.hasInputValue()) { + mergeInputValue(other.getInputValue()); + } + 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 42: + { + input.readMessage(getInputValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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 com.google.protobuf.Value inputValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + inputValueBuilder_; + /** + * + * + *
+     * Input variable value.
+     * 
+ * + * .google.protobuf.Value input_value = 5; + * + * @return Whether the inputValue field is set. + */ + public boolean hasInputValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Input variable value.
+     * 
+ * + * .google.protobuf.Value input_value = 5; + * + * @return The inputValue. + */ + public com.google.protobuf.Value getInputValue() { + if (inputValueBuilder_ == null) { + return inputValue_ == null ? com.google.protobuf.Value.getDefaultInstance() : inputValue_; + } else { + return inputValueBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input variable value.
+     * 
+ * + * .google.protobuf.Value input_value = 5; + */ + public Builder setInputValue(com.google.protobuf.Value value) { + if (inputValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputValue_ = value; + } else { + inputValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Input variable value.
+     * 
+ * + * .google.protobuf.Value input_value = 5; + */ + public Builder setInputValue(com.google.protobuf.Value.Builder builderForValue) { + if (inputValueBuilder_ == null) { + inputValue_ = builderForValue.build(); + } else { + inputValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Input variable value.
+     * 
+ * + * .google.protobuf.Value input_value = 5; + */ + public Builder mergeInputValue(com.google.protobuf.Value value) { + if (inputValueBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && inputValue_ != null + && inputValue_ != com.google.protobuf.Value.getDefaultInstance()) { + getInputValueBuilder().mergeFrom(value); + } else { + inputValue_ = value; + } + } else { + inputValueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Input variable value.
+     * 
+ * + * .google.protobuf.Value input_value = 5; + */ + public Builder clearInputValue() { + bitField0_ = (bitField0_ & ~0x00000001); + inputValue_ = null; + if (inputValueBuilder_ != null) { + inputValueBuilder_.dispose(); + inputValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input variable value.
+     * 
+ * + * .google.protobuf.Value input_value = 5; + */ + public com.google.protobuf.Value.Builder getInputValueBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInputValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input variable value.
+     * 
+ * + * .google.protobuf.Value input_value = 5; + */ + public com.google.protobuf.ValueOrBuilder getInputValueOrBuilder() { + if (inputValueBuilder_ != null) { + return inputValueBuilder_.getMessageOrBuilder(); + } else { + return inputValue_ == null ? com.google.protobuf.Value.getDefaultInstance() : inputValue_; + } + } + /** + * + * + *
+     * Input variable value.
+     * 
+ * + * .google.protobuf.Value input_value = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getInputValueFieldBuilder() { + if (inputValueBuilder_ == null) { + inputValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>( + getInputValue(), getParentForChildren(), isClean()); + inputValue_ = null; + } + return inputValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.TerraformVariable) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.TerraformVariable) + private static final com.google.cloud.config.v1.TerraformVariable DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.TerraformVariable(); + } + + public static com.google.cloud.config.v1.TerraformVariable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TerraformVariable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.TerraformVariable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformVariableOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformVariableOrBuilder.java new file mode 100644 index 000000000000..9bcafcd57e76 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformVariableOrBuilder.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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface TerraformVariableOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.TerraformVariable) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Input variable value.
+   * 
+ * + * .google.protobuf.Value input_value = 5; + * + * @return Whether the inputValue field is set. + */ + boolean hasInputValue(); + /** + * + * + *
+   * Input variable value.
+   * 
+ * + * .google.protobuf.Value input_value = 5; + * + * @return The inputValue. + */ + com.google.protobuf.Value getInputValue(); + /** + * + * + *
+   * Input variable value.
+   * 
+ * + * .google.protobuf.Value input_value = 5; + */ + com.google.protobuf.ValueOrBuilder getInputValueOrBuilder(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UnlockDeploymentRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UnlockDeploymentRequest.java new file mode 100644 index 000000000000..d2ecf68fe712 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UnlockDeploymentRequest.java @@ -0,0 +1,738 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** + * + * + *
+ * A request to unlock a state file passed to a 'UnlockDeployment' call.
+ * 
+ * + * Protobuf type {@code google.cloud.config.v1.UnlockDeploymentRequest} + */ +public final class UnlockDeploymentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.UnlockDeploymentRequest) + UnlockDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UnlockDeploymentRequest.newBuilder() to construct. + private UnlockDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UnlockDeploymentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UnlockDeploymentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_UnlockDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_UnlockDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.UnlockDeploymentRequest.class, + com.google.cloud.config.v1.UnlockDeploymentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCK_ID_FIELD_NUMBER = 2; + private long lockId_ = 0L; + /** + * + * + *
+   * Required. Lock ID of the lock file to be unlocked.
+   * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockId. + */ + @java.lang.Override + public long getLockId() { + return lockId_; + } + + 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 (lockId_ != 0L) { + output.writeInt64(2, lockId_); + } + 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 (lockId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, lockId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.UnlockDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.UnlockDeploymentRequest other = + (com.google.cloud.config.v1.UnlockDeploymentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getLockId() != other.getLockId()) 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) + LOCK_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLockId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.UnlockDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request to unlock a state file passed to a 'UnlockDeployment' call.
+   * 
+ * + * Protobuf type {@code google.cloud.config.v1.UnlockDeploymentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.UnlockDeploymentRequest) + com.google.cloud.config.v1.UnlockDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_UnlockDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_UnlockDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.UnlockDeploymentRequest.class, + com.google.cloud.config.v1.UnlockDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.UnlockDeploymentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + lockId_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_UnlockDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.UnlockDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.UnlockDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.UnlockDeploymentRequest build() { + com.google.cloud.config.v1.UnlockDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.UnlockDeploymentRequest buildPartial() { + com.google.cloud.config.v1.UnlockDeploymentRequest result = + new com.google.cloud.config.v1.UnlockDeploymentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.UnlockDeploymentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lockId_ = lockId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.UnlockDeploymentRequest) { + return mergeFrom((com.google.cloud.config.v1.UnlockDeploymentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.UnlockDeploymentRequest other) { + if (other == com.google.cloud.config.v1.UnlockDeploymentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getLockId() != 0L) { + setLockId(other.getLockId()); + } + 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: + { + lockId_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the deployment in the format:
+     * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long lockId_; + /** + * + * + *
+     * Required. Lock ID of the lock file to be unlocked.
+     * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockId. + */ + @java.lang.Override + public long getLockId() { + return lockId_; + } + /** + * + * + *
+     * Required. Lock ID of the lock file to be unlocked.
+     * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The lockId to set. + * @return This builder for chaining. + */ + public Builder setLockId(long value) { + + lockId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Lock ID of the lock file to be unlocked.
+     * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLockId() { + bitField0_ = (bitField0_ & ~0x00000002); + lockId_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.UnlockDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.UnlockDeploymentRequest) + private static final com.google.cloud.config.v1.UnlockDeploymentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.UnlockDeploymentRequest(); + } + + public static com.google.cloud.config.v1.UnlockDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UnlockDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.UnlockDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UnlockDeploymentRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UnlockDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..73d27dcfa11f --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UnlockDeploymentRequestOrBuilder.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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface UnlockDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.UnlockDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the deployment in the format:
+   * 'projects/{project_id}/locations/{location}/deployments/{deployment}'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Lock ID of the lock file to be unlocked.
+   * 
+ * + * int64 lock_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockId. + */ + long getLockId(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UpdateDeploymentRequest.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UpdateDeploymentRequest.java new file mode 100644 index 000000000000..61f5d01b014f --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UpdateDeploymentRequest.java @@ -0,0 +1,1360 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +/** Protobuf type {@code google.cloud.config.v1.UpdateDeploymentRequest} */ +public final class UpdateDeploymentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.config.v1.UpdateDeploymentRequest) + UpdateDeploymentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDeploymentRequest.newBuilder() to construct. + private UpdateDeploymentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDeploymentRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDeploymentRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_UpdateDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_UpdateDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.UpdateDeploymentRequest.class, + com.google.cloud.config.v1.UpdateDeploymentRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Optional. Field mask used to specify the fields to be overwritten in the
+   * Deployment resource by the update.
+   *
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Optional. Field mask used to specify the fields to be overwritten in the
+   * Deployment resource by the update.
+   *
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Optional. Field mask used to specify the fields to be overwritten in the
+   * Deployment resource by the update.
+   *
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int DEPLOYMENT_FIELD_NUMBER = 2; + private com.google.cloud.config.v1.Deployment deployment_; + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+   *
+   * The deployment's `name` field is used to identify the resource to be
+   * updated. Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}`
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployment field is set. + */ + @java.lang.Override + public boolean hasDeployment() { + return deployment_ != null; + } + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+   *
+   * The deployment's `name` field is used to identify the resource to be
+   * updated. Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}`
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployment. + */ + @java.lang.Override + public com.google.cloud.config.v1.Deployment getDeployment() { + return deployment_ == null + ? com.google.cloud.config.v1.Deployment.getDefaultInstance() + : deployment_; + } + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+   *
+   * The deployment's `name` field is used to identify the resource to be
+   * updated. Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}`
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.config.v1.DeploymentOrBuilder getDeploymentOrBuilder() { + return deployment_ == null + ? com.google.cloud.config.v1.Deployment.getDefaultInstance() + : deployment_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (deployment_ != null) { + output.writeMessage(2, getDeployment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (deployment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeployment()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.config.v1.UpdateDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.config.v1.UpdateDeploymentRequest other = + (com.google.cloud.config.v1.UpdateDeploymentRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasDeployment() != other.hasDeployment()) return false; + if (hasDeployment()) { + if (!getDeployment().equals(other.getDeployment())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasDeployment()) { + hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getDeployment().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.config.v1.UpdateDeploymentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.config.v1.UpdateDeploymentRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.config.v1.UpdateDeploymentRequest) + com.google.cloud.config.v1.UpdateDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_UpdateDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_UpdateDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.config.v1.UpdateDeploymentRequest.class, + com.google.cloud.config.v1.UpdateDeploymentRequest.Builder.class); + } + + // Construct using com.google.cloud.config.v1.UpdateDeploymentRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + deployment_ = null; + if (deploymentBuilder_ != null) { + deploymentBuilder_.dispose(); + deploymentBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.config.v1.ConfigProto + .internal_static_google_cloud_config_v1_UpdateDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.config.v1.UpdateDeploymentRequest getDefaultInstanceForType() { + return com.google.cloud.config.v1.UpdateDeploymentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.config.v1.UpdateDeploymentRequest build() { + com.google.cloud.config.v1.UpdateDeploymentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.config.v1.UpdateDeploymentRequest buildPartial() { + com.google.cloud.config.v1.UpdateDeploymentRequest result = + new com.google.cloud.config.v1.UpdateDeploymentRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.config.v1.UpdateDeploymentRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deployment_ = deploymentBuilder_ == null ? deployment_ : deploymentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.config.v1.UpdateDeploymentRequest) { + return mergeFrom((com.google.cloud.config.v1.UpdateDeploymentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.config.v1.UpdateDeploymentRequest other) { + if (other == com.google.cloud.config.v1.UpdateDeploymentRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasDeployment()) { + mergeDeployment(other.getDeployment()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getDeploymentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Optional. Field mask used to specify the fields to be overwritten in the
+     * Deployment resource by the update.
+     *
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. Field mask used to specify the fields to be overwritten in the
+     * Deployment resource by the update.
+     *
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Field mask used to specify the fields to be overwritten in the
+     * Deployment resource by the update.
+     *
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field mask used to specify the fields to be overwritten in the
+     * Deployment resource by the update.
+     *
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field mask used to specify the fields to be overwritten in the
+     * Deployment resource by the update.
+     *
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field mask used to specify the fields to be overwritten in the
+     * Deployment resource by the update.
+     *
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field mask used to specify the fields to be overwritten in the
+     * Deployment resource by the update.
+     *
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Field mask used to specify the fields to be overwritten in the
+     * Deployment resource by the update.
+     *
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Optional. Field mask used to specify the fields to be overwritten in the
+     * Deployment resource by the update.
+     *
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.config.v1.Deployment deployment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.Deployment, + com.google.cloud.config.v1.Deployment.Builder, + com.google.cloud.config.v1.DeploymentOrBuilder> + deploymentBuilder_; + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+     *
+     * The deployment's `name` field is used to identify the resource to be
+     * updated. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployment field is set. + */ + public boolean hasDeployment() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+     *
+     * The deployment's `name` field is used to identify the resource to be
+     * updated. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployment. + */ + public com.google.cloud.config.v1.Deployment getDeployment() { + if (deploymentBuilder_ == null) { + return deployment_ == null + ? com.google.cloud.config.v1.Deployment.getDefaultInstance() + : deployment_; + } else { + return deploymentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+     *
+     * The deployment's `name` field is used to identify the resource to be
+     * updated. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeployment(com.google.cloud.config.v1.Deployment value) { + if (deploymentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployment_ = value; + } else { + deploymentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+     *
+     * The deployment's `name` field is used to identify the resource to be
+     * updated. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeployment(com.google.cloud.config.v1.Deployment.Builder builderForValue) { + if (deploymentBuilder_ == null) { + deployment_ = builderForValue.build(); + } else { + deploymentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+     *
+     * The deployment's `name` field is used to identify the resource to be
+     * updated. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDeployment(com.google.cloud.config.v1.Deployment value) { + if (deploymentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && deployment_ != null + && deployment_ != com.google.cloud.config.v1.Deployment.getDefaultInstance()) { + getDeploymentBuilder().mergeFrom(value); + } else { + deployment_ = value; + } + } else { + deploymentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+     *
+     * The deployment's `name` field is used to identify the resource to be
+     * updated. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDeployment() { + bitField0_ = (bitField0_ & ~0x00000002); + deployment_ = null; + if (deploymentBuilder_ != null) { + deploymentBuilder_.dispose(); + deploymentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+     *
+     * The deployment's `name` field is used to identify the resource to be
+     * updated. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.config.v1.Deployment.Builder getDeploymentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDeploymentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+     *
+     * The deployment's `name` field is used to identify the resource to be
+     * updated. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.config.v1.DeploymentOrBuilder getDeploymentOrBuilder() { + if (deploymentBuilder_ != null) { + return deploymentBuilder_.getMessageOrBuilder(); + } else { + return deployment_ == null + ? com.google.cloud.config.v1.Deployment.getDefaultInstance() + : deployment_; + } + } + /** + * + * + *
+     * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+     *
+     * The deployment's `name` field is used to identify the resource to be
+     * updated. Format:
+     * `projects/{project}/locations/{location}/deployments/{deployment}`
+     * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.Deployment, + com.google.cloud.config.v1.Deployment.Builder, + com.google.cloud.config.v1.DeploymentOrBuilder> + getDeploymentFieldBuilder() { + if (deploymentBuilder_ == null) { + deploymentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.config.v1.Deployment, + com.google.cloud.config.v1.Deployment.Builder, + com.google.cloud.config.v1.DeploymentOrBuilder>( + getDeployment(), getParentForChildren(), isClean()); + deployment_ = null; + } + return deploymentBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.config.v1.UpdateDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.config.v1.UpdateDeploymentRequest) + private static final com.google.cloud.config.v1.UpdateDeploymentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.config.v1.UpdateDeploymentRequest(); + } + + public static com.google.cloud.config.v1.UpdateDeploymentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDeploymentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.config.v1.UpdateDeploymentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UpdateDeploymentRequestOrBuilder.java b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UpdateDeploymentRequestOrBuilder.java new file mode 100644 index 000000000000..e967e2c8eab5 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/UpdateDeploymentRequestOrBuilder.java @@ -0,0 +1,180 @@ +/* + * 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/cloud/config/v1/config.proto + +package com.google.cloud.config.v1; + +public interface UpdateDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.config.v1.UpdateDeploymentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask used to specify the fields to be overwritten in the
+   * Deployment resource by the update.
+   *
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. Field mask used to specify the fields to be overwritten in the
+   * Deployment resource by the update.
+   *
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. Field mask used to specify the fields to be overwritten in the
+   * Deployment resource by the update.
+   *
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+   *
+   * The deployment's `name` field is used to identify the resource to be
+   * updated. Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}`
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployment field is set. + */ + boolean hasDeployment(); + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+   *
+   * The deployment's `name` field is used to identify the resource to be
+   * updated. Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}`
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployment. + */ + com.google.cloud.config.v1.Deployment getDeployment(); + /** + * + * + *
+   * Required. [Deployment][google.cloud.config.v1.Deployment] to update.
+   *
+   * The deployment's `name` field is used to identify the resource to be
+   * updated. Format:
+   * `projects/{project}/locations/{location}/deployments/{deployment}`
+   * 
+ * + * + * .google.cloud.config.v1.Deployment deployment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.config.v1.DeploymentOrBuilder getDeploymentOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/proto/google/cloud/config/v1/config.proto b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/proto/google/cloud/config/v1/config.proto new file mode 100644 index 000000000000..74b560030284 --- /dev/null +++ b/java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/proto/google/cloud/config/v1/config.proto @@ -0,0 +1,1265 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.config.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.Config.V1"; +option go_package = "cloud.google.com/go/config/apiv1/configpb;configpb"; +option java_multiple_files = true; +option java_outer_classname = "ConfigProto"; +option java_package = "com.google.cloud.config.v1"; +option php_namespace = "Google\\Cloud\\Config\\V1"; +option ruby_package = "Google::Cloud::Config::V1"; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/ServiceAccount" + pattern: "projects/{project}/serviceAccounts/{service_account}" +}; +option (google.api.resource_definition) = { + type: "cloudbuild.googleapis.com/WorkerPool" + pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}" +}; + +// Infrastructure Manager is a managed service that automates the deployment and +// management of Google Cloud infrastructure resources. +service Config { + option (google.api.default_host) = "config.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists [Deployment][google.cloud.config.v1.Deployment]s in a given project + // and location. + rpc ListDeployments(ListDeploymentsRequest) + returns (ListDeploymentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/deployments" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a [Deployment][google.cloud.config.v1.Deployment]. + rpc GetDeployment(GetDeploymentRequest) returns (Deployment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deployments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a [Deployment][google.cloud.config.v1.Deployment]. + rpc CreateDeployment(CreateDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/deployments" + body: "deployment" + }; + option (google.api.method_signature) = "parent,deployment,deployment_id"; + option (google.longrunning.operation_info) = { + response_type: "Deployment" + metadata_type: "OperationMetadata" + }; + } + + // Updates a [Deployment][google.cloud.config.v1.Deployment]. + rpc UpdateDeployment(UpdateDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{deployment.name=projects/*/locations/*/deployments/*}" + body: "deployment" + }; + option (google.api.method_signature) = "deployment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Deployment" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a [Deployment][google.cloud.config.v1.Deployment]. + rpc DeleteDeployment(DeleteDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/deployments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Deployment" + metadata_type: "OperationMetadata" + }; + } + + // Lists [Revision][google.cloud.config.v1.Revision]s of a deployment. + rpc ListRevisions(ListRevisionsRequest) returns (ListRevisionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deployments/*}/revisions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a [Revision][google.cloud.config.v1.Revision]. + rpc GetRevision(GetRevisionRequest) returns (Revision) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deployments/*/revisions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets details about a [Resource][google.cloud.config.v1.Resource] deployed + // by Infra Manager. + rpc GetResource(GetResourceRequest) returns (Resource) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deployments/*/revisions/*/resources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [Resource][google.cloud.config.v1.Resource]s in a given revision. + rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}/resources" + }; + option (google.api.method_signature) = "parent"; + } + + // Exports Terraform state file from a given deployment. + rpc ExportDeploymentStatefile(ExportDeploymentStatefileRequest) + returns (Statefile) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deployments/*}:exportState" + body: "*" + }; + } + + // Exports Terraform state file from a given revision. + rpc ExportRevisionStatefile(ExportRevisionStatefileRequest) + returns (Statefile) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deployments/*/revisions/*}:exportState" + body: "*" + }; + } + + // Imports Terraform state file in a given deployment. The state file does not + // take effect until the Deployment has been unlocked. + rpc ImportStatefile(ImportStatefileRequest) returns (Statefile) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deployments/*}:importState" + body: "*" + }; + option (google.api.method_signature) = "parent,lock_id"; + } + + // Deletes Terraform state file in a given deployment. + rpc DeleteStatefile(DeleteStatefileRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deployments/*}:deleteState" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Locks a deployment. + rpc LockDeployment(LockDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deployments/*}:lock" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Deployment" + metadata_type: "OperationMetadata" + }; + } + + // Unlocks a locked deployment. + rpc UnlockDeployment(UnlockDeploymentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deployments/*}:unlock" + body: "*" + }; + option (google.api.method_signature) = "name,lock_id"; + option (google.longrunning.operation_info) = { + response_type: "Deployment" + metadata_type: "OperationMetadata" + }; + } + + // Exports the lock info on a locked deployment. + rpc ExportLockInfo(ExportLockInfoRequest) returns (LockInfo) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deployments/*}:exportLock" + }; + option (google.api.method_signature) = "name"; + } +} + +// A Deployment is a group of resources and configs managed and provisioned by +// Infra Manager. +message Deployment { + option (google.api.resource) = { + type: "config.googleapis.com/Deployment" + pattern: "projects/{project}/locations/{location}/deployments/{deployment}" + }; + + // Possible states of a deployment. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // The deployment is being created. + CREATING = 1; + + // The deployment is healthy. + ACTIVE = 2; + + // The deployment is being updated. + UPDATING = 3; + + // The deployment is being deleted. + DELETING = 4; + + // The deployment has encountered an unexpected error. + FAILED = 5; + + // The deployment is no longer being actively reconciled. + // This may be the result of recovering the project after deletion. + SUSPENDED = 6; + + // The deployment has been deleted. + DELETED = 7; + } + + // Possible errors that can occur with deployments. + enum ErrorCode { + // No error code was specified. + ERROR_CODE_UNSPECIFIED = 0; + + // The revision failed. See Revision for more details. + REVISION_FAILED = 1; + + // Cloud Build failed due to a permission issue. + CLOUD_BUILD_PERMISSION_DENIED = 3; + + // Cloud Build job associated with a deployment deletion could not be + // started. + DELETE_BUILD_API_FAILED = 5; + + // Cloud Build job associated with a deployment deletion was started but + // failed. + DELETE_BUILD_RUN_FAILED = 6; + + // Cloud Storage bucket creation failed due to a permission issue. + BUCKET_CREATION_PERMISSION_DENIED = 7; + + // Cloud Storage bucket creation failed due to an issue unrelated to + // permissions. + BUCKET_CREATION_FAILED = 8; + } + + // Possible lock states of a deployment. + enum LockState { + // The default value. This value is used if the lock state is omitted. + LOCK_STATE_UNSPECIFIED = 0; + + // The deployment is locked. + LOCKED = 1; + + // The deployment is unlocked. + UNLOCKED = 2; + + // The deployment is being locked. + LOCKING = 3; + + // The deployment is being unlocked. + UNLOCKING = 4; + + // The deployment has failed to lock. + LOCK_FAILED = 5; + + // The deployment has failed to unlock. + UNLOCK_FAILED = 6; + } + + // Blueprint to deploy. + oneof blueprint { + // A blueprint described using Terraform's HashiCorp Configuration Language + // as a root module. + TerraformBlueprint terraform_blueprint = 6; + } + + // Resource name of the deployment. + // Format: `projects/{project}/locations/{location}/deployments/{deployment}` + string name = 1; + + // Output only. Time when the deployment was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the deployment was last modified. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined metadata for the deployment. + map labels = 4; + + // Output only. Current state of the deployment. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Revision name that was most recently applied. + // Format: `projects/{project}/locations/{location}/deployments/{deployment}/ + // revisions/{revision}` + string latest_revision = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information regarding the current state. + string state_detail = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Error code describing errors that may have occurred. + ErrorCode error_code = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of artifacts from a DeleteDeployment operation. + ApplyResults delete_results = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud Build instance UUID associated with deleting this + // deployment. + string delete_build = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of Cloud Build logs in Google Cloud Storage, + // populated when deleting this deployment. Format: `gs://{bucket}/{object}`. + string delete_logs = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors encountered when deleting this deployment. + // Errors are truncated to 10 entries, see `delete_results` and `error_logs` + // for full details. + repeated TerraformError tf_errors = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of Terraform error logs in Google Cloud Storage. + // Format: `gs://{bucket}/{object}`. + string error_logs = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined location of Cloud Build logs and artifacts in Google + // Cloud Storage. Format: `gs://{bucket}/{folder}` + // + // A default bucket will be bootstrapped if the field is not set or empty. + // Default bucket format: `gs://--blueprint-config` + // Constraints: + // - The bucket needs to be in the same project as the deployment + // - The path cannot be within the path of `gcs_source` + // - The field cannot be updated, including changing its presence + optional string artifacts_gcs_bucket = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-specified Service Account (SA) credentials to be used when + // actuating resources. + // Format: `projects/{projectID}/serviceAccounts/{serviceAccount}` + optional string service_account = 16 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; + + // By default, Infra Manager will return a failure when + // Terraform encounters a 409 code (resource conflict error) during actuation. + // If this flag is set to true, Infra Manager will instead + // attempt to automatically import the resource into the Terraform state (for + // supported resource types) and continue actuation. + // + // Not all resource types are supported, refer to documentation. + optional bool import_existing_resources = 17; + + // Optional. The user-specified Cloud Build worker pool resource in which the + // Cloud Build job will execute. Format: + // `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. + // If this field is unspecified, the default Cloud Build worker pool will be + // used. + optional string worker_pool = 19 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; + + // Output only. Current lock state of the deployment. + LockState lock_state = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// TerraformBlueprint describes the source of a Terraform root module which +// describes the resources and configs to be deployed. +message TerraformBlueprint { + // Location of the source configs. + oneof source { + // Required. URI of an object in Google Cloud Storage. + // Format: `gs://{bucket}/{object}` + // + // URI may also specify an object version for zipped objects. + // Format: `gs://{bucket}/{object}#{version}` + string gcs_source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URI of a public Git repo. + GitSource git_source = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Input variable values for the Terraform blueprint. + map input_values = 4; +} + +// A Terraform input variable. +message TerraformVariable { + // Input variable value. + google.protobuf.Value input_value = 5; +} + +// Outputs and artifacts from applying a deployment. +message ApplyResults { + // Location of a blueprint copy and other manifests in Google Cloud Storage. + // Format: `gs://{bucket}/{object}` + string content = 1; + + // Location of artifacts (e.g. logs) in Google Cloud Storage. + // Format: `gs://{bucket}/{object}` + string artifacts = 2; + + // Map of output name to output info. + map outputs = 3; +} + +// Describes a Terraform output. +message TerraformOutput { + // Identifies whether Terraform has set this output as a potential + // sensitive value. + bool sensitive = 1; + + // Value of output. + google.protobuf.Value value = 2; +} + +message ListDeploymentsRequest { + // Required. The parent in whose context the Deployments are listed. The + // parent value is in the format: + // 'projects/{project_id}/locations/{location}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // When requesting a page of resources, 'page_size' specifies number of + // resources to return. If unspecified or set to 0, all resources will be + // returned. + int32 page_size = 2; + + // Token returned by previous call to 'ListDeployments' which specifies the + // position in the list from where to continue listing the resources. + string page_token = 3; + + // Lists the Deployments that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form '{field} {operator} {value}' where operators: '<', '>', + // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + // operator which is roughly synonymous with equality). {field} can refer to a + // proto or JSON field, or a synthetic field. Field names can be camelCase or + // snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/foo/locations/us-central1/deployments/bar + // + // - Filter by labels: + // - Resources that have a key called 'foo' + // labels.foo:* + // - Resources that have a key called 'foo' whose value is 'bar' + // labels.foo = bar + // + // - Filter by state: + // - Deployments in CREATING state. + // state=CREATING + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +message ListDeploymentsResponse { + // List of [Deployment][google.cloud.config.v1.Deployment]s. + repeated Deployment deployments = 1; + + // Token to be supplied to the next ListDeployments request via `page_token` + // to obtain the next set of results. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +message GetDeploymentRequest { + // Required. The name of the deployment. Format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; +} + +// A request to list Revisions passed to a 'ListRevisions' call. +message ListRevisionsRequest { + // Required. The parent in whose context the Revisions are listed. The parent + // value is in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // When requesting a page of resources, `page_size` specifies number of + // resources to return. If unspecified or set to 0, all resources will be + // returned. + int32 page_size = 2; + + // Token returned by previous call to 'ListRevisions' which specifies the + // position in the list from where to continue listing the resources. + string page_token = 3; + + // Lists the Revisions that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form '{field} {operator} {value}' where operators: '<', '>', + // '<=', '>=', '!=', '=', ':' are supported (colon ':' represents a HAS + // operator which is roughly synonymous with equality). {field} can refer to a + // proto or JSON field, or a synthetic field. Field names can be camelCase or + // snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/foo/locations/us-central1/deployments/dep/revisions/bar + // + // - Filter by labels: + // - Resources that have a key called 'foo' + // labels.foo:* + // - Resources that have a key called 'foo' whose value is 'bar' + // labels.foo = bar + // + // - Filter by state: + // - Revisions in CREATING state. + // state=CREATING + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +// A response to a 'ListRevisions' call. Contains a list of Revisions. +message ListRevisionsResponse { + // List of [Revision][google.cloud.config.v1.Revision]s. + repeated Revision revisions = 1; + + // A token to request the next page of resources from the 'ListRevisions' + // method. The value of an empty string means that there are no more resources + // to return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// A request to get a Revision from a 'GetRevision' call. +message GetRevisionRequest { + // Required. The name of the Revision in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } + ]; +} + +message CreateDeploymentRequest { + // Required. The parent in whose context the Deployment is created. The parent + // value is in the format: 'projects/{project_id}/locations/{location}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The Deployment ID. + string deployment_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. [Deployment][google.cloud.config.v1.Deployment] resource to be + // created. + Deployment deployment = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +message UpdateDeploymentRequest { + // Optional. Field mask used to specify the fields to be overwritten in the + // Deployment resource by the update. + // + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. [Deployment][google.cloud.config.v1.Deployment] to update. + // + // The deployment's `name` field is used to identify the resource to be + // updated. Format: + // `projects/{project}/locations/{location}/deployments/{deployment}` + Deployment deployment = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +message DeleteDeploymentRequest { + // Policy on how resources actuated by the deployment should be deleted. + enum DeletePolicy { + // Unspecified policy, resources will be deleted. + DELETE_POLICY_UNSPECIFIED = 0; + + // Deletes resources actuated by the deployment. + DELETE = 1; + + // Abandons resources and only deletes the deployment and its metadata. + ABANDON = 2; + } + + // Required. The name of the Deployment in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, any revisions for this deployment will also be + // deleted. (Otherwise, the request will only work if the deployment has no + // revisions.) + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Policy on how resources actuated by the deployment should be + // deleted. If unspecified, the default behavior is to delete the underlying + // resources. + DeletePolicy delete_policy = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Ephemeral metadata about the state of an operation for a particular + // resource. + oneof resource_metadata { + // Output only. Metadata about the deployment operation state. + DeploymentOperationMetadata deployment_metadata = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Time when the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation of the + // operation. Operations that have successfully been cancelled have + // [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A child resource of a Deployment generated by a 'CreateDeployment' or +// 'UpdateDeployment' call. Each Revision contains metadata pertaining to a +// snapshot of a particular Deployment. +message Revision { + option (google.api.resource) = { + type: "config.googleapis.com/Revision" + pattern: "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}" + }; + + // Actions that generate a revision. + enum Action { + // The default value. This value is used if the action is omitted. + ACTION_UNSPECIFIED = 0; + + // The revision was generated by creating a deployment. + CREATE = 1; + + // The revision was generated by updating a deployment. + UPDATE = 2; + + // The revision was deleted. + DELETE = 3; + } + + // Possible states of a revision. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // The revision is being applied. + APPLYING = 1; + + // The revision was applied successfully. + APPLIED = 2; + + // The revision could not be applied successfully. + FAILED = 3; + } + + // Possible errors if Revision could not be created or updated successfully. + enum ErrorCode { + // No error code was specified. + ERROR_CODE_UNSPECIFIED = 0; + + // Cloud Build failed due to a permission issue. + CLOUD_BUILD_PERMISSION_DENIED = 1; + + // Cloud Build job associated with creating or updating a deployment could + // not be started. + APPLY_BUILD_API_FAILED = 4; + + // Cloud Build job associated with creating or updating a deployment was + // started but failed. + APPLY_BUILD_RUN_FAILED = 5; + } + + // Blueprint that was deployed. + oneof blueprint { + // Output only. A blueprint described using Terraform's HashiCorp + // Configuration Language as a root module. + TerraformBlueprint terraform_blueprint = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Revision name. Format: + // `projects/{project}/locations/{location}/deployments/{deployment}/ + // revisions/{revision}` + string name = 1; + + // Output only. Time when the revision was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the revision was last modified. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The action which created this revision + Action action = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the revision. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Outputs and artifacts from applying a deployment. + ApplyResults apply_results = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional info regarding the current state. + string state_detail = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Code describing any errors that may have occurred. + ErrorCode error_code = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud Build instance UUID associated with this revision. + string build = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of Revision operation logs in + // `gs://{bucket}/{object}` format. + string logs = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Errors encountered when creating or updating this deployment. + // Errors are truncated to 10 entries, see `delete_results` and `error_logs` + // for full details. + repeated TerraformError tf_errors = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of Terraform error logs in Google Cloud Storage. + // Format: `gs://{bucket}/{object}`. + string error_logs = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. User-specified Service Account (SA) to be used as credential + // to manage resources. Format: + // `projects/{projectID}/serviceAccounts/{serviceAccount}` + string service_account = 14 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + } + ]; + + // Output only. By default, Infra Manager will return a failure when + // Terraform encounters a 409 code (resource conflict error) during actuation. + // If this flag is set to true, Infra Manager will instead + // attempt to automatically import the resource into the Terraform state (for + // supported resource types) and continue actuation. + // + // Not all resource types are supported, refer to documentation. + bool import_existing_resources = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The user-specified Cloud Build worker pool resource in which + // the Cloud Build job will execute. Format: + // `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. + // If this field is unspecified, the default Cloud Build worker pool will be + // used. + string worker_pool = 17 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; +} + +// Errors encountered during actuation using Terraform +message TerraformError { + // Address of the resource associated with the error, + // e.g. `google_compute_network.vpc_network`. + string resource_address = 1; + + // HTTP response code returned from Google Cloud Platform APIs when Terraform + // fails to provision the resource. If unset or 0, no HTTP response code was + // returned by Terraform. + int32 http_response_code = 2; + + // A human-readable error description. + string error_description = 3; + + // Original error response from underlying Google API, if available. + google.rpc.Status error = 4; +} + +// A set of files in a Git repository. +message GitSource { + // Optional. Repository URL. + // Example: 'https://github.com/kubernetes/examples.git' + optional string repo = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Subdirectory inside the repository. + // Example: 'staging/my-package' + optional string directory = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Git reference (e.g. branch or tag). + optional string ref = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Ephemeral metadata content describing the state of a deployment operation. +message DeploymentOperationMetadata { + // The possible steps a deployment may be running. + enum DeploymentStep { + // Unspecified deployment step + DEPLOYMENT_STEP_UNSPECIFIED = 0; + + // Infra Manager is creating a Google Cloud Storage bucket to store + // artifacts and metadata about the deployment and revision + PREPARING_STORAGE_BUCKET = 1; + + // Downloading the blueprint onto the Google Cloud Storage bucket + DOWNLOADING_BLUEPRINT = 2; + + // Initializing Terraform using `terraform init` + RUNNING_TF_INIT = 3; + + // Running `terraform plan` + RUNNING_TF_PLAN = 4; + + // Actuating resources using Terraform using `terraform apply` + RUNNING_TF_APPLY = 5; + + // Destroying resources using Terraform using `terraform destroy` + RUNNING_TF_DESTROY = 6; + + // Validating the uploaded TF state file when unlocking a deployment + RUNNING_TF_VALIDATE = 7; + + // Unlocking a deployment + UNLOCKING_DEPLOYMENT = 8; + + // Operation was successful + SUCCEEDED = 9; + + // Operation failed + FAILED = 10; + } + + // The current step the deployment operation is running. + DeploymentStep step = 1; + + // Outputs and artifacts from applying a deployment. + ApplyResults apply_results = 2; + + // Output only. Cloud Build instance UUID associated with this operation. + string build = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Location of Deployment operations logs in + // `gs://{bucket}/{object}` format. + string logs = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Resource represents a Google Cloud Platform resource actuated by IM. +// Resources are child resources of Revisions. +message Resource { + option (google.api.resource) = { + type: "config.googleapis.com/Resource" + pattern: "projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}" + }; + + // Possible intent of the resource. + enum Intent { + // The default value. This value is used if the intent is omitted. + INTENT_UNSPECIFIED = 0; + + // Infra Manager will create this Resource. + CREATE = 1; + + // Infra Manager will update this Resource. + UPDATE = 2; + + // Infra Manager will delete this Resource. + DELETE = 3; + + // Infra Manager will destroy and recreate this Resource. + RECREATE = 4; + + // Infra Manager will leave this Resource untouched. + UNCHANGED = 5; + } + + // Possible states of a resource. + enum State { + // The default value. This value is used if the state is omitted. + STATE_UNSPECIFIED = 0; + + // Resource has been planned for reconcile. + PLANNED = 1; + + // Resource is actively reconciling into the intended state. + IN_PROGRESS = 2; + + // Resource has reconciled to intended state. + RECONCILED = 3; + + // Resource failed to reconcile. + FAILED = 4; + } + + // Output only. Resource name. + // Format: + // `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Terraform-specific info if this resource was created using + // Terraform. + ResourceTerraformInfo terraform_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI + // ID). CAI type format follows + // https://cloud.google.com/asset-inventory/docs/supported-asset-types + map cai_assets = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Intent of the resource. + Intent intent = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the resource. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Terraform info of a Resource. +message ResourceTerraformInfo { + // TF resource address that uniquely identifies this resource within this + // deployment. + string address = 1; + + // TF resource type + string type = 2; + + // ID attribute of the TF resource + string id = 3; +} + +// CAI info of a Resource. +message ResourceCAIInfo { + // CAI resource name in the format following + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string full_resource_name = 1; +} + +// A request to get a Resource from a 'GetResource' call. +message GetResourceRequest { + // Required. The name of the Resource in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}/resource/{resource}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Resource" } + ]; +} + +// A request to list Resources passed to a 'ListResources' call. +message ListResourcesRequest { + // Required. The parent in whose context the Resources are listed. The parent + // value is in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } + ]; + + // When requesting a page of resources, 'page_size' specifies number of + // resources to return. If unspecified or set to 0, all resources will be + // returned. + int32 page_size = 2; + + // Token returned by previous call to 'ListResources' which specifies the + // position in the list from where to continue listing the resources. + string page_token = 3; + + // Lists the Resources that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form '{field} {operator} {value}' where operators: '<', '>', + // '<=', + // '>=', + // '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + // roughly synonymous with equality). {field} can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = + // "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/baz + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +// A response to a 'ListResources' call. Contains a list of Resources. +message ListResourcesResponse { + // List of [Resources][]s. + repeated Resource resources = 1; + + // A token to request the next page of resources from the 'ListResources' + // method. The value of an empty string means that there are no more resources + // to return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Contains info about a Terraform state file +message Statefile { + // Output only. Cloud Storage signed URI used for downloading or uploading the + // state file. + string signed_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request to export a state file passed to a 'ExportDeploymentStatefile' +// call. +message ExportDeploymentStatefileRequest { + // Required. The parent in whose context the statefile is listed. The parent + // value is in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Optional. If this flag is set to true, the exported deployment state file + // will be the draft state. This will enable the draft file to be validated + // before copying it over to the working state on unlock. + bool draft = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to export a state file passed to a 'ExportRevisionStatefile' +// call. +message ExportRevisionStatefileRequest { + // Required. The parent in whose context the statefile is listed. The parent + // value is in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}/revisions/{revision}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Revision" } + ]; +} + +// A request to import a state file passed to a 'ImportStatefile' call. +message ImportStatefileRequest { + // Required. The parent in whose context the statefile is listed. The parent + // value is in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Required. Lock ID of the lock file to verify that the user who is importing + // the state file previously locked the Deployment. + int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. + bool skip_draft = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to delete a state file passed to a 'DeleteStatefile' call. +message DeleteStatefileRequest { + // Required. The name of the deployment in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Required. Lock ID of the lock file to verify that the user who is deleting + // the state file previously locked the Deployment. + int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request to lock a deployment passed to a 'LockDeployment' call. +message LockDeploymentRequest { + // Required. The name of the deployment in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; +} + +// A request to unlock a state file passed to a 'UnlockDeployment' call. +message UnlockDeploymentRequest { + // Required. The name of the deployment in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; + + // Required. Lock ID of the lock file to be unlocked. + int64 lock_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request to get a state file lock info passed to a 'ExportLockInfo' call. +message ExportLockInfoRequest { + // Required. The name of the deployment in the format: + // 'projects/{project_id}/locations/{location}/deployments/{deployment}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/Deployment" + } + ]; +} + +// Details about the lock which locked the deployment. +message LockInfo { + // Unique ID for the lock to be overridden with generation ID in the backend. + int64 lock_id = 1; + + // Terraform operation, provided by the caller. + string operation = 2; + + // Extra information to store with the lock, provided by the caller. + string info = 3; + + // user@hostname when available + string who = 4; + + // Terraform version + string version = 5; + + // Time that the lock was taken. + google.protobuf.Timestamp create_time = 6; +} diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/create/SyncCreateSetCredentialsProvider.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..736a2ef471ba --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.ConfigSettings; +import com.google.cloud.config.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ConfigSettings configSettings = + ConfigSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ConfigClient configClient = ConfigClient.create(configSettings); + } +} +// [END config_v1_generated_Config_Create_SetCredentialsProvider_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/create/SyncCreateSetCredentialsProvider1.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..2f34e6477d80 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,39 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_Create_SetCredentialsProvider1_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.ConfigSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ConfigSettings configSettings = ConfigSettings.newHttpJsonBuilder().build(); + ConfigClient configClient = ConfigClient.create(configSettings); + } +} +// [END config_v1_generated_Config_Create_SetCredentialsProvider1_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/create/SyncCreateSetEndpoint.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..7c57cf6bdccb --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/create/SyncCreateSetEndpoint.java @@ -0,0 +1,40 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_Create_SetEndpoint_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.ConfigSettings; +import com.google.cloud.config.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ConfigSettings configSettings = ConfigSettings.newBuilder().setEndpoint(myEndpoint).build(); + ConfigClient configClient = ConfigClient.create(configSettings); + } +} +// [END config_v1_generated_Config_Create_SetEndpoint_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/AsyncCreateDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/AsyncCreateDeployment.java new file mode 100644 index 000000000000..9a90fa1c3271 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/AsyncCreateDeployment.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_CreateDeployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.CreateDeploymentRequest; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateDeployment { + + public static void main(String[] args) throws Exception { + asyncCreateDeployment(); + } + + public static void asyncCreateDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + CreateDeploymentRequest request = + CreateDeploymentRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDeploymentId("deploymentId-136894784") + .setDeployment(Deployment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = configClient.createDeploymentCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END config_v1_generated_Config_CreateDeployment_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/AsyncCreateDeploymentLRO.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/AsyncCreateDeploymentLRO.java new file mode 100644 index 000000000000..157011002f3d --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/AsyncCreateDeploymentLRO.java @@ -0,0 +1,54 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_CreateDeployment_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.CreateDeploymentRequest; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.LocationName; +import com.google.cloud.config.v1.OperationMetadata; + +public class AsyncCreateDeploymentLRO { + + public static void main(String[] args) throws Exception { + asyncCreateDeploymentLRO(); + } + + public static void asyncCreateDeploymentLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + CreateDeploymentRequest request = + CreateDeploymentRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDeploymentId("deploymentId-136894784") + .setDeployment(Deployment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + configClient.createDeploymentOperationCallable().futureCall(request); + // Do something. + Deployment response = future.get(); + } + } +} +// [END config_v1_generated_Config_CreateDeployment_LRO_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/SyncCreateDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/SyncCreateDeployment.java new file mode 100644 index 000000000000..d24b96d87dd6 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/SyncCreateDeployment.java @@ -0,0 +1,49 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_CreateDeployment_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.CreateDeploymentRequest; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.LocationName; + +public class SyncCreateDeployment { + + public static void main(String[] args) throws Exception { + syncCreateDeployment(); + } + + public static void syncCreateDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + CreateDeploymentRequest request = + CreateDeploymentRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDeploymentId("deploymentId-136894784") + .setDeployment(Deployment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Deployment response = configClient.createDeploymentAsync(request).get(); + } + } +} +// [END config_v1_generated_Config_CreateDeployment_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/SyncCreateDeploymentLocationnameDeploymentString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/SyncCreateDeploymentLocationnameDeploymentString.java new file mode 100644 index 000000000000..d004f5bcf3a6 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/SyncCreateDeploymentLocationnameDeploymentString.java @@ -0,0 +1,45 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_CreateDeployment_LocationnameDeploymentString_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.LocationName; + +public class SyncCreateDeploymentLocationnameDeploymentString { + + public static void main(String[] args) throws Exception { + syncCreateDeploymentLocationnameDeploymentString(); + } + + public static void syncCreateDeploymentLocationnameDeploymentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Deployment deployment = Deployment.newBuilder().build(); + String deploymentId = "deploymentId-136894784"; + Deployment response = + configClient.createDeploymentAsync(parent, deployment, deploymentId).get(); + } + } +} +// [END config_v1_generated_Config_CreateDeployment_LocationnameDeploymentString_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/SyncCreateDeploymentStringDeploymentString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/SyncCreateDeploymentStringDeploymentString.java new file mode 100644 index 000000000000..c353c8c444ce --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/createdeployment/SyncCreateDeploymentStringDeploymentString.java @@ -0,0 +1,45 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_CreateDeployment_StringDeploymentString_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.LocationName; + +public class SyncCreateDeploymentStringDeploymentString { + + public static void main(String[] args) throws Exception { + syncCreateDeploymentStringDeploymentString(); + } + + public static void syncCreateDeploymentStringDeploymentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Deployment deployment = Deployment.newBuilder().build(); + String deploymentId = "deploymentId-136894784"; + Deployment response = + configClient.createDeploymentAsync(parent, deployment, deploymentId).get(); + } + } +} +// [END config_v1_generated_Config_CreateDeployment_StringDeploymentString_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/AsyncDeleteDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/AsyncDeleteDeployment.java new file mode 100644 index 000000000000..4f0d241d1f08 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/AsyncDeleteDeployment.java @@ -0,0 +1,51 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_DeleteDeployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeleteDeploymentRequest; +import com.google.cloud.config.v1.DeploymentName; +import com.google.longrunning.Operation; + +public class AsyncDeleteDeployment { + + public static void main(String[] args) throws Exception { + asyncDeleteDeployment(); + } + + public static void asyncDeleteDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeleteDeploymentRequest request = + DeleteDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + ApiFuture future = configClient.deleteDeploymentCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END config_v1_generated_Config_DeleteDeployment_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/AsyncDeleteDeploymentLRO.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/AsyncDeleteDeploymentLRO.java new file mode 100644 index 000000000000..8fd25c55e735 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/AsyncDeleteDeploymentLRO.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_DeleteDeployment_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeleteDeploymentRequest; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.OperationMetadata; + +public class AsyncDeleteDeploymentLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteDeploymentLRO(); + } + + public static void asyncDeleteDeploymentLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeleteDeploymentRequest request = + DeleteDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + OperationFuture future = + configClient.deleteDeploymentOperationCallable().futureCall(request); + // Do something. + Deployment response = future.get(); + } + } +} +// [END config_v1_generated_Config_DeleteDeployment_LRO_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/SyncDeleteDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/SyncDeleteDeployment.java new file mode 100644 index 000000000000..59cbe8a7c544 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/SyncDeleteDeployment.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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_DeleteDeployment_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeleteDeploymentRequest; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; + +public class SyncDeleteDeployment { + + public static void main(String[] args) throws Exception { + syncDeleteDeployment(); + } + + public static void syncDeleteDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeleteDeploymentRequest request = + DeleteDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .build(); + Deployment response = configClient.deleteDeploymentAsync(request).get(); + } + } +} +// [END config_v1_generated_Config_DeleteDeployment_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/SyncDeleteDeploymentDeploymentname.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/SyncDeleteDeploymentDeploymentname.java new file mode 100644 index 000000000000..c6c3d60429d4 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/SyncDeleteDeploymentDeploymentname.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_DeleteDeployment_Deploymentname_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; + +public class SyncDeleteDeploymentDeploymentname { + + public static void main(String[] args) throws Exception { + syncDeleteDeploymentDeploymentname(); + } + + public static void syncDeleteDeploymentDeploymentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + Deployment response = configClient.deleteDeploymentAsync(name).get(); + } + } +} +// [END config_v1_generated_Config_DeleteDeployment_Deploymentname_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/SyncDeleteDeploymentString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/SyncDeleteDeploymentString.java new file mode 100644 index 000000000000..138586e5d8a6 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletedeployment/SyncDeleteDeploymentString.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_DeleteDeployment_String_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; + +public class SyncDeleteDeploymentString { + + public static void main(String[] args) throws Exception { + syncDeleteDeploymentString(); + } + + public static void syncDeleteDeploymentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); + Deployment response = configClient.deleteDeploymentAsync(name).get(); + } + } +} +// [END config_v1_generated_Config_DeleteDeployment_String_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/AsyncDeleteStatefile.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/AsyncDeleteStatefile.java new file mode 100644 index 000000000000..b8b5919eb951 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/AsyncDeleteStatefile.java @@ -0,0 +1,50 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_DeleteStatefile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeleteStatefileRequest; +import com.google.cloud.config.v1.DeploymentName; +import com.google.protobuf.Empty; + +public class AsyncDeleteStatefile { + + public static void main(String[] args) throws Exception { + asyncDeleteStatefile(); + } + + public static void asyncDeleteStatefile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeleteStatefileRequest request = + DeleteStatefileRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setLockId(338696367) + .build(); + ApiFuture future = configClient.deleteStatefileCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END config_v1_generated_Config_DeleteStatefile_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/SyncDeleteStatefile.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/SyncDeleteStatefile.java new file mode 100644 index 000000000000..3127e2c7d261 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/SyncDeleteStatefile.java @@ -0,0 +1,47 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_DeleteStatefile_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeleteStatefileRequest; +import com.google.cloud.config.v1.DeploymentName; +import com.google.protobuf.Empty; + +public class SyncDeleteStatefile { + + public static void main(String[] args) throws Exception { + syncDeleteStatefile(); + } + + public static void syncDeleteStatefile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeleteStatefileRequest request = + DeleteStatefileRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setLockId(338696367) + .build(); + configClient.deleteStatefile(request); + } + } +} +// [END config_v1_generated_Config_DeleteStatefile_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/SyncDeleteStatefileDeploymentname.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/SyncDeleteStatefileDeploymentname.java new file mode 100644 index 000000000000..f3675ce9ec6c --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/SyncDeleteStatefileDeploymentname.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_DeleteStatefile_Deploymentname_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.protobuf.Empty; + +public class SyncDeleteStatefileDeploymentname { + + public static void main(String[] args) throws Exception { + syncDeleteStatefileDeploymentname(); + } + + public static void syncDeleteStatefileDeploymentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + configClient.deleteStatefile(name); + } + } +} +// [END config_v1_generated_Config_DeleteStatefile_Deploymentname_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/SyncDeleteStatefileString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/SyncDeleteStatefileString.java new file mode 100644 index 000000000000..d129a8fa5e99 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/deletestatefile/SyncDeleteStatefileString.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_DeleteStatefile_String_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.protobuf.Empty; + +public class SyncDeleteStatefileString { + + public static void main(String[] args) throws Exception { + syncDeleteStatefileString(); + } + + public static void syncDeleteStatefileString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); + configClient.deleteStatefile(name); + } + } +} +// [END config_v1_generated_Config_DeleteStatefile_String_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportdeploymentstatefile/AsyncExportDeploymentStatefile.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportdeploymentstatefile/AsyncExportDeploymentStatefile.java new file mode 100644 index 000000000000..825be4702454 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportdeploymentstatefile/AsyncExportDeploymentStatefile.java @@ -0,0 +1,51 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ExportDeploymentStatefile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.ExportDeploymentStatefileRequest; +import com.google.cloud.config.v1.Statefile; + +public class AsyncExportDeploymentStatefile { + + public static void main(String[] args) throws Exception { + asyncExportDeploymentStatefile(); + } + + public static void asyncExportDeploymentStatefile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ExportDeploymentStatefileRequest request = + ExportDeploymentStatefileRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setDraft(true) + .build(); + ApiFuture future = + configClient.exportDeploymentStatefileCallable().futureCall(request); + // Do something. + Statefile response = future.get(); + } + } +} +// [END config_v1_generated_Config_ExportDeploymentStatefile_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportdeploymentstatefile/SyncExportDeploymentStatefile.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportdeploymentstatefile/SyncExportDeploymentStatefile.java new file mode 100644 index 000000000000..53f76a411deb --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportdeploymentstatefile/SyncExportDeploymentStatefile.java @@ -0,0 +1,47 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ExportDeploymentStatefile_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.ExportDeploymentStatefileRequest; +import com.google.cloud.config.v1.Statefile; + +public class SyncExportDeploymentStatefile { + + public static void main(String[] args) throws Exception { + syncExportDeploymentStatefile(); + } + + public static void syncExportDeploymentStatefile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ExportDeploymentStatefileRequest request = + ExportDeploymentStatefileRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setDraft(true) + .build(); + Statefile response = configClient.exportDeploymentStatefile(request); + } + } +} +// [END config_v1_generated_Config_ExportDeploymentStatefile_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/AsyncExportLockInfo.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/AsyncExportLockInfo.java new file mode 100644 index 000000000000..5dab9bbae61e --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/AsyncExportLockInfo.java @@ -0,0 +1,49 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ExportLockInfo_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.ExportLockInfoRequest; +import com.google.cloud.config.v1.LockInfo; + +public class AsyncExportLockInfo { + + public static void main(String[] args) throws Exception { + asyncExportLockInfo(); + } + + public static void asyncExportLockInfo() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ExportLockInfoRequest request = + ExportLockInfoRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .build(); + ApiFuture future = configClient.exportLockInfoCallable().futureCall(request); + // Do something. + LockInfo response = future.get(); + } + } +} +// [END config_v1_generated_Config_ExportLockInfo_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/SyncExportLockInfo.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/SyncExportLockInfo.java new file mode 100644 index 000000000000..2713708faa0c --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/SyncExportLockInfo.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ExportLockInfo_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.ExportLockInfoRequest; +import com.google.cloud.config.v1.LockInfo; + +public class SyncExportLockInfo { + + public static void main(String[] args) throws Exception { + syncExportLockInfo(); + } + + public static void syncExportLockInfo() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ExportLockInfoRequest request = + ExportLockInfoRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .build(); + LockInfo response = configClient.exportLockInfo(request); + } + } +} +// [END config_v1_generated_Config_ExportLockInfo_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/SyncExportLockInfoDeploymentname.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/SyncExportLockInfoDeploymentname.java new file mode 100644 index 000000000000..17f673bd04d9 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/SyncExportLockInfoDeploymentname.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ExportLockInfo_Deploymentname_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.LockInfo; + +public class SyncExportLockInfoDeploymentname { + + public static void main(String[] args) throws Exception { + syncExportLockInfoDeploymentname(); + } + + public static void syncExportLockInfoDeploymentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + LockInfo response = configClient.exportLockInfo(name); + } + } +} +// [END config_v1_generated_Config_ExportLockInfo_Deploymentname_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/SyncExportLockInfoString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/SyncExportLockInfoString.java new file mode 100644 index 000000000000..4d4e4b258cb0 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportlockinfo/SyncExportLockInfoString.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ExportLockInfo_String_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.LockInfo; + +public class SyncExportLockInfoString { + + public static void main(String[] args) throws Exception { + syncExportLockInfoString(); + } + + public static void syncExportLockInfoString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); + LockInfo response = configClient.exportLockInfo(name); + } + } +} +// [END config_v1_generated_Config_ExportLockInfo_String_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportrevisionstatefile/AsyncExportRevisionStatefile.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportrevisionstatefile/AsyncExportRevisionStatefile.java new file mode 100644 index 000000000000..69c6c1edf54b --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportrevisionstatefile/AsyncExportRevisionStatefile.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ExportRevisionStatefile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.ExportRevisionStatefileRequest; +import com.google.cloud.config.v1.RevisionName; +import com.google.cloud.config.v1.Statefile; + +public class AsyncExportRevisionStatefile { + + public static void main(String[] args) throws Exception { + asyncExportRevisionStatefile(); + } + + public static void asyncExportRevisionStatefile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ExportRevisionStatefileRequest request = + ExportRevisionStatefileRequest.newBuilder() + .setParent( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") + .toString()) + .build(); + ApiFuture future = + configClient.exportRevisionStatefileCallable().futureCall(request); + // Do something. + Statefile response = future.get(); + } + } +} +// [END config_v1_generated_Config_ExportRevisionStatefile_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportrevisionstatefile/SyncExportRevisionStatefile.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportrevisionstatefile/SyncExportRevisionStatefile.java new file mode 100644 index 000000000000..e8a683cfddbc --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/exportrevisionstatefile/SyncExportRevisionStatefile.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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ExportRevisionStatefile_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.ExportRevisionStatefileRequest; +import com.google.cloud.config.v1.RevisionName; +import com.google.cloud.config.v1.Statefile; + +public class SyncExportRevisionStatefile { + + public static void main(String[] args) throws Exception { + syncExportRevisionStatefile(); + } + + public static void syncExportRevisionStatefile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ExportRevisionStatefileRequest request = + ExportRevisionStatefileRequest.newBuilder() + .setParent( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") + .toString()) + .build(); + Statefile response = configClient.exportRevisionStatefile(request); + } + } +} +// [END config_v1_generated_Config_ExportRevisionStatefile_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/AsyncGetDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/AsyncGetDeployment.java new file mode 100644 index 000000000000..00cc8ff6bfa0 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/AsyncGetDeployment.java @@ -0,0 +1,49 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetDeployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.GetDeploymentRequest; + +public class AsyncGetDeployment { + + public static void main(String[] args) throws Exception { + asyncGetDeployment(); + } + + public static void asyncGetDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + GetDeploymentRequest request = + GetDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .build(); + ApiFuture future = configClient.getDeploymentCallable().futureCall(request); + // Do something. + Deployment response = future.get(); + } + } +} +// [END config_v1_generated_Config_GetDeployment_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/SyncGetDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/SyncGetDeployment.java new file mode 100644 index 000000000000..9d778ed22f26 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/SyncGetDeployment.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetDeployment_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.GetDeploymentRequest; + +public class SyncGetDeployment { + + public static void main(String[] args) throws Exception { + syncGetDeployment(); + } + + public static void syncGetDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + GetDeploymentRequest request = + GetDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .build(); + Deployment response = configClient.getDeployment(request); + } + } +} +// [END config_v1_generated_Config_GetDeployment_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/SyncGetDeploymentDeploymentname.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/SyncGetDeploymentDeploymentname.java new file mode 100644 index 000000000000..4b8fa6bb2597 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/SyncGetDeploymentDeploymentname.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetDeployment_Deploymentname_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; + +public class SyncGetDeploymentDeploymentname { + + public static void main(String[] args) throws Exception { + syncGetDeploymentDeploymentname(); + } + + public static void syncGetDeploymentDeploymentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + Deployment response = configClient.getDeployment(name); + } + } +} +// [END config_v1_generated_Config_GetDeployment_Deploymentname_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/SyncGetDeploymentString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/SyncGetDeploymentString.java new file mode 100644 index 000000000000..4dcd3cc2d9b2 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getdeployment/SyncGetDeploymentString.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetDeployment_String_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; + +public class SyncGetDeploymentString { + + public static void main(String[] args) throws Exception { + syncGetDeploymentString(); + } + + public static void syncGetDeploymentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); + Deployment response = configClient.getDeployment(name); + } + } +} +// [END config_v1_generated_Config_GetDeployment_String_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getiampolicy/AsyncGetIamPolicy.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..4bff07ff3e71 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = configClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END config_v1_generated_Config_GetIamPolicy_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getiampolicy/SyncGetIamPolicy.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..e0ebe7ed8e21 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getiampolicy/SyncGetIamPolicy.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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetIamPolicy_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = configClient.getIamPolicy(request); + } + } +} +// [END config_v1_generated_Config_GetIamPolicy_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getlocation/AsyncGetLocation.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..420800f7ab81 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = configClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END config_v1_generated_Config_GetLocation_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getlocation/SyncGetLocation.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..fee7c102388c --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetLocation_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = configClient.getLocation(request); + } + } +} +// [END config_v1_generated_Config_GetLocation_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/AsyncGetResource.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/AsyncGetResource.java new file mode 100644 index 000000000000..7c8b5c3019ed --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/AsyncGetResource.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.GetResourceRequest; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.ResourceName; + +public class AsyncGetResource { + + public static void main(String[] args) throws Exception { + asyncGetResource(); + } + + public static void asyncGetResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + GetResourceRequest request = + GetResourceRequest.newBuilder() + .setName( + ResourceName.of( + "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]") + .toString()) + .build(); + ApiFuture future = configClient.getResourceCallable().futureCall(request); + // Do something. + Resource response = future.get(); + } + } +} +// [END config_v1_generated_Config_GetResource_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/SyncGetResource.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/SyncGetResource.java new file mode 100644 index 000000000000..30da3ff75bf9 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/SyncGetResource.java @@ -0,0 +1,49 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetResource_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.GetResourceRequest; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.ResourceName; + +public class SyncGetResource { + + public static void main(String[] args) throws Exception { + syncGetResource(); + } + + public static void syncGetResource() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + GetResourceRequest request = + GetResourceRequest.newBuilder() + .setName( + ResourceName.of( + "[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]") + .toString()) + .build(); + Resource response = configClient.getResource(request); + } + } +} +// [END config_v1_generated_Config_GetResource_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/SyncGetResourceResourcename.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/SyncGetResourceResourcename.java new file mode 100644 index 000000000000..55a0c349a4ae --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/SyncGetResourceResourcename.java @@ -0,0 +1,43 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetResource_Resourcename_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.ResourceName; + +public class SyncGetResourceResourcename { + + public static void main(String[] args) throws Exception { + syncGetResourceResourcename(); + } + + public static void syncGetResourceResourcename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ResourceName name = + ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]"); + Resource response = configClient.getResource(name); + } + } +} +// [END config_v1_generated_Config_GetResource_Resourcename_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/SyncGetResourceString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/SyncGetResourceString.java new file mode 100644 index 000000000000..791baf37cb2f --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getresource/SyncGetResourceString.java @@ -0,0 +1,44 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetResource_String_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.ResourceName; + +public class SyncGetResourceString { + + public static void main(String[] args) throws Exception { + syncGetResourceString(); + } + + public static void syncGetResourceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String name = + ResourceName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]", "[RESOURCE]") + .toString(); + Resource response = configClient.getResource(name); + } + } +} +// [END config_v1_generated_Config_GetResource_String_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/AsyncGetRevision.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/AsyncGetRevision.java new file mode 100644 index 000000000000..3dc78edb9195 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/AsyncGetRevision.java @@ -0,0 +1,51 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetRevision_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.GetRevisionRequest; +import com.google.cloud.config.v1.Revision; +import com.google.cloud.config.v1.RevisionName; + +public class AsyncGetRevision { + + public static void main(String[] args) throws Exception { + asyncGetRevision(); + } + + public static void asyncGetRevision() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + GetRevisionRequest request = + GetRevisionRequest.newBuilder() + .setName( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") + .toString()) + .build(); + ApiFuture future = configClient.getRevisionCallable().futureCall(request); + // Do something. + Revision response = future.get(); + } + } +} +// [END config_v1_generated_Config_GetRevision_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/SyncGetRevision.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/SyncGetRevision.java new file mode 100644 index 000000000000..87f3baa83b5f --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/SyncGetRevision.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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetRevision_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.GetRevisionRequest; +import com.google.cloud.config.v1.Revision; +import com.google.cloud.config.v1.RevisionName; + +public class SyncGetRevision { + + public static void main(String[] args) throws Exception { + syncGetRevision(); + } + + public static void syncGetRevision() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + GetRevisionRequest request = + GetRevisionRequest.newBuilder() + .setName( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") + .toString()) + .build(); + Revision response = configClient.getRevision(request); + } + } +} +// [END config_v1_generated_Config_GetRevision_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/SyncGetRevisionRevisionname.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/SyncGetRevisionRevisionname.java new file mode 100644 index 000000000000..be1b625c1b66 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/SyncGetRevisionRevisionname.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetRevision_Revisionname_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Revision; +import com.google.cloud.config.v1.RevisionName; + +public class SyncGetRevisionRevisionname { + + public static void main(String[] args) throws Exception { + syncGetRevisionRevisionname(); + } + + public static void syncGetRevisionRevisionname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + RevisionName name = RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); + Revision response = configClient.getRevision(name); + } + } +} +// [END config_v1_generated_Config_GetRevision_Revisionname_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/SyncGetRevisionString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/SyncGetRevisionString.java new file mode 100644 index 000000000000..cbc2116b3702 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getrevision/SyncGetRevisionString.java @@ -0,0 +1,43 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_GetRevision_String_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Revision; +import com.google.cloud.config.v1.RevisionName; + +public class SyncGetRevisionString { + + public static void main(String[] args) throws Exception { + syncGetRevisionString(); + } + + public static void syncGetRevisionString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String name = + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString(); + Revision response = configClient.getRevision(name); + } + } +} +// [END config_v1_generated_Config_GetRevision_String_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/AsyncImportStatefile.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/AsyncImportStatefile.java new file mode 100644 index 000000000000..63c3450385f6 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/AsyncImportStatefile.java @@ -0,0 +1,51 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ImportStatefile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.ImportStatefileRequest; +import com.google.cloud.config.v1.Statefile; + +public class AsyncImportStatefile { + + public static void main(String[] args) throws Exception { + asyncImportStatefile(); + } + + public static void asyncImportStatefile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ImportStatefileRequest request = + ImportStatefileRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setLockId(338696367) + .setSkipDraft(true) + .build(); + ApiFuture future = configClient.importStatefileCallable().futureCall(request); + // Do something. + Statefile response = future.get(); + } + } +} +// [END config_v1_generated_Config_ImportStatefile_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/SyncImportStatefile.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/SyncImportStatefile.java new file mode 100644 index 000000000000..f5d81eb96bfd --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/SyncImportStatefile.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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ImportStatefile_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.ImportStatefileRequest; +import com.google.cloud.config.v1.Statefile; + +public class SyncImportStatefile { + + public static void main(String[] args) throws Exception { + syncImportStatefile(); + } + + public static void syncImportStatefile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ImportStatefileRequest request = + ImportStatefileRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setLockId(338696367) + .setSkipDraft(true) + .build(); + Statefile response = configClient.importStatefile(request); + } + } +} +// [END config_v1_generated_Config_ImportStatefile_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/SyncImportStatefileDeploymentnameLong.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/SyncImportStatefileDeploymentnameLong.java new file mode 100644 index 000000000000..04be3b19cf00 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/SyncImportStatefileDeploymentnameLong.java @@ -0,0 +1,43 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ImportStatefile_DeploymentnameLong_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.Statefile; + +public class SyncImportStatefileDeploymentnameLong { + + public static void main(String[] args) throws Exception { + syncImportStatefileDeploymentnameLong(); + } + + public static void syncImportStatefileDeploymentnameLong() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + long lockId = 338696367; + Statefile response = configClient.importStatefile(parent, lockId); + } + } +} +// [END config_v1_generated_Config_ImportStatefile_DeploymentnameLong_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/SyncImportStatefileStringLong.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/SyncImportStatefileStringLong.java new file mode 100644 index 000000000000..6c819f9c1611 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/importstatefile/SyncImportStatefileStringLong.java @@ -0,0 +1,43 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ImportStatefile_StringLong_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.Statefile; + +public class SyncImportStatefileStringLong { + + public static void main(String[] args) throws Exception { + syncImportStatefileStringLong(); + } + + public static void syncImportStatefileStringLong() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); + long lockId = 338696367; + Statefile response = configClient.importStatefile(parent, lockId); + } + } +} +// [END config_v1_generated_Config_ImportStatefile_StringLong_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/AsyncListDeployments.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/AsyncListDeployments.java new file mode 100644 index 000000000000..94af26a84f2f --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/AsyncListDeployments.java @@ -0,0 +1,56 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListDeployments_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.ListDeploymentsRequest; +import com.google.cloud.config.v1.LocationName; + +public class AsyncListDeployments { + + public static void main(String[] args) throws Exception { + asyncListDeployments(); + } + + public static void asyncListDeployments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListDeploymentsRequest request = + ListDeploymentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + configClient.listDeploymentsPagedCallable().futureCall(request); + // Do something. + for (Deployment element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListDeployments_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/AsyncListDeploymentsPaged.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/AsyncListDeploymentsPaged.java new file mode 100644 index 000000000000..3cc87b3beb6d --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/AsyncListDeploymentsPaged.java @@ -0,0 +1,63 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListDeployments_Paged_async] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.ListDeploymentsRequest; +import com.google.cloud.config.v1.ListDeploymentsResponse; +import com.google.cloud.config.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListDeploymentsPaged { + + public static void main(String[] args) throws Exception { + asyncListDeploymentsPaged(); + } + + public static void asyncListDeploymentsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListDeploymentsRequest request = + ListDeploymentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListDeploymentsResponse response = configClient.listDeploymentsCallable().call(request); + for (Deployment element : response.getDeploymentsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END config_v1_generated_Config_ListDeployments_Paged_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/SyncListDeployments.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/SyncListDeployments.java new file mode 100644 index 000000000000..16f2d5a79d4e --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/SyncListDeployments.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListDeployments_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.ListDeploymentsRequest; +import com.google.cloud.config.v1.LocationName; + +public class SyncListDeployments { + + public static void main(String[] args) throws Exception { + syncListDeployments(); + } + + public static void syncListDeployments() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListDeploymentsRequest request = + ListDeploymentsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Deployment element : configClient.listDeployments(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListDeployments_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/SyncListDeploymentsLocationname.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/SyncListDeploymentsLocationname.java new file mode 100644 index 000000000000..c55d2a29fccc --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/SyncListDeploymentsLocationname.java @@ -0,0 +1,44 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListDeployments_Locationname_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.LocationName; + +public class SyncListDeploymentsLocationname { + + public static void main(String[] args) throws Exception { + syncListDeploymentsLocationname(); + } + + public static void syncListDeploymentsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Deployment element : configClient.listDeployments(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListDeployments_Locationname_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/SyncListDeploymentsString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/SyncListDeploymentsString.java new file mode 100644 index 000000000000..f650a3d19b29 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listdeployments/SyncListDeploymentsString.java @@ -0,0 +1,44 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListDeployments_String_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.LocationName; + +public class SyncListDeploymentsString { + + public static void main(String[] args) throws Exception { + syncListDeploymentsString(); + } + + public static void syncListDeploymentsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Deployment element : configClient.listDeployments(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListDeployments_String_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listlocations/AsyncListLocations.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..e80dd84f8ae4 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listlocations/AsyncListLocations.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = configClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListLocations_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listlocations/AsyncListLocationsPaged.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..944d9de9e312 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListLocations_Paged_async] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = configClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END config_v1_generated_Config_ListLocations_Paged_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listlocations/SyncListLocations.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..653d52e0411f --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListLocations_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : configClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListLocations_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/AsyncListResources.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/AsyncListResources.java new file mode 100644 index 000000000000..164a98920a08 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/AsyncListResources.java @@ -0,0 +1,57 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListResources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.ListResourcesRequest; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.RevisionName; + +public class AsyncListResources { + + public static void main(String[] args) throws Exception { + asyncListResources(); + } + + public static void asyncListResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListResourcesRequest request = + ListResourcesRequest.newBuilder() + .setParent( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = configClient.listResourcesPagedCallable().futureCall(request); + // Do something. + for (Resource element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListResources_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/AsyncListResourcesPaged.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/AsyncListResourcesPaged.java new file mode 100644 index 000000000000..890c94c92ea6 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/AsyncListResourcesPaged.java @@ -0,0 +1,65 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListResources_Paged_async] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.ListResourcesRequest; +import com.google.cloud.config.v1.ListResourcesResponse; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.RevisionName; +import com.google.common.base.Strings; + +public class AsyncListResourcesPaged { + + public static void main(String[] args) throws Exception { + asyncListResourcesPaged(); + } + + public static void asyncListResourcesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListResourcesRequest request = + ListResourcesRequest.newBuilder() + .setParent( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListResourcesResponse response = configClient.listResourcesCallable().call(request); + for (Resource element : response.getResourcesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END config_v1_generated_Config_ListResources_Paged_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/SyncListResources.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/SyncListResources.java new file mode 100644 index 000000000000..f76c4daeed68 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/SyncListResources.java @@ -0,0 +1,54 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListResources_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.ListResourcesRequest; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.RevisionName; + +public class SyncListResources { + + public static void main(String[] args) throws Exception { + syncListResources(); + } + + public static void syncListResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListResourcesRequest request = + ListResourcesRequest.newBuilder() + .setParent( + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Resource element : configClient.listResources(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListResources_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/SyncListResourcesRevisionname.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/SyncListResourcesRevisionname.java new file mode 100644 index 000000000000..d1495031bf30 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/SyncListResourcesRevisionname.java @@ -0,0 +1,45 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListResources_Revisionname_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.RevisionName; + +public class SyncListResourcesRevisionname { + + public static void main(String[] args) throws Exception { + syncListResourcesRevisionname(); + } + + public static void syncListResourcesRevisionname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + RevisionName parent = + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]"); + for (Resource element : configClient.listResources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListResources_Revisionname_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/SyncListResourcesString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/SyncListResourcesString.java new file mode 100644 index 000000000000..988c32e8595a --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listresources/SyncListResourcesString.java @@ -0,0 +1,45 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListResources_String_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Resource; +import com.google.cloud.config.v1.RevisionName; + +public class SyncListResourcesString { + + public static void main(String[] args) throws Exception { + syncListResourcesString(); + } + + public static void syncListResourcesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String parent = + RevisionName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]", "[REVISION]").toString(); + for (Resource element : configClient.listResources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListResources_String_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/AsyncListRevisions.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/AsyncListRevisions.java new file mode 100644 index 000000000000..b340590039f0 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/AsyncListRevisions.java @@ -0,0 +1,55 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListRevisions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.ListRevisionsRequest; +import com.google.cloud.config.v1.Revision; + +public class AsyncListRevisions { + + public static void main(String[] args) throws Exception { + asyncListRevisions(); + } + + public static void asyncListRevisions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListRevisionsRequest request = + ListRevisionsRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = configClient.listRevisionsPagedCallable().futureCall(request); + // Do something. + for (Revision element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListRevisions_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/AsyncListRevisionsPaged.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/AsyncListRevisionsPaged.java new file mode 100644 index 000000000000..4eca46f99484 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/AsyncListRevisionsPaged.java @@ -0,0 +1,63 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListRevisions_Paged_async] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.ListRevisionsRequest; +import com.google.cloud.config.v1.ListRevisionsResponse; +import com.google.cloud.config.v1.Revision; +import com.google.common.base.Strings; + +public class AsyncListRevisionsPaged { + + public static void main(String[] args) throws Exception { + asyncListRevisionsPaged(); + } + + public static void asyncListRevisionsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListRevisionsRequest request = + ListRevisionsRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListRevisionsResponse response = configClient.listRevisionsCallable().call(request); + for (Revision element : response.getRevisionsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END config_v1_generated_Config_ListRevisions_Paged_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/SyncListRevisions.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/SyncListRevisions.java new file mode 100644 index 000000000000..e7d3c55eeb25 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/SyncListRevisions.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListRevisions_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.ListRevisionsRequest; +import com.google.cloud.config.v1.Revision; + +public class SyncListRevisions { + + public static void main(String[] args) throws Exception { + syncListRevisions(); + } + + public static void syncListRevisions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + ListRevisionsRequest request = + ListRevisionsRequest.newBuilder() + .setParent(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Revision element : configClient.listRevisions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListRevisions_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/SyncListRevisionsDeploymentname.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/SyncListRevisionsDeploymentname.java new file mode 100644 index 000000000000..69ba07ead180 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/SyncListRevisionsDeploymentname.java @@ -0,0 +1,44 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListRevisions_Deploymentname_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.Revision; + +public class SyncListRevisionsDeploymentname { + + public static void main(String[] args) throws Exception { + syncListRevisionsDeploymentname(); + } + + public static void syncListRevisionsDeploymentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeploymentName parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + for (Revision element : configClient.listRevisions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListRevisions_Deploymentname_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/SyncListRevisionsString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/SyncListRevisionsString.java new file mode 100644 index 000000000000..45d5080d6eea --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listrevisions/SyncListRevisionsString.java @@ -0,0 +1,44 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_ListRevisions_String_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.Revision; + +public class SyncListRevisionsString { + + public static void main(String[] args) throws Exception { + syncListRevisionsString(); + } + + public static void syncListRevisionsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String parent = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); + for (Revision element : configClient.listRevisions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END config_v1_generated_Config_ListRevisions_String_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/AsyncLockDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/AsyncLockDeployment.java new file mode 100644 index 000000000000..c99646d9d8af --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/AsyncLockDeployment.java @@ -0,0 +1,49 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_LockDeployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.LockDeploymentRequest; +import com.google.longrunning.Operation; + +public class AsyncLockDeployment { + + public static void main(String[] args) throws Exception { + asyncLockDeployment(); + } + + public static void asyncLockDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + LockDeploymentRequest request = + LockDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .build(); + ApiFuture future = configClient.lockDeploymentCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END config_v1_generated_Config_LockDeployment_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/AsyncLockDeploymentLRO.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/AsyncLockDeploymentLRO.java new file mode 100644 index 000000000000..da43d1f4f27e --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/AsyncLockDeploymentLRO.java @@ -0,0 +1,51 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_LockDeployment_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.LockDeploymentRequest; +import com.google.cloud.config.v1.OperationMetadata; + +public class AsyncLockDeploymentLRO { + + public static void main(String[] args) throws Exception { + asyncLockDeploymentLRO(); + } + + public static void asyncLockDeploymentLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + LockDeploymentRequest request = + LockDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .build(); + OperationFuture future = + configClient.lockDeploymentOperationCallable().futureCall(request); + // Do something. + Deployment response = future.get(); + } + } +} +// [END config_v1_generated_Config_LockDeployment_LRO_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/SyncLockDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/SyncLockDeployment.java new file mode 100644 index 000000000000..c222c172d287 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/SyncLockDeployment.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_LockDeployment_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.LockDeploymentRequest; + +public class SyncLockDeployment { + + public static void main(String[] args) throws Exception { + syncLockDeployment(); + } + + public static void syncLockDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + LockDeploymentRequest request = + LockDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .build(); + Deployment response = configClient.lockDeploymentAsync(request).get(); + } + } +} +// [END config_v1_generated_Config_LockDeployment_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/SyncLockDeploymentDeploymentname.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/SyncLockDeploymentDeploymentname.java new file mode 100644 index 000000000000..18c385c4e7a6 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/SyncLockDeploymentDeploymentname.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_LockDeployment_Deploymentname_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; + +public class SyncLockDeploymentDeploymentname { + + public static void main(String[] args) throws Exception { + syncLockDeploymentDeploymentname(); + } + + public static void syncLockDeploymentDeploymentname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + Deployment response = configClient.lockDeploymentAsync(name).get(); + } + } +} +// [END config_v1_generated_Config_LockDeployment_Deploymentname_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/SyncLockDeploymentString.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/SyncLockDeploymentString.java new file mode 100644 index 000000000000..734baa9b5d21 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/lockdeployment/SyncLockDeploymentString.java @@ -0,0 +1,42 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_LockDeployment_String_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; + +public class SyncLockDeploymentString { + + public static void main(String[] args) throws Exception { + syncLockDeploymentString(); + } + + public static void syncLockDeploymentString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); + Deployment response = configClient.lockDeploymentAsync(name).get(); + } + } +} +// [END config_v1_generated_Config_LockDeployment_String_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/setiampolicy/AsyncSetIamPolicy.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..646569dd5ad3 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/setiampolicy/AsyncSetIamPolicy.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = configClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END config_v1_generated_Config_SetIamPolicy_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/setiampolicy/SyncSetIamPolicy.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..a0f7a70627d5 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_SetIamPolicy_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = configClient.setIamPolicy(request); + } + } +} +// [END config_v1_generated_Config_SetIamPolicy_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/testiampermissions/AsyncTestIamPermissions.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..8a9859defa4c --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/testiampermissions/AsyncTestIamPermissions.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + configClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END config_v1_generated_Config_TestIamPermissions_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/testiampermissions/SyncTestIamPermissions.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..021d2b0e2da4 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/testiampermissions/SyncTestIamPermissions.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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_TestIamPermissions_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = configClient.testIamPermissions(request); + } + } +} +// [END config_v1_generated_Config_TestIamPermissions_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/AsyncUnlockDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/AsyncUnlockDeployment.java new file mode 100644 index 000000000000..9e318530bbd3 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/AsyncUnlockDeployment.java @@ -0,0 +1,50 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_UnlockDeployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.UnlockDeploymentRequest; +import com.google.longrunning.Operation; + +public class AsyncUnlockDeployment { + + public static void main(String[] args) throws Exception { + asyncUnlockDeployment(); + } + + public static void asyncUnlockDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + UnlockDeploymentRequest request = + UnlockDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setLockId(338696367) + .build(); + ApiFuture future = configClient.unlockDeploymentCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END config_v1_generated_Config_UnlockDeployment_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/AsyncUnlockDeploymentLRO.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/AsyncUnlockDeploymentLRO.java new file mode 100644 index 000000000000..f7541d755557 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/AsyncUnlockDeploymentLRO.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_UnlockDeployment_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.OperationMetadata; +import com.google.cloud.config.v1.UnlockDeploymentRequest; + +public class AsyncUnlockDeploymentLRO { + + public static void main(String[] args) throws Exception { + asyncUnlockDeploymentLRO(); + } + + public static void asyncUnlockDeploymentLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + UnlockDeploymentRequest request = + UnlockDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setLockId(338696367) + .build(); + OperationFuture future = + configClient.unlockDeploymentOperationCallable().futureCall(request); + // Do something. + Deployment response = future.get(); + } + } +} +// [END config_v1_generated_Config_UnlockDeployment_LRO_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/SyncUnlockDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/SyncUnlockDeployment.java new file mode 100644 index 000000000000..216ee7675f79 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/SyncUnlockDeployment.java @@ -0,0 +1,47 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_UnlockDeployment_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; +import com.google.cloud.config.v1.UnlockDeploymentRequest; + +public class SyncUnlockDeployment { + + public static void main(String[] args) throws Exception { + syncUnlockDeployment(); + } + + public static void syncUnlockDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + UnlockDeploymentRequest request = + UnlockDeploymentRequest.newBuilder() + .setName(DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString()) + .setLockId(338696367) + .build(); + Deployment response = configClient.unlockDeploymentAsync(request).get(); + } + } +} +// [END config_v1_generated_Config_UnlockDeployment_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/SyncUnlockDeploymentDeploymentnameLong.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/SyncUnlockDeploymentDeploymentnameLong.java new file mode 100644 index 000000000000..a82d33c5eb6c --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/SyncUnlockDeploymentDeploymentnameLong.java @@ -0,0 +1,43 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_UnlockDeployment_DeploymentnameLong_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; + +public class SyncUnlockDeploymentDeploymentnameLong { + + public static void main(String[] args) throws Exception { + syncUnlockDeploymentDeploymentnameLong(); + } + + public static void syncUnlockDeploymentDeploymentnameLong() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]"); + long lockId = 338696367; + Deployment response = configClient.unlockDeploymentAsync(name, lockId).get(); + } + } +} +// [END config_v1_generated_Config_UnlockDeployment_DeploymentnameLong_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/SyncUnlockDeploymentStringLong.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/SyncUnlockDeploymentStringLong.java new file mode 100644 index 000000000000..31cb9e4b9392 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/unlockdeployment/SyncUnlockDeploymentStringLong.java @@ -0,0 +1,43 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_UnlockDeployment_StringLong_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.DeploymentName; + +public class SyncUnlockDeploymentStringLong { + + public static void main(String[] args) throws Exception { + syncUnlockDeploymentStringLong(); + } + + public static void syncUnlockDeploymentStringLong() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + String name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT]").toString(); + long lockId = 338696367; + Deployment response = configClient.unlockDeploymentAsync(name, lockId).get(); + } + } +} +// [END config_v1_generated_Config_UnlockDeployment_StringLong_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/AsyncUpdateDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/AsyncUpdateDeployment.java new file mode 100644 index 000000000000..9cbb12df93f2 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/AsyncUpdateDeployment.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_UpdateDeployment_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.UpdateDeploymentRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDeployment { + + public static void main(String[] args) throws Exception { + asyncUpdateDeployment(); + } + + public static void asyncUpdateDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + UpdateDeploymentRequest request = + UpdateDeploymentRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDeployment(Deployment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = configClient.updateDeploymentCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END config_v1_generated_Config_UpdateDeployment_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/AsyncUpdateDeploymentLRO.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/AsyncUpdateDeploymentLRO.java new file mode 100644 index 000000000000..2cf980a85849 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/AsyncUpdateDeploymentLRO.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. + */ + +package com.google.cloud.config.v1.samples; + +// [START config_v1_generated_Config_UpdateDeployment_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.OperationMetadata; +import com.google.cloud.config.v1.UpdateDeploymentRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDeploymentLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateDeploymentLRO(); + } + + public static void asyncUpdateDeploymentLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + UpdateDeploymentRequest request = + UpdateDeploymentRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDeployment(Deployment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + configClient.updateDeploymentOperationCallable().futureCall(request); + // Do something. + Deployment response = future.get(); + } + } +} +// [END config_v1_generated_Config_UpdateDeployment_LRO_async] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/SyncUpdateDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/SyncUpdateDeployment.java new file mode 100644 index 000000000000..eedb6e10055d --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/SyncUpdateDeployment.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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_UpdateDeployment_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.cloud.config.v1.UpdateDeploymentRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDeployment { + + public static void main(String[] args) throws Exception { + syncUpdateDeployment(); + } + + public static void syncUpdateDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + UpdateDeploymentRequest request = + UpdateDeploymentRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDeployment(Deployment.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Deployment response = configClient.updateDeploymentAsync(request).get(); + } + } +} +// [END config_v1_generated_Config_UpdateDeployment_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/SyncUpdateDeploymentDeploymentFieldmask.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/SyncUpdateDeploymentDeploymentFieldmask.java new file mode 100644 index 000000000000..4b7ba71cb452 --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/updatedeployment/SyncUpdateDeploymentDeploymentFieldmask.java @@ -0,0 +1,43 @@ +/* + * 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.cloud.config.v1.samples; + +// [START config_v1_generated_Config_UpdateDeployment_DeploymentFieldmask_sync] +import com.google.cloud.config.v1.ConfigClient; +import com.google.cloud.config.v1.Deployment; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDeploymentDeploymentFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateDeploymentDeploymentFieldmask(); + } + + public static void syncUpdateDeploymentDeploymentFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConfigClient configClient = ConfigClient.create()) { + Deployment deployment = Deployment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Deployment response = configClient.updateDeploymentAsync(deployment, updateMask).get(); + } + } +} +// [END config_v1_generated_Config_UpdateDeployment_DeploymentFieldmask_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/configsettings/getdeployment/SyncGetDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/configsettings/getdeployment/SyncGetDeployment.java new file mode 100644 index 000000000000..7a9fc674963e --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/configsettings/getdeployment/SyncGetDeployment.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.cloud.config.v1.samples; + +// [START config_v1_generated_ConfigSettings_GetDeployment_sync] +import com.google.cloud.config.v1.ConfigSettings; +import java.time.Duration; + +public class SyncGetDeployment { + + public static void main(String[] args) throws Exception { + syncGetDeployment(); + } + + public static void syncGetDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ConfigSettings.Builder configSettingsBuilder = ConfigSettings.newBuilder(); + configSettingsBuilder + .getDeploymentSettings() + .setRetrySettings( + configSettingsBuilder + .getDeploymentSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ConfigSettings configSettings = configSettingsBuilder.build(); + } +} +// [END config_v1_generated_ConfigSettings_GetDeployment_sync] diff --git a/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/stub/configstubsettings/getdeployment/SyncGetDeployment.java b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/stub/configstubsettings/getdeployment/SyncGetDeployment.java new file mode 100644 index 000000000000..417986e9700c --- /dev/null +++ b/java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/stub/configstubsettings/getdeployment/SyncGetDeployment.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.cloud.config.v1.stub.samples; + +// [START config_v1_generated_ConfigStubSettings_GetDeployment_sync] +import com.google.cloud.config.v1.stub.ConfigStubSettings; +import java.time.Duration; + +public class SyncGetDeployment { + + public static void main(String[] args) throws Exception { + syncGetDeployment(); + } + + public static void syncGetDeployment() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + ConfigStubSettings.Builder configSettingsBuilder = ConfigStubSettings.newBuilder(); + configSettingsBuilder + .getDeploymentSettings() + .setRetrySettings( + configSettingsBuilder + .getDeploymentSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ConfigStubSettings configSettings = configSettingsBuilder.build(); + } +} +// [END config_v1_generated_ConfigStubSettings_GetDeployment_sync] diff --git a/java-vision/google-cloud-vision/native-image-config/jni-config.json b/java-vision/google-cloud-vision/native-image-config/jni-config.json new file mode 100644 index 000000000000..4698fff892fd --- /dev/null +++ b/java-vision/google-cloud-vision/native-image-config/jni-config.json @@ -0,0 +1,210 @@ +[ +{ + "name":"[B" +}, +{ + "name":"[Ljava.lang.String;" +}, +{ + "name":"[[B" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.ChannelException" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.DefaultFileRegion", + "fields":[ + {"name":"file"}, + {"name":"transferred"} + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.epoll.LinuxSocket" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.epoll.Native" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.epoll.NativeDatagramPacketArray$NativeDatagramPacket", + "fields":[ + {"name":"count"}, + {"name":"memoryAddress"}, + {"name":"recipientAddr"}, + {"name":"recipientAddrLen"}, + {"name":"recipientPort"}, + {"name":"recipientScopeId"}, + {"name":"segmentSize"}, + {"name":"senderAddr"}, + {"name":"senderAddrLen"}, + {"name":"senderPort"}, + {"name":"senderScopeId"} + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.epoll.NativeStaticallyReferencedJniMethods" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.Buffer" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.DatagramSocketAddress", + "methods":[{"name":"","parameterTypes":["byte[]","int","int","int","io.grpc.netty.shaded.io.netty.channel.unix.DatagramSocketAddress"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.DomainDatagramSocketAddress", + "methods":[{"name":"","parameterTypes":["byte[]","int","io.grpc.netty.shaded.io.netty.channel.unix.DomainDatagramSocketAddress"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.ErrorsStaticallyReferencedJniMethods" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.FileDescriptor" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.LimitsStaticallyReferencedJniMethods" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.PeerCredentials", + "methods":[{"name":"","parameterTypes":["int","int","int[]"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.Socket" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.handler.ssl.OpenSslClientSessionCache" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.handler.ssl.OpenSslSessionCache", + "methods":[ + {"name":"getSession","parameterTypes":["long","byte[]"] }, + {"name":"sessionCreated","parameterTypes":["long","long"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.handler.ssl.ReferenceCountedOpenSslClientContext$ExtendedTrustManagerVerifyCallback" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.handler.ssl.ReferenceCountedOpenSslContext$AbstractCertificateVerifier", + "methods":[{"name":"verify","parameterTypes":["long","byte[][]","java.lang.String"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.Buffer" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateCallbackTask", + "methods":[{"name":"","parameterTypes":["long","byte[]","byte[][]","io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateCallback"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateVerifierTask", + "methods":[{"name":"","parameterTypes":["long","byte[][]","java.lang.String","io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateVerifier"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.Library" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.NativeStaticallyReferencedJniMethods" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSL" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLContext" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethodDecryptTask", + "methods":[{"name":"","parameterTypes":["long","byte[]","io.grpc.netty.shaded.io.netty.internal.tcnative.AsyncSSLPrivateKeyMethod"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethodSignTask", + "methods":[{"name":"","parameterTypes":["long","int","byte[]","io.grpc.netty.shaded.io.netty.internal.tcnative.AsyncSSLPrivateKeyMethod"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethodTask", + "fields":[{"name":"resultBytes"}] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLSession" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLTask", + "fields":[ + {"name":"complete"}, + {"name":"returnValue"} + ] +}, +{ + "name":"java.io.FileDescriptor", + "fields":[{"name":"fd"}] +}, +{ + "name":"java.io.IOException" +}, +{ + "name":"java.lang.Boolean", + "methods":[{"name":"getBoolean","parameterTypes":["java.lang.String"] }] +}, +{ + "name":"java.lang.Exception" +}, +{ + "name":"java.lang.IllegalArgumentException" +}, +{ + "name":"java.lang.NullPointerException" +}, +{ + "name":"java.lang.OutOfMemoryError" +}, +{ + "name":"java.lang.RuntimeException" +}, +{ + "name":"java.lang.String", + "methods":[ + {"name":"","parameterTypes":["byte[]"] }, + {"name":"getBytes","parameterTypes":[] } + ] +}, +{ + "name":"java.net.InetSocketAddress", + "methods":[{"name":"","parameterTypes":["java.lang.String","int"] }] +}, +{ + "name":"java.net.PortUnreachableException" +}, +{ + "name":"java.nio.Buffer", + "fields":[ + {"name":"limit"}, + {"name":"position"} + ], + "methods":[ + {"name":"limit","parameterTypes":[] }, + {"name":"position","parameterTypes":[] } + ] +}, +{ + "name":"java.nio.DirectByteBuffer" +}, +{ + "name":"java.nio.channels.ClosedChannelException", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.management.VMManagementImpl", + "fields":[ + {"name":"compTimeMonitoringSupport"}, + {"name":"currentThreadCpuTimeSupport"}, + {"name":"objectMonitorUsageSupport"}, + {"name":"otherThreadCpuTimeSupport"}, + {"name":"remoteDiagnosticCommandsSupport"}, + {"name":"synchronizerUsageSupport"}, + {"name":"threadAllocatedMemorySupport"}, + {"name":"threadContentionMonitoringSupport"} + ] +}, +{ + "name":"sun.nio.ch.FileChannelImpl", + "fields":[{"name":"fd"}] +} +] diff --git a/java-vision/google-cloud-vision/native-image-config/predefined-classes-config.json b/java-vision/google-cloud-vision/native-image-config/predefined-classes-config.json new file mode 100644 index 000000000000..0e79b2c5d837 --- /dev/null +++ b/java-vision/google-cloud-vision/native-image-config/predefined-classes-config.json @@ -0,0 +1,8 @@ +[ + { + "type":"agent-extracted", + "classes":[ + ] + } +] + diff --git a/java-vision/google-cloud-vision/native-image-config/proxy-config.json b/java-vision/google-cloud-vision/native-image-config/proxy-config.json new file mode 100644 index 000000000000..0d4f101c7a37 --- /dev/null +++ b/java-vision/google-cloud-vision/native-image-config/proxy-config.json @@ -0,0 +1,2 @@ +[ +] diff --git a/java-vision/google-cloud-vision/native-image-config/reflect-config.json b/java-vision/google-cloud-vision/native-image-config/reflect-config.json new file mode 100644 index 000000000000..ac8b53d87e48 --- /dev/null +++ b/java-vision/google-cloud-vision/native-image-config/reflect-config.json @@ -0,0 +1,1959 @@ +[ +{ + "name":"[B" +}, +{ + "name":"[Ljava.lang.String;" +}, +{ + "name":"[Lsun.security.pkcs.SignerInfo;" +}, +{ + "name":"android.app.Application" +}, +{ + "name":"com.google.api.FieldBehavior", + "methods":[ + {"name":"getValueDescriptor","parameterTypes":[] }, + {"name":"valueOf","parameterTypes":["com.google.protobuf.Descriptors$EnumValueDescriptor"] } + ] +}, +{ + "name":"com.google.api.client.http.GenericUrl", + "allDeclaredFields":true +}, +{ + "name":"com.google.api.client.http.HttpHeaders", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "methods":[ + {"name":"setAccept","parameterTypes":["java.lang.String"] }, + {"name":"setAcceptEncoding","parameterTypes":["java.lang.String"] }, + {"name":"setAge","parameterTypes":["java.lang.Long"] }, + {"name":"setAuthenticate","parameterTypes":["java.lang.String"] }, + {"name":"setAuthorization","parameterTypes":["java.lang.String"] }, + {"name":"setCacheControl","parameterTypes":["java.lang.String"] }, + {"name":"setContentEncoding","parameterTypes":["java.lang.String"] }, + {"name":"setContentLength","parameterTypes":["java.lang.Long"] }, + {"name":"setContentMD5","parameterTypes":["java.lang.String"] }, + {"name":"setContentRange","parameterTypes":["java.lang.String"] }, + {"name":"setContentType","parameterTypes":["java.lang.String"] }, + {"name":"setCookie","parameterTypes":["java.lang.String"] }, + {"name":"setDate","parameterTypes":["java.lang.String"] }, + {"name":"setETag","parameterTypes":["java.lang.String"] }, + {"name":"setExpires","parameterTypes":["java.lang.String"] }, + {"name":"setIfMatch","parameterTypes":["java.lang.String"] }, + {"name":"setIfModifiedSince","parameterTypes":["java.lang.String"] }, + {"name":"setIfNoneMatch","parameterTypes":["java.lang.String"] }, + {"name":"setIfRange","parameterTypes":["java.lang.String"] }, + {"name":"setIfUnmodifiedSince","parameterTypes":["java.lang.String"] }, + {"name":"setLastModified","parameterTypes":["java.lang.String"] }, + {"name":"setLocation","parameterTypes":["java.lang.String"] }, + {"name":"setMimeVersion","parameterTypes":["java.lang.String"] }, + {"name":"setRange","parameterTypes":["java.lang.String"] }, + {"name":"setRetryAfter","parameterTypes":["java.lang.String"] }, + {"name":"setUserAgent","parameterTypes":["java.lang.String"] } + ] +}, +{ + "name":"com.google.api.client.json.GenericJson", + "allDeclaredFields":true, + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.google.api.client.util.GenericData", + "allDeclaredFields":true, + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.google.auth.appengine.AppEngineCredentials" +}, +{ + "name":"com.google.auth.oauth2.GoogleCredentials", + "methods":[{"name":"getQuotaProjectId","parameterTypes":[] }] +}, +{ + "name":"com.google.auth.oauth2.ServiceAccountCredentials", + "methods":[ + {"name":"getClientEmail","parameterTypes":[] }, + {"name":"getClientId","parameterTypes":[] }, + {"name":"getPrivateKey","parameterTypes":[] }, + {"name":"getPrivateKeyId","parameterTypes":[] }, + {"name":"getScopes","parameterTypes":[] } + ] +}, +{ + "name":"com.google.auth.oauth2.ServiceAccountJwtAccessCredentials", + "methods":[{"name":"newBuilder","parameterTypes":[] }] +}, +{ + "name":"com.google.auth.oauth2.ServiceAccountJwtAccessCredentials$Builder", + "methods":[ + {"name":"build","parameterTypes":[] }, + {"name":"setClientEmail","parameterTypes":["java.lang.String"] }, + {"name":"setClientId","parameterTypes":["java.lang.String"] }, + {"name":"setPrivateKey","parameterTypes":["java.security.PrivateKey"] }, + {"name":"setPrivateKeyId","parameterTypes":["java.lang.String"] }, + {"name":"setQuotaProjectId","parameterTypes":["java.lang.String"] } + ] +}, +{ + "name":"com.google.cloud.vision.it.ITSystemTest", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllPublicConstructors":true, + "methods":[ + {"name":"","parameterTypes":[] }, + {"name":"detectCropHintsGcsTest","parameterTypes":[] }, + {"name":"detectCropHintsTest","parameterTypes":[] }, + {"name":"detectDocumentTextGcs","parameterTypes":[] }, + {"name":"detectDocumentTextTest","parameterTypes":[] }, + {"name":"detectFacesGcsTest","parameterTypes":[] }, + {"name":"detectFacesTest","parameterTypes":[] }, + {"name":"detectLabelsGcsTest","parameterTypes":[] }, + {"name":"detectLabelsTest","parameterTypes":[] }, + {"name":"detectLandmarksGcsTest","parameterTypes":[] }, + {"name":"detectLandmarksTest","parameterTypes":[] }, + {"name":"detectLandmarksUrlTest","parameterTypes":[] }, + {"name":"detectLocalizedObjectsGcsTest","parameterTypes":[] }, + {"name":"detectLocalizedObjectsTest","parameterTypes":[] }, + {"name":"detectLogosGcsTest","parameterTypes":[] }, + {"name":"detectLogosTest","parameterTypes":[] }, + {"name":"detectPropertiesGcsTest","parameterTypes":[] }, + {"name":"detectPropertiesTest","parameterTypes":[] }, + {"name":"detectSafeSearchGcsTest","parameterTypes":[] }, + {"name":"detectSafeSearchTest","parameterTypes":[] }, + {"name":"detectTextGcsTest","parameterTypes":[] }, + {"name":"detectTextTest","parameterTypes":[] }, + {"name":"detectWebEntitiesGcsTest","parameterTypes":[] }, + {"name":"detectWebEntitiesIncludeGeoResultsGcsTest","parameterTypes":[] }, + {"name":"detectWebEntitiesIncludeGeoResultsTest","parameterTypes":[] }, + {"name":"detectWebEntitiesTest","parameterTypes":[] }, + {"name":"getProductSetTest","parameterTypes":[] }, + {"name":"getProductTest","parameterTypes":[] }, + {"name":"getReferenceImageTest","parameterTypes":[] }, + {"name":"listProductSetsTest","parameterTypes":[] }, + {"name":"listProductsInProductSetTest","parameterTypes":[] }, + {"name":"listProductsTest","parameterTypes":[] }, + {"name":"listReferenceImagesTest","parameterTypes":[] }, + {"name":"setUp","parameterTypes":[] }, + {"name":"tearDown","parameterTypes":[] }, + {"name":"updateProductTest","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.AnnotateImageResponse", + "methods":[ + {"name":"getContext","parameterTypes":[] }, + {"name":"getCropHintsAnnotation","parameterTypes":[] }, + {"name":"getError","parameterTypes":[] }, + {"name":"getFaceAnnotations","parameterTypes":["int"] }, + {"name":"getFaceAnnotationsCount","parameterTypes":[] }, + {"name":"getFaceAnnotationsList","parameterTypes":[] }, + {"name":"getFullTextAnnotation","parameterTypes":[] }, + {"name":"getImagePropertiesAnnotation","parameterTypes":[] }, + {"name":"getLabelAnnotations","parameterTypes":["int"] }, + {"name":"getLabelAnnotationsCount","parameterTypes":[] }, + {"name":"getLabelAnnotationsList","parameterTypes":[] }, + {"name":"getLandmarkAnnotations","parameterTypes":["int"] }, + {"name":"getLandmarkAnnotationsCount","parameterTypes":[] }, + {"name":"getLandmarkAnnotationsList","parameterTypes":[] }, + {"name":"getLocalizedObjectAnnotations","parameterTypes":["int"] }, + {"name":"getLocalizedObjectAnnotationsCount","parameterTypes":[] }, + {"name":"getLocalizedObjectAnnotationsList","parameterTypes":[] }, + {"name":"getLogoAnnotations","parameterTypes":["int"] }, + {"name":"getLogoAnnotationsCount","parameterTypes":[] }, + {"name":"getLogoAnnotationsList","parameterTypes":[] }, + {"name":"getProductSearchResults","parameterTypes":[] }, + {"name":"getSafeSearchAnnotation","parameterTypes":[] }, + {"name":"getTextAnnotations","parameterTypes":["int"] }, + {"name":"getTextAnnotationsCount","parameterTypes":[] }, + {"name":"getTextAnnotationsList","parameterTypes":[] }, + {"name":"getWebDetection","parameterTypes":[] }, + {"name":"hasContext","parameterTypes":[] }, + {"name":"hasCropHintsAnnotation","parameterTypes":[] }, + {"name":"hasError","parameterTypes":[] }, + {"name":"hasFullTextAnnotation","parameterTypes":[] }, + {"name":"hasImagePropertiesAnnotation","parameterTypes":[] }, + {"name":"hasProductSearchResults","parameterTypes":[] }, + {"name":"hasSafeSearchAnnotation","parameterTypes":[] }, + {"name":"hasWebDetection","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.AnnotateImageResponse$Builder", + "methods":[ + {"name":"addFaceAnnotations","parameterTypes":["com.google.cloud.vision.v1.FaceAnnotation"] }, + {"name":"addLabelAnnotations","parameterTypes":["com.google.cloud.vision.v1.EntityAnnotation"] }, + {"name":"addLandmarkAnnotations","parameterTypes":["com.google.cloud.vision.v1.EntityAnnotation"] }, + {"name":"addLocalizedObjectAnnotations","parameterTypes":["com.google.cloud.vision.v1.LocalizedObjectAnnotation"] }, + {"name":"addLogoAnnotations","parameterTypes":["com.google.cloud.vision.v1.EntityAnnotation"] }, + {"name":"addTextAnnotations","parameterTypes":["com.google.cloud.vision.v1.EntityAnnotation"] }, + {"name":"clearContext","parameterTypes":[] }, + {"name":"clearCropHintsAnnotation","parameterTypes":[] }, + {"name":"clearError","parameterTypes":[] }, + {"name":"clearFaceAnnotations","parameterTypes":[] }, + {"name":"clearFullTextAnnotation","parameterTypes":[] }, + {"name":"clearImagePropertiesAnnotation","parameterTypes":[] }, + {"name":"clearLabelAnnotations","parameterTypes":[] }, + {"name":"clearLandmarkAnnotations","parameterTypes":[] }, + {"name":"clearLocalizedObjectAnnotations","parameterTypes":[] }, + {"name":"clearLogoAnnotations","parameterTypes":[] }, + {"name":"clearProductSearchResults","parameterTypes":[] }, + {"name":"clearSafeSearchAnnotation","parameterTypes":[] }, + {"name":"clearTextAnnotations","parameterTypes":[] }, + {"name":"clearWebDetection","parameterTypes":[] }, + {"name":"getContext","parameterTypes":[] }, + {"name":"getContextBuilder","parameterTypes":[] }, + {"name":"getCropHintsAnnotation","parameterTypes":[] }, + {"name":"getCropHintsAnnotationBuilder","parameterTypes":[] }, + {"name":"getError","parameterTypes":[] }, + {"name":"getErrorBuilder","parameterTypes":[] }, + {"name":"getFaceAnnotations","parameterTypes":["int"] }, + {"name":"getFaceAnnotationsBuilder","parameterTypes":["int"] }, + {"name":"getFaceAnnotationsCount","parameterTypes":[] }, + {"name":"getFaceAnnotationsList","parameterTypes":[] }, + {"name":"getFullTextAnnotation","parameterTypes":[] }, + {"name":"getFullTextAnnotationBuilder","parameterTypes":[] }, + {"name":"getImagePropertiesAnnotation","parameterTypes":[] }, + {"name":"getImagePropertiesAnnotationBuilder","parameterTypes":[] }, + {"name":"getLabelAnnotations","parameterTypes":["int"] }, + {"name":"getLabelAnnotationsBuilder","parameterTypes":["int"] }, + {"name":"getLabelAnnotationsCount","parameterTypes":[] }, + {"name":"getLabelAnnotationsList","parameterTypes":[] }, + {"name":"getLandmarkAnnotations","parameterTypes":["int"] }, + {"name":"getLandmarkAnnotationsBuilder","parameterTypes":["int"] }, + {"name":"getLandmarkAnnotationsCount","parameterTypes":[] }, + {"name":"getLandmarkAnnotationsList","parameterTypes":[] }, + {"name":"getLocalizedObjectAnnotations","parameterTypes":["int"] }, + {"name":"getLocalizedObjectAnnotationsBuilder","parameterTypes":["int"] }, + {"name":"getLocalizedObjectAnnotationsCount","parameterTypes":[] }, + {"name":"getLocalizedObjectAnnotationsList","parameterTypes":[] }, + {"name":"getLogoAnnotations","parameterTypes":["int"] }, + {"name":"getLogoAnnotationsBuilder","parameterTypes":["int"] }, + {"name":"getLogoAnnotationsCount","parameterTypes":[] }, + {"name":"getLogoAnnotationsList","parameterTypes":[] }, + {"name":"getProductSearchResults","parameterTypes":[] }, + {"name":"getProductSearchResultsBuilder","parameterTypes":[] }, + {"name":"getSafeSearchAnnotation","parameterTypes":[] }, + {"name":"getSafeSearchAnnotationBuilder","parameterTypes":[] }, + {"name":"getTextAnnotations","parameterTypes":["int"] }, + {"name":"getTextAnnotationsBuilder","parameterTypes":["int"] }, + {"name":"getTextAnnotationsCount","parameterTypes":[] }, + {"name":"getTextAnnotationsList","parameterTypes":[] }, + {"name":"getWebDetection","parameterTypes":[] }, + {"name":"getWebDetectionBuilder","parameterTypes":[] }, + {"name":"hasContext","parameterTypes":[] }, + {"name":"hasCropHintsAnnotation","parameterTypes":[] }, + {"name":"hasError","parameterTypes":[] }, + {"name":"hasFullTextAnnotation","parameterTypes":[] }, + {"name":"hasImagePropertiesAnnotation","parameterTypes":[] }, + {"name":"hasProductSearchResults","parameterTypes":[] }, + {"name":"hasSafeSearchAnnotation","parameterTypes":[] }, + {"name":"hasWebDetection","parameterTypes":[] }, + {"name":"setContext","parameterTypes":["com.google.cloud.vision.v1.ImageAnnotationContext"] }, + {"name":"setCropHintsAnnotation","parameterTypes":["com.google.cloud.vision.v1.CropHintsAnnotation"] }, + {"name":"setError","parameterTypes":["com.google.rpc.Status"] }, + {"name":"setFaceAnnotations","parameterTypes":["int","com.google.cloud.vision.v1.FaceAnnotation"] }, + {"name":"setFullTextAnnotation","parameterTypes":["com.google.cloud.vision.v1.TextAnnotation"] }, + {"name":"setImagePropertiesAnnotation","parameterTypes":["com.google.cloud.vision.v1.ImageProperties"] }, + {"name":"setLabelAnnotations","parameterTypes":["int","com.google.cloud.vision.v1.EntityAnnotation"] }, + {"name":"setLandmarkAnnotations","parameterTypes":["int","com.google.cloud.vision.v1.EntityAnnotation"] }, + {"name":"setLocalizedObjectAnnotations","parameterTypes":["int","com.google.cloud.vision.v1.LocalizedObjectAnnotation"] }, + {"name":"setLogoAnnotations","parameterTypes":["int","com.google.cloud.vision.v1.EntityAnnotation"] }, + {"name":"setProductSearchResults","parameterTypes":["com.google.cloud.vision.v1.ProductSearchResults"] }, + {"name":"setSafeSearchAnnotation","parameterTypes":["com.google.cloud.vision.v1.SafeSearchAnnotation"] }, + {"name":"setTextAnnotations","parameterTypes":["int","com.google.cloud.vision.v1.EntityAnnotation"] }, + {"name":"setWebDetection","parameterTypes":["com.google.cloud.vision.v1.WebDetection"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Block", + "methods":[ + {"name":"getBlockType","parameterTypes":[] }, + {"name":"getBlockTypeValue","parameterTypes":[] }, + {"name":"getBoundingBox","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getParagraphs","parameterTypes":["int"] }, + {"name":"getParagraphsCount","parameterTypes":[] }, + {"name":"getParagraphsList","parameterTypes":[] }, + {"name":"getProperty","parameterTypes":[] }, + {"name":"hasBoundingBox","parameterTypes":[] }, + {"name":"hasProperty","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Block$BlockType", + "methods":[ + {"name":"getValueDescriptor","parameterTypes":[] }, + {"name":"valueOf","parameterTypes":["com.google.protobuf.Descriptors$EnumValueDescriptor"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Block$Builder", + "methods":[ + {"name":"addParagraphs","parameterTypes":["com.google.cloud.vision.v1.Paragraph"] }, + {"name":"clearBlockType","parameterTypes":[] }, + {"name":"clearBoundingBox","parameterTypes":[] }, + {"name":"clearConfidence","parameterTypes":[] }, + {"name":"clearParagraphs","parameterTypes":[] }, + {"name":"clearProperty","parameterTypes":[] }, + {"name":"getBlockType","parameterTypes":[] }, + {"name":"getBlockTypeValue","parameterTypes":[] }, + {"name":"getBoundingBox","parameterTypes":[] }, + {"name":"getBoundingBoxBuilder","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getParagraphs","parameterTypes":["int"] }, + {"name":"getParagraphsBuilder","parameterTypes":["int"] }, + {"name":"getParagraphsCount","parameterTypes":[] }, + {"name":"getParagraphsList","parameterTypes":[] }, + {"name":"getProperty","parameterTypes":[] }, + {"name":"getPropertyBuilder","parameterTypes":[] }, + {"name":"hasBoundingBox","parameterTypes":[] }, + {"name":"hasProperty","parameterTypes":[] }, + {"name":"setBlockType","parameterTypes":["com.google.cloud.vision.v1.Block$BlockType"] }, + {"name":"setBlockTypeValue","parameterTypes":["int"] }, + {"name":"setBoundingBox","parameterTypes":["com.google.cloud.vision.v1.BoundingPoly"] }, + {"name":"setConfidence","parameterTypes":["float"] }, + {"name":"setParagraphs","parameterTypes":["int","com.google.cloud.vision.v1.Paragraph"] }, + {"name":"setProperty","parameterTypes":["com.google.cloud.vision.v1.TextAnnotation$TextProperty"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.BoundingPoly", + "methods":[ + {"name":"getNormalizedVertices","parameterTypes":["int"] }, + {"name":"getNormalizedVerticesCount","parameterTypes":[] }, + {"name":"getNormalizedVerticesList","parameterTypes":[] }, + {"name":"getVertices","parameterTypes":["int"] }, + {"name":"getVerticesCount","parameterTypes":[] }, + {"name":"getVerticesList","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.BoundingPoly$Builder", + "methods":[ + {"name":"addNormalizedVertices","parameterTypes":["com.google.cloud.vision.v1.NormalizedVertex"] }, + {"name":"addVertices","parameterTypes":["com.google.cloud.vision.v1.Vertex"] }, + {"name":"clearNormalizedVertices","parameterTypes":[] }, + {"name":"clearVertices","parameterTypes":[] }, + {"name":"getNormalizedVertices","parameterTypes":["int"] }, + {"name":"getNormalizedVerticesBuilder","parameterTypes":["int"] }, + {"name":"getNormalizedVerticesCount","parameterTypes":[] }, + {"name":"getNormalizedVerticesList","parameterTypes":[] }, + {"name":"getVertices","parameterTypes":["int"] }, + {"name":"getVerticesBuilder","parameterTypes":["int"] }, + {"name":"getVerticesCount","parameterTypes":[] }, + {"name":"getVerticesList","parameterTypes":[] }, + {"name":"setNormalizedVertices","parameterTypes":["int","com.google.cloud.vision.v1.NormalizedVertex"] }, + {"name":"setVertices","parameterTypes":["int","com.google.cloud.vision.v1.Vertex"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.ColorInfo", + "methods":[ + {"name":"getColor","parameterTypes":[] }, + {"name":"getPixelFraction","parameterTypes":[] }, + {"name":"getScore","parameterTypes":[] }, + {"name":"hasColor","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.ColorInfo$Builder", + "methods":[ + {"name":"clearColor","parameterTypes":[] }, + {"name":"clearPixelFraction","parameterTypes":[] }, + {"name":"clearScore","parameterTypes":[] }, + {"name":"getColor","parameterTypes":[] }, + {"name":"getColorBuilder","parameterTypes":[] }, + {"name":"getPixelFraction","parameterTypes":[] }, + {"name":"getScore","parameterTypes":[] }, + {"name":"hasColor","parameterTypes":[] }, + {"name":"setColor","parameterTypes":["com.google.type.Color"] }, + {"name":"setPixelFraction","parameterTypes":["float"] }, + {"name":"setScore","parameterTypes":["float"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.CropHint", + "methods":[ + {"name":"getBoundingPoly","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getImportanceFraction","parameterTypes":[] }, + {"name":"hasBoundingPoly","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.CropHint$Builder", + "methods":[ + {"name":"clearBoundingPoly","parameterTypes":[] }, + {"name":"clearConfidence","parameterTypes":[] }, + {"name":"clearImportanceFraction","parameterTypes":[] }, + {"name":"getBoundingPoly","parameterTypes":[] }, + {"name":"getBoundingPolyBuilder","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getImportanceFraction","parameterTypes":[] }, + {"name":"hasBoundingPoly","parameterTypes":[] }, + {"name":"setBoundingPoly","parameterTypes":["com.google.cloud.vision.v1.BoundingPoly"] }, + {"name":"setConfidence","parameterTypes":["float"] }, + {"name":"setImportanceFraction","parameterTypes":["float"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.CropHintsAnnotation", + "methods":[ + {"name":"getCropHints","parameterTypes":["int"] }, + {"name":"getCropHintsCount","parameterTypes":[] }, + {"name":"getCropHintsList","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.CropHintsAnnotation$Builder", + "methods":[ + {"name":"addCropHints","parameterTypes":["com.google.cloud.vision.v1.CropHint"] }, + {"name":"clearCropHints","parameterTypes":[] }, + {"name":"getCropHints","parameterTypes":["int"] }, + {"name":"getCropHintsBuilder","parameterTypes":["int"] }, + {"name":"getCropHintsCount","parameterTypes":[] }, + {"name":"getCropHintsList","parameterTypes":[] }, + {"name":"setCropHints","parameterTypes":["int","com.google.cloud.vision.v1.CropHint"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.DominantColorsAnnotation", + "methods":[ + {"name":"getColors","parameterTypes":["int"] }, + {"name":"getColorsCount","parameterTypes":[] }, + {"name":"getColorsList","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.DominantColorsAnnotation$Builder", + "methods":[ + {"name":"addColors","parameterTypes":["com.google.cloud.vision.v1.ColorInfo"] }, + {"name":"clearColors","parameterTypes":[] }, + {"name":"getColors","parameterTypes":["int"] }, + {"name":"getColorsBuilder","parameterTypes":["int"] }, + {"name":"getColorsCount","parameterTypes":[] }, + {"name":"getColorsList","parameterTypes":[] }, + {"name":"setColors","parameterTypes":["int","com.google.cloud.vision.v1.ColorInfo"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.EntityAnnotation", + "methods":[ + {"name":"getBoundingPoly","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getDescription","parameterTypes":[] }, + {"name":"getDescriptionBytes","parameterTypes":[] }, + {"name":"getLocale","parameterTypes":[] }, + {"name":"getLocaleBytes","parameterTypes":[] }, + {"name":"getLocations","parameterTypes":["int"] }, + {"name":"getLocationsCount","parameterTypes":[] }, + {"name":"getLocationsList","parameterTypes":[] }, + {"name":"getMid","parameterTypes":[] }, + {"name":"getMidBytes","parameterTypes":[] }, + {"name":"getProperties","parameterTypes":["int"] }, + {"name":"getPropertiesCount","parameterTypes":[] }, + {"name":"getPropertiesList","parameterTypes":[] }, + {"name":"getScore","parameterTypes":[] }, + {"name":"getTopicality","parameterTypes":[] }, + {"name":"hasBoundingPoly","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.EntityAnnotation$Builder", + "methods":[ + {"name":"addLocations","parameterTypes":["com.google.cloud.vision.v1.LocationInfo"] }, + {"name":"addProperties","parameterTypes":["com.google.cloud.vision.v1.Property"] }, + {"name":"clearBoundingPoly","parameterTypes":[] }, + {"name":"clearConfidence","parameterTypes":[] }, + {"name":"clearDescription","parameterTypes":[] }, + {"name":"clearLocale","parameterTypes":[] }, + {"name":"clearLocations","parameterTypes":[] }, + {"name":"clearMid","parameterTypes":[] }, + {"name":"clearProperties","parameterTypes":[] }, + {"name":"clearScore","parameterTypes":[] }, + {"name":"clearTopicality","parameterTypes":[] }, + {"name":"getBoundingPoly","parameterTypes":[] }, + {"name":"getBoundingPolyBuilder","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getDescription","parameterTypes":[] }, + {"name":"getLocale","parameterTypes":[] }, + {"name":"getLocations","parameterTypes":["int"] }, + {"name":"getLocationsBuilder","parameterTypes":["int"] }, + {"name":"getLocationsCount","parameterTypes":[] }, + {"name":"getLocationsList","parameterTypes":[] }, + {"name":"getMid","parameterTypes":[] }, + {"name":"getProperties","parameterTypes":["int"] }, + {"name":"getPropertiesBuilder","parameterTypes":["int"] }, + {"name":"getPropertiesCount","parameterTypes":[] }, + {"name":"getPropertiesList","parameterTypes":[] }, + {"name":"getScore","parameterTypes":[] }, + {"name":"getTopicality","parameterTypes":[] }, + {"name":"hasBoundingPoly","parameterTypes":[] }, + {"name":"setBoundingPoly","parameterTypes":["com.google.cloud.vision.v1.BoundingPoly"] }, + {"name":"setConfidence","parameterTypes":["float"] }, + {"name":"setDescription","parameterTypes":["java.lang.String"] }, + {"name":"setDescriptionBytes","parameterTypes":["com.google.protobuf.ByteString"] }, + {"name":"setLocale","parameterTypes":["java.lang.String"] }, + {"name":"setLocaleBytes","parameterTypes":["com.google.protobuf.ByteString"] }, + {"name":"setLocations","parameterTypes":["int","com.google.cloud.vision.v1.LocationInfo"] }, + {"name":"setMid","parameterTypes":["java.lang.String"] }, + {"name":"setMidBytes","parameterTypes":["com.google.protobuf.ByteString"] }, + {"name":"setProperties","parameterTypes":["int","com.google.cloud.vision.v1.Property"] }, + {"name":"setScore","parameterTypes":["float"] }, + {"name":"setTopicality","parameterTypes":["float"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.FaceAnnotation", + "methods":[ + {"name":"getAngerLikelihood","parameterTypes":[] }, + {"name":"getAngerLikelihoodValue","parameterTypes":[] }, + {"name":"getBlurredLikelihood","parameterTypes":[] }, + {"name":"getBlurredLikelihoodValue","parameterTypes":[] }, + {"name":"getBoundingPoly","parameterTypes":[] }, + {"name":"getDetectionConfidence","parameterTypes":[] }, + {"name":"getFdBoundingPoly","parameterTypes":[] }, + {"name":"getHeadwearLikelihood","parameterTypes":[] }, + {"name":"getHeadwearLikelihoodValue","parameterTypes":[] }, + {"name":"getJoyLikelihood","parameterTypes":[] }, + {"name":"getJoyLikelihoodValue","parameterTypes":[] }, + {"name":"getLandmarkingConfidence","parameterTypes":[] }, + {"name":"getLandmarks","parameterTypes":["int"] }, + {"name":"getLandmarksCount","parameterTypes":[] }, + {"name":"getLandmarksList","parameterTypes":[] }, + {"name":"getPanAngle","parameterTypes":[] }, + {"name":"getRollAngle","parameterTypes":[] }, + {"name":"getSorrowLikelihood","parameterTypes":[] }, + {"name":"getSorrowLikelihoodValue","parameterTypes":[] }, + {"name":"getSurpriseLikelihood","parameterTypes":[] }, + {"name":"getSurpriseLikelihoodValue","parameterTypes":[] }, + {"name":"getTiltAngle","parameterTypes":[] }, + {"name":"getUnderExposedLikelihood","parameterTypes":[] }, + {"name":"getUnderExposedLikelihoodValue","parameterTypes":[] }, + {"name":"hasBoundingPoly","parameterTypes":[] }, + {"name":"hasFdBoundingPoly","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.FaceAnnotation$Builder", + "methods":[ + {"name":"addLandmarks","parameterTypes":["com.google.cloud.vision.v1.FaceAnnotation$Landmark"] }, + {"name":"clearAngerLikelihood","parameterTypes":[] }, + {"name":"clearBlurredLikelihood","parameterTypes":[] }, + {"name":"clearBoundingPoly","parameterTypes":[] }, + {"name":"clearDetectionConfidence","parameterTypes":[] }, + {"name":"clearFdBoundingPoly","parameterTypes":[] }, + {"name":"clearHeadwearLikelihood","parameterTypes":[] }, + {"name":"clearJoyLikelihood","parameterTypes":[] }, + {"name":"clearLandmarkingConfidence","parameterTypes":[] }, + {"name":"clearLandmarks","parameterTypes":[] }, + {"name":"clearPanAngle","parameterTypes":[] }, + {"name":"clearRollAngle","parameterTypes":[] }, + {"name":"clearSorrowLikelihood","parameterTypes":[] }, + {"name":"clearSurpriseLikelihood","parameterTypes":[] }, + {"name":"clearTiltAngle","parameterTypes":[] }, + {"name":"clearUnderExposedLikelihood","parameterTypes":[] }, + {"name":"getAngerLikelihood","parameterTypes":[] }, + {"name":"getAngerLikelihoodValue","parameterTypes":[] }, + {"name":"getBlurredLikelihood","parameterTypes":[] }, + {"name":"getBlurredLikelihoodValue","parameterTypes":[] }, + {"name":"getBoundingPoly","parameterTypes":[] }, + {"name":"getBoundingPolyBuilder","parameterTypes":[] }, + {"name":"getDetectionConfidence","parameterTypes":[] }, + {"name":"getFdBoundingPoly","parameterTypes":[] }, + {"name":"getFdBoundingPolyBuilder","parameterTypes":[] }, + {"name":"getHeadwearLikelihood","parameterTypes":[] }, + {"name":"getHeadwearLikelihoodValue","parameterTypes":[] }, + {"name":"getJoyLikelihood","parameterTypes":[] }, + {"name":"getJoyLikelihoodValue","parameterTypes":[] }, + {"name":"getLandmarkingConfidence","parameterTypes":[] }, + {"name":"getLandmarks","parameterTypes":["int"] }, + {"name":"getLandmarksBuilder","parameterTypes":["int"] }, + {"name":"getLandmarksCount","parameterTypes":[] }, + {"name":"getLandmarksList","parameterTypes":[] }, + {"name":"getPanAngle","parameterTypes":[] }, + {"name":"getRollAngle","parameterTypes":[] }, + {"name":"getSorrowLikelihood","parameterTypes":[] }, + {"name":"getSorrowLikelihoodValue","parameterTypes":[] }, + {"name":"getSurpriseLikelihood","parameterTypes":[] }, + {"name":"getSurpriseLikelihoodValue","parameterTypes":[] }, + {"name":"getTiltAngle","parameterTypes":[] }, + {"name":"getUnderExposedLikelihood","parameterTypes":[] }, + {"name":"getUnderExposedLikelihoodValue","parameterTypes":[] }, + {"name":"hasBoundingPoly","parameterTypes":[] }, + {"name":"hasFdBoundingPoly","parameterTypes":[] }, + {"name":"setAngerLikelihood","parameterTypes":["com.google.cloud.vision.v1.Likelihood"] }, + {"name":"setAngerLikelihoodValue","parameterTypes":["int"] }, + {"name":"setBlurredLikelihood","parameterTypes":["com.google.cloud.vision.v1.Likelihood"] }, + {"name":"setBlurredLikelihoodValue","parameterTypes":["int"] }, + {"name":"setBoundingPoly","parameterTypes":["com.google.cloud.vision.v1.BoundingPoly"] }, + {"name":"setDetectionConfidence","parameterTypes":["float"] }, + {"name":"setFdBoundingPoly","parameterTypes":["com.google.cloud.vision.v1.BoundingPoly"] }, + {"name":"setHeadwearLikelihood","parameterTypes":["com.google.cloud.vision.v1.Likelihood"] }, + {"name":"setHeadwearLikelihoodValue","parameterTypes":["int"] }, + {"name":"setJoyLikelihood","parameterTypes":["com.google.cloud.vision.v1.Likelihood"] }, + {"name":"setJoyLikelihoodValue","parameterTypes":["int"] }, + {"name":"setLandmarkingConfidence","parameterTypes":["float"] }, + {"name":"setLandmarks","parameterTypes":["int","com.google.cloud.vision.v1.FaceAnnotation$Landmark"] }, + {"name":"setPanAngle","parameterTypes":["float"] }, + {"name":"setRollAngle","parameterTypes":["float"] }, + {"name":"setSorrowLikelihood","parameterTypes":["com.google.cloud.vision.v1.Likelihood"] }, + {"name":"setSorrowLikelihoodValue","parameterTypes":["int"] }, + {"name":"setSurpriseLikelihood","parameterTypes":["com.google.cloud.vision.v1.Likelihood"] }, + {"name":"setSurpriseLikelihoodValue","parameterTypes":["int"] }, + {"name":"setTiltAngle","parameterTypes":["float"] }, + {"name":"setUnderExposedLikelihood","parameterTypes":["com.google.cloud.vision.v1.Likelihood"] }, + {"name":"setUnderExposedLikelihoodValue","parameterTypes":["int"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.FaceAnnotation$Landmark", + "methods":[ + {"name":"getPosition","parameterTypes":[] }, + {"name":"getType","parameterTypes":[] }, + {"name":"getTypeValue","parameterTypes":[] }, + {"name":"hasPosition","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.FaceAnnotation$Landmark$Builder", + "methods":[ + {"name":"clearPosition","parameterTypes":[] }, + {"name":"clearType","parameterTypes":[] }, + {"name":"getPosition","parameterTypes":[] }, + {"name":"getPositionBuilder","parameterTypes":[] }, + {"name":"getType","parameterTypes":[] }, + {"name":"getTypeValue","parameterTypes":[] }, + {"name":"hasPosition","parameterTypes":[] }, + {"name":"setPosition","parameterTypes":["com.google.cloud.vision.v1.Position"] }, + {"name":"setType","parameterTypes":["com.google.cloud.vision.v1.FaceAnnotation$Landmark$Type"] }, + {"name":"setTypeValue","parameterTypes":["int"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.FaceAnnotation$Landmark$Type", + "methods":[ + {"name":"getValueDescriptor","parameterTypes":[] }, + {"name":"valueOf","parameterTypes":["com.google.protobuf.Descriptors$EnumValueDescriptor"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.ImageAnnotationContext", + "methods":[{"name":"newBuilder","parameterTypes":[] }] +}, +{ + "name":"com.google.cloud.vision.v1.ImageProperties", + "methods":[ + {"name":"getDominantColors","parameterTypes":[] }, + {"name":"hasDominantColors","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.ImageProperties$Builder", + "methods":[ + {"name":"clearDominantColors","parameterTypes":[] }, + {"name":"getDominantColors","parameterTypes":[] }, + {"name":"getDominantColorsBuilder","parameterTypes":[] }, + {"name":"hasDominantColors","parameterTypes":[] }, + {"name":"setDominantColors","parameterTypes":["com.google.cloud.vision.v1.DominantColorsAnnotation"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Likelihood", + "methods":[ + {"name":"getValueDescriptor","parameterTypes":[] }, + {"name":"valueOf","parameterTypes":["com.google.protobuf.Descriptors$EnumValueDescriptor"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.LocalizedObjectAnnotation", + "methods":[ + {"name":"getBoundingPoly","parameterTypes":[] }, + {"name":"getLanguageCode","parameterTypes":[] }, + {"name":"getLanguageCodeBytes","parameterTypes":[] }, + {"name":"getMid","parameterTypes":[] }, + {"name":"getMidBytes","parameterTypes":[] }, + {"name":"getName","parameterTypes":[] }, + {"name":"getNameBytes","parameterTypes":[] }, + {"name":"getScore","parameterTypes":[] }, + {"name":"hasBoundingPoly","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.LocalizedObjectAnnotation$Builder", + "methods":[ + {"name":"clearBoundingPoly","parameterTypes":[] }, + {"name":"clearLanguageCode","parameterTypes":[] }, + {"name":"clearMid","parameterTypes":[] }, + {"name":"clearName","parameterTypes":[] }, + {"name":"clearScore","parameterTypes":[] }, + {"name":"getBoundingPoly","parameterTypes":[] }, + {"name":"getBoundingPolyBuilder","parameterTypes":[] }, + {"name":"getLanguageCode","parameterTypes":[] }, + {"name":"getMid","parameterTypes":[] }, + {"name":"getName","parameterTypes":[] }, + {"name":"getScore","parameterTypes":[] }, + {"name":"hasBoundingPoly","parameterTypes":[] }, + {"name":"setBoundingPoly","parameterTypes":["com.google.cloud.vision.v1.BoundingPoly"] }, + {"name":"setLanguageCode","parameterTypes":["java.lang.String"] }, + {"name":"setLanguageCodeBytes","parameterTypes":["com.google.protobuf.ByteString"] }, + {"name":"setMid","parameterTypes":["java.lang.String"] }, + {"name":"setMidBytes","parameterTypes":["com.google.protobuf.ByteString"] }, + {"name":"setName","parameterTypes":["java.lang.String"] }, + {"name":"setNameBytes","parameterTypes":["com.google.protobuf.ByteString"] }, + {"name":"setScore","parameterTypes":["float"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.LocationInfo", + "methods":[ + {"name":"getLatLng","parameterTypes":[] }, + {"name":"hasLatLng","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.LocationInfo$Builder", + "methods":[ + {"name":"clearLatLng","parameterTypes":[] }, + {"name":"getLatLng","parameterTypes":[] }, + {"name":"getLatLngBuilder","parameterTypes":[] }, + {"name":"hasLatLng","parameterTypes":[] }, + {"name":"setLatLng","parameterTypes":["com.google.type.LatLng"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.NormalizedVertex", + "methods":[ + {"name":"getX","parameterTypes":[] }, + {"name":"getY","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.NormalizedVertex$Builder", + "methods":[ + {"name":"clearX","parameterTypes":[] }, + {"name":"clearY","parameterTypes":[] }, + {"name":"getX","parameterTypes":[] }, + {"name":"getY","parameterTypes":[] }, + {"name":"setX","parameterTypes":["float"] }, + {"name":"setY","parameterTypes":["float"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Page", + "methods":[ + {"name":"getBlocks","parameterTypes":["int"] }, + {"name":"getBlocksCount","parameterTypes":[] }, + {"name":"getBlocksList","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getHeight","parameterTypes":[] }, + {"name":"getProperty","parameterTypes":[] }, + {"name":"getWidth","parameterTypes":[] }, + {"name":"hasProperty","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Page$Builder", + "methods":[ + {"name":"addBlocks","parameterTypes":["com.google.cloud.vision.v1.Block"] }, + {"name":"clearBlocks","parameterTypes":[] }, + {"name":"clearConfidence","parameterTypes":[] }, + {"name":"clearHeight","parameterTypes":[] }, + {"name":"clearProperty","parameterTypes":[] }, + {"name":"clearWidth","parameterTypes":[] }, + {"name":"getBlocks","parameterTypes":["int"] }, + {"name":"getBlocksBuilder","parameterTypes":["int"] }, + {"name":"getBlocksCount","parameterTypes":[] }, + {"name":"getBlocksList","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getHeight","parameterTypes":[] }, + {"name":"getProperty","parameterTypes":[] }, + {"name":"getPropertyBuilder","parameterTypes":[] }, + {"name":"getWidth","parameterTypes":[] }, + {"name":"hasProperty","parameterTypes":[] }, + {"name":"setBlocks","parameterTypes":["int","com.google.cloud.vision.v1.Block"] }, + {"name":"setConfidence","parameterTypes":["float"] }, + {"name":"setHeight","parameterTypes":["int"] }, + {"name":"setProperty","parameterTypes":["com.google.cloud.vision.v1.TextAnnotation$TextProperty"] }, + {"name":"setWidth","parameterTypes":["int"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Paragraph", + "methods":[ + {"name":"getBoundingBox","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getProperty","parameterTypes":[] }, + {"name":"getWords","parameterTypes":["int"] }, + {"name":"getWordsCount","parameterTypes":[] }, + {"name":"getWordsList","parameterTypes":[] }, + {"name":"hasBoundingBox","parameterTypes":[] }, + {"name":"hasProperty","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Paragraph$Builder", + "methods":[ + {"name":"addWords","parameterTypes":["com.google.cloud.vision.v1.Word"] }, + {"name":"clearBoundingBox","parameterTypes":[] }, + {"name":"clearConfidence","parameterTypes":[] }, + {"name":"clearProperty","parameterTypes":[] }, + {"name":"clearWords","parameterTypes":[] }, + {"name":"getBoundingBox","parameterTypes":[] }, + {"name":"getBoundingBoxBuilder","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getProperty","parameterTypes":[] }, + {"name":"getPropertyBuilder","parameterTypes":[] }, + {"name":"getWords","parameterTypes":["int"] }, + {"name":"getWordsBuilder","parameterTypes":["int"] }, + {"name":"getWordsCount","parameterTypes":[] }, + {"name":"getWordsList","parameterTypes":[] }, + {"name":"hasBoundingBox","parameterTypes":[] }, + {"name":"hasProperty","parameterTypes":[] }, + {"name":"setBoundingBox","parameterTypes":["com.google.cloud.vision.v1.BoundingPoly"] }, + {"name":"setConfidence","parameterTypes":["float"] }, + {"name":"setProperty","parameterTypes":["com.google.cloud.vision.v1.TextAnnotation$TextProperty"] }, + {"name":"setWords","parameterTypes":["int","com.google.cloud.vision.v1.Word"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Position", + "methods":[ + {"name":"getX","parameterTypes":[] }, + {"name":"getY","parameterTypes":[] }, + {"name":"getZ","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Position$Builder", + "methods":[ + {"name":"clearX","parameterTypes":[] }, + {"name":"clearY","parameterTypes":[] }, + {"name":"clearZ","parameterTypes":[] }, + {"name":"getX","parameterTypes":[] }, + {"name":"getY","parameterTypes":[] }, + {"name":"getZ","parameterTypes":[] }, + {"name":"setX","parameterTypes":["float"] }, + {"name":"setY","parameterTypes":["float"] }, + {"name":"setZ","parameterTypes":["float"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.ProductSearchResults", + "methods":[{"name":"newBuilder","parameterTypes":[] }] +}, +{ + "name":"com.google.cloud.vision.v1.Property", + "methods":[{"name":"newBuilder","parameterTypes":[] }] +}, +{ + "name":"com.google.cloud.vision.v1.SafeSearchAnnotation", + "methods":[{"name":"newBuilder","parameterTypes":[] }] +}, +{ + "name":"com.google.cloud.vision.v1.Symbol", + "methods":[ + {"name":"getBoundingBox","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getProperty","parameterTypes":[] }, + {"name":"getText","parameterTypes":[] }, + {"name":"getTextBytes","parameterTypes":[] }, + {"name":"hasBoundingBox","parameterTypes":[] }, + {"name":"hasProperty","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Symbol$Builder", + "methods":[ + {"name":"clearBoundingBox","parameterTypes":[] }, + {"name":"clearConfidence","parameterTypes":[] }, + {"name":"clearProperty","parameterTypes":[] }, + {"name":"clearText","parameterTypes":[] }, + {"name":"getBoundingBox","parameterTypes":[] }, + {"name":"getBoundingBoxBuilder","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getProperty","parameterTypes":[] }, + {"name":"getPropertyBuilder","parameterTypes":[] }, + {"name":"getText","parameterTypes":[] }, + {"name":"hasBoundingBox","parameterTypes":[] }, + {"name":"hasProperty","parameterTypes":[] }, + {"name":"setBoundingBox","parameterTypes":["com.google.cloud.vision.v1.BoundingPoly"] }, + {"name":"setConfidence","parameterTypes":["float"] }, + {"name":"setProperty","parameterTypes":["com.google.cloud.vision.v1.TextAnnotation$TextProperty"] }, + {"name":"setText","parameterTypes":["java.lang.String"] }, + {"name":"setTextBytes","parameterTypes":["com.google.protobuf.ByteString"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.TextAnnotation", + "methods":[ + {"name":"getPages","parameterTypes":["int"] }, + {"name":"getPagesCount","parameterTypes":[] }, + {"name":"getPagesList","parameterTypes":[] }, + {"name":"getText","parameterTypes":[] }, + {"name":"getTextBytes","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.TextAnnotation$Builder", + "methods":[ + {"name":"addPages","parameterTypes":["com.google.cloud.vision.v1.Page"] }, + {"name":"clearPages","parameterTypes":[] }, + {"name":"clearText","parameterTypes":[] }, + {"name":"getPages","parameterTypes":["int"] }, + {"name":"getPagesBuilder","parameterTypes":["int"] }, + {"name":"getPagesCount","parameterTypes":[] }, + {"name":"getPagesList","parameterTypes":[] }, + {"name":"getText","parameterTypes":[] }, + {"name":"setPages","parameterTypes":["int","com.google.cloud.vision.v1.Page"] }, + {"name":"setText","parameterTypes":["java.lang.String"] }, + {"name":"setTextBytes","parameterTypes":["com.google.protobuf.ByteString"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.TextAnnotation$DetectedBreak", + "methods":[ + {"name":"getIsPrefix","parameterTypes":[] }, + {"name":"getType","parameterTypes":[] }, + {"name":"getTypeValue","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.TextAnnotation$DetectedBreak$BreakType", + "methods":[ + {"name":"getValueDescriptor","parameterTypes":[] }, + {"name":"valueOf","parameterTypes":["com.google.protobuf.Descriptors$EnumValueDescriptor"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.TextAnnotation$DetectedBreak$Builder", + "methods":[ + {"name":"clearIsPrefix","parameterTypes":[] }, + {"name":"clearType","parameterTypes":[] }, + {"name":"getIsPrefix","parameterTypes":[] }, + {"name":"getType","parameterTypes":[] }, + {"name":"getTypeValue","parameterTypes":[] }, + {"name":"setIsPrefix","parameterTypes":["boolean"] }, + {"name":"setType","parameterTypes":["com.google.cloud.vision.v1.TextAnnotation$DetectedBreak$BreakType"] }, + {"name":"setTypeValue","parameterTypes":["int"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.TextAnnotation$DetectedLanguage", + "methods":[ + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getLanguageCode","parameterTypes":[] }, + {"name":"getLanguageCodeBytes","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.TextAnnotation$DetectedLanguage$Builder", + "methods":[ + {"name":"clearConfidence","parameterTypes":[] }, + {"name":"clearLanguageCode","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getLanguageCode","parameterTypes":[] }, + {"name":"setConfidence","parameterTypes":["float"] }, + {"name":"setLanguageCode","parameterTypes":["java.lang.String"] }, + {"name":"setLanguageCodeBytes","parameterTypes":["com.google.protobuf.ByteString"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.TextAnnotation$TextProperty", + "methods":[ + {"name":"getDetectedBreak","parameterTypes":[] }, + {"name":"getDetectedLanguages","parameterTypes":["int"] }, + {"name":"getDetectedLanguagesCount","parameterTypes":[] }, + {"name":"getDetectedLanguagesList","parameterTypes":[] }, + {"name":"hasDetectedBreak","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.TextAnnotation$TextProperty$Builder", + "methods":[ + {"name":"addDetectedLanguages","parameterTypes":["com.google.cloud.vision.v1.TextAnnotation$DetectedLanguage"] }, + {"name":"clearDetectedBreak","parameterTypes":[] }, + {"name":"clearDetectedLanguages","parameterTypes":[] }, + {"name":"getDetectedBreak","parameterTypes":[] }, + {"name":"getDetectedBreakBuilder","parameterTypes":[] }, + {"name":"getDetectedLanguages","parameterTypes":["int"] }, + {"name":"getDetectedLanguagesBuilder","parameterTypes":["int"] }, + {"name":"getDetectedLanguagesCount","parameterTypes":[] }, + {"name":"getDetectedLanguagesList","parameterTypes":[] }, + {"name":"hasDetectedBreak","parameterTypes":[] }, + {"name":"setDetectedBreak","parameterTypes":["com.google.cloud.vision.v1.TextAnnotation$DetectedBreak"] }, + {"name":"setDetectedLanguages","parameterTypes":["int","com.google.cloud.vision.v1.TextAnnotation$DetectedLanguage"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Vertex", + "methods":[ + {"name":"getX","parameterTypes":[] }, + {"name":"getY","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Vertex$Builder", + "methods":[ + {"name":"clearX","parameterTypes":[] }, + {"name":"clearY","parameterTypes":[] }, + {"name":"getX","parameterTypes":[] }, + {"name":"getY","parameterTypes":[] }, + {"name":"setX","parameterTypes":["int"] }, + {"name":"setY","parameterTypes":["int"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.WebDetection", + "methods":[ + {"name":"getBestGuessLabels","parameterTypes":["int"] }, + {"name":"getBestGuessLabelsCount","parameterTypes":[] }, + {"name":"getBestGuessLabelsList","parameterTypes":[] }, + {"name":"getFullMatchingImages","parameterTypes":["int"] }, + {"name":"getFullMatchingImagesCount","parameterTypes":[] }, + {"name":"getFullMatchingImagesList","parameterTypes":[] }, + {"name":"getPagesWithMatchingImages","parameterTypes":["int"] }, + {"name":"getPagesWithMatchingImagesCount","parameterTypes":[] }, + {"name":"getPagesWithMatchingImagesList","parameterTypes":[] }, + {"name":"getPartialMatchingImages","parameterTypes":["int"] }, + {"name":"getPartialMatchingImagesCount","parameterTypes":[] }, + {"name":"getPartialMatchingImagesList","parameterTypes":[] }, + {"name":"getVisuallySimilarImages","parameterTypes":["int"] }, + {"name":"getVisuallySimilarImagesCount","parameterTypes":[] }, + {"name":"getVisuallySimilarImagesList","parameterTypes":[] }, + {"name":"getWebEntities","parameterTypes":["int"] }, + {"name":"getWebEntitiesCount","parameterTypes":[] }, + {"name":"getWebEntitiesList","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.WebDetection$Builder", + "methods":[ + {"name":"addBestGuessLabels","parameterTypes":["com.google.cloud.vision.v1.WebDetection$WebLabel"] }, + {"name":"addFullMatchingImages","parameterTypes":["com.google.cloud.vision.v1.WebDetection$WebImage"] }, + {"name":"addPagesWithMatchingImages","parameterTypes":["com.google.cloud.vision.v1.WebDetection$WebPage"] }, + {"name":"addPartialMatchingImages","parameterTypes":["com.google.cloud.vision.v1.WebDetection$WebImage"] }, + {"name":"addVisuallySimilarImages","parameterTypes":["com.google.cloud.vision.v1.WebDetection$WebImage"] }, + {"name":"addWebEntities","parameterTypes":["com.google.cloud.vision.v1.WebDetection$WebEntity"] }, + {"name":"clearBestGuessLabels","parameterTypes":[] }, + {"name":"clearFullMatchingImages","parameterTypes":[] }, + {"name":"clearPagesWithMatchingImages","parameterTypes":[] }, + {"name":"clearPartialMatchingImages","parameterTypes":[] }, + {"name":"clearVisuallySimilarImages","parameterTypes":[] }, + {"name":"clearWebEntities","parameterTypes":[] }, + {"name":"getBestGuessLabels","parameterTypes":["int"] }, + {"name":"getBestGuessLabelsBuilder","parameterTypes":["int"] }, + {"name":"getBestGuessLabelsCount","parameterTypes":[] }, + {"name":"getBestGuessLabelsList","parameterTypes":[] }, + {"name":"getFullMatchingImages","parameterTypes":["int"] }, + {"name":"getFullMatchingImagesBuilder","parameterTypes":["int"] }, + {"name":"getFullMatchingImagesCount","parameterTypes":[] }, + {"name":"getFullMatchingImagesList","parameterTypes":[] }, + {"name":"getPagesWithMatchingImages","parameterTypes":["int"] }, + {"name":"getPagesWithMatchingImagesBuilder","parameterTypes":["int"] }, + {"name":"getPagesWithMatchingImagesCount","parameterTypes":[] }, + {"name":"getPagesWithMatchingImagesList","parameterTypes":[] }, + {"name":"getPartialMatchingImages","parameterTypes":["int"] }, + {"name":"getPartialMatchingImagesBuilder","parameterTypes":["int"] }, + {"name":"getPartialMatchingImagesCount","parameterTypes":[] }, + {"name":"getPartialMatchingImagesList","parameterTypes":[] }, + {"name":"getVisuallySimilarImages","parameterTypes":["int"] }, + {"name":"getVisuallySimilarImagesBuilder","parameterTypes":["int"] }, + {"name":"getVisuallySimilarImagesCount","parameterTypes":[] }, + {"name":"getVisuallySimilarImagesList","parameterTypes":[] }, + {"name":"getWebEntities","parameterTypes":["int"] }, + {"name":"getWebEntitiesBuilder","parameterTypes":["int"] }, + {"name":"getWebEntitiesCount","parameterTypes":[] }, + {"name":"getWebEntitiesList","parameterTypes":[] }, + {"name":"setBestGuessLabels","parameterTypes":["int","com.google.cloud.vision.v1.WebDetection$WebLabel"] }, + {"name":"setFullMatchingImages","parameterTypes":["int","com.google.cloud.vision.v1.WebDetection$WebImage"] }, + {"name":"setPagesWithMatchingImages","parameterTypes":["int","com.google.cloud.vision.v1.WebDetection$WebPage"] }, + {"name":"setPartialMatchingImages","parameterTypes":["int","com.google.cloud.vision.v1.WebDetection$WebImage"] }, + {"name":"setVisuallySimilarImages","parameterTypes":["int","com.google.cloud.vision.v1.WebDetection$WebImage"] }, + {"name":"setWebEntities","parameterTypes":["int","com.google.cloud.vision.v1.WebDetection$WebEntity"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.WebDetection$WebEntity", + "methods":[ + {"name":"getDescription","parameterTypes":[] }, + {"name":"getDescriptionBytes","parameterTypes":[] }, + {"name":"getEntityId","parameterTypes":[] }, + {"name":"getEntityIdBytes","parameterTypes":[] }, + {"name":"getScore","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.WebDetection$WebEntity$Builder", + "methods":[ + {"name":"clearDescription","parameterTypes":[] }, + {"name":"clearEntityId","parameterTypes":[] }, + {"name":"clearScore","parameterTypes":[] }, + {"name":"getDescription","parameterTypes":[] }, + {"name":"getEntityId","parameterTypes":[] }, + {"name":"getScore","parameterTypes":[] }, + {"name":"setDescription","parameterTypes":["java.lang.String"] }, + {"name":"setDescriptionBytes","parameterTypes":["com.google.protobuf.ByteString"] }, + {"name":"setEntityId","parameterTypes":["java.lang.String"] }, + {"name":"setEntityIdBytes","parameterTypes":["com.google.protobuf.ByteString"] }, + {"name":"setScore","parameterTypes":["float"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.WebDetection$WebImage", + "methods":[ + {"name":"getScore","parameterTypes":[] }, + {"name":"getUrl","parameterTypes":[] }, + {"name":"getUrlBytes","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.WebDetection$WebImage$Builder", + "methods":[ + {"name":"clearScore","parameterTypes":[] }, + {"name":"clearUrl","parameterTypes":[] }, + {"name":"getScore","parameterTypes":[] }, + {"name":"getUrl","parameterTypes":[] }, + {"name":"setScore","parameterTypes":["float"] }, + {"name":"setUrl","parameterTypes":["java.lang.String"] }, + {"name":"setUrlBytes","parameterTypes":["com.google.protobuf.ByteString"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.WebDetection$WebLabel", + "methods":[ + {"name":"getLabel","parameterTypes":[] }, + {"name":"getLabelBytes","parameterTypes":[] }, + {"name":"getLanguageCode","parameterTypes":[] }, + {"name":"getLanguageCodeBytes","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.WebDetection$WebLabel$Builder", + "methods":[ + {"name":"clearLabel","parameterTypes":[] }, + {"name":"clearLanguageCode","parameterTypes":[] }, + {"name":"getLabel","parameterTypes":[] }, + {"name":"getLanguageCode","parameterTypes":[] }, + {"name":"setLabel","parameterTypes":["java.lang.String"] }, + {"name":"setLabelBytes","parameterTypes":["com.google.protobuf.ByteString"] }, + {"name":"setLanguageCode","parameterTypes":["java.lang.String"] }, + {"name":"setLanguageCodeBytes","parameterTypes":["com.google.protobuf.ByteString"] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.WebDetection$WebPage", + "methods":[{"name":"newBuilder","parameterTypes":[] }] +}, +{ + "name":"com.google.cloud.vision.v1.Word", + "methods":[ + {"name":"getBoundingBox","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getProperty","parameterTypes":[] }, + {"name":"getSymbols","parameterTypes":["int"] }, + {"name":"getSymbolsCount","parameterTypes":[] }, + {"name":"getSymbolsList","parameterTypes":[] }, + {"name":"hasBoundingBox","parameterTypes":[] }, + {"name":"hasProperty","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.cloud.vision.v1.Word$Builder", + "methods":[ + {"name":"addSymbols","parameterTypes":["com.google.cloud.vision.v1.Symbol"] }, + {"name":"clearBoundingBox","parameterTypes":[] }, + {"name":"clearConfidence","parameterTypes":[] }, + {"name":"clearProperty","parameterTypes":[] }, + {"name":"clearSymbols","parameterTypes":[] }, + {"name":"getBoundingBox","parameterTypes":[] }, + {"name":"getBoundingBoxBuilder","parameterTypes":[] }, + {"name":"getConfidence","parameterTypes":[] }, + {"name":"getProperty","parameterTypes":[] }, + {"name":"getPropertyBuilder","parameterTypes":[] }, + {"name":"getSymbols","parameterTypes":["int"] }, + {"name":"getSymbolsBuilder","parameterTypes":["int"] }, + {"name":"getSymbolsCount","parameterTypes":[] }, + {"name":"getSymbolsList","parameterTypes":[] }, + {"name":"hasBoundingBox","parameterTypes":[] }, + {"name":"hasProperty","parameterTypes":[] }, + {"name":"setBoundingBox","parameterTypes":["com.google.cloud.vision.v1.BoundingPoly"] }, + {"name":"setConfidence","parameterTypes":["float"] }, + {"name":"setProperty","parameterTypes":["com.google.cloud.vision.v1.TextAnnotation$TextProperty"] }, + {"name":"setSymbols","parameterTypes":["int","com.google.cloud.vision.v1.Symbol"] } + ] +}, +{ + "name":"com.google.common.util.concurrent.AbstractFuture", + "fields":[ + {"name":"listeners"}, + {"name":"value"}, + {"name":"waiters"} + ] +}, +{ + "name":"com.google.common.util.concurrent.AbstractFuture$Waiter", + "fields":[ + {"name":"next"}, + {"name":"thread"} + ] +}, +{ + "name":"com.google.protobuf.ExtensionRegistry", + "methods":[{"name":"getEmptyRegistry","parameterTypes":[] }] +}, +{ + "name":"com.google.protobuf.FloatValue", + "methods":[{"name":"newBuilder","parameterTypes":[] }] +}, +{ + "name":"com.google.rpc.Status", + "methods":[{"name":"newBuilder","parameterTypes":[] }] +}, +{ + "name":"com.google.type.Color", + "methods":[ + {"name":"getAlpha","parameterTypes":[] }, + {"name":"getBlue","parameterTypes":[] }, + {"name":"getGreen","parameterTypes":[] }, + {"name":"getRed","parameterTypes":[] }, + {"name":"hasAlpha","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.type.Color$Builder", + "methods":[ + {"name":"clearAlpha","parameterTypes":[] }, + {"name":"clearBlue","parameterTypes":[] }, + {"name":"clearGreen","parameterTypes":[] }, + {"name":"clearRed","parameterTypes":[] }, + {"name":"getAlpha","parameterTypes":[] }, + {"name":"getAlphaBuilder","parameterTypes":[] }, + {"name":"getBlue","parameterTypes":[] }, + {"name":"getGreen","parameterTypes":[] }, + {"name":"getRed","parameterTypes":[] }, + {"name":"hasAlpha","parameterTypes":[] }, + {"name":"setAlpha","parameterTypes":["com.google.protobuf.FloatValue"] }, + {"name":"setBlue","parameterTypes":["float"] }, + {"name":"setGreen","parameterTypes":["float"] }, + {"name":"setRed","parameterTypes":["float"] } + ] +}, +{ + "name":"com.google.type.LatLng", + "methods":[ + {"name":"getLatitude","parameterTypes":[] }, + {"name":"getLongitude","parameterTypes":[] }, + {"name":"newBuilder","parameterTypes":[] } + ] +}, +{ + "name":"com.google.type.LatLng$Builder", + "methods":[ + {"name":"clearLatitude","parameterTypes":[] }, + {"name":"clearLongitude","parameterTypes":[] }, + {"name":"getLatitude","parameterTypes":[] }, + {"name":"getLongitude","parameterTypes":[] }, + {"name":"setLatitude","parameterTypes":["double"] }, + {"name":"setLongitude","parameterTypes":["double"] } + ] +}, +{ + "name":"com.sun.crypto.provider.AESCipher$General", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.sun.crypto.provider.ARCFOURCipher", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.sun.crypto.provider.ChaCha20Cipher$ChaCha20Poly1305", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.sun.crypto.provider.DESCipher", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.sun.crypto.provider.DESedeCipher", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.sun.crypto.provider.DHParameters", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.sun.crypto.provider.GaloisCounterMode$AESGCM", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.sun.crypto.provider.HmacCore$HmacSHA384", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.sun.crypto.provider.TlsMasterSecretGenerator", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.sun.jndi.dns.DnsContextFactory" +}, +{ + "name":"com.sun.jndi.url.dns.dnsURLContextFactory", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"io.grpc.census.InternalCensusStatsAccessor" +}, +{ + "name":"io.grpc.census.InternalCensusTracingAccessor" +}, +{ + "name":"io.grpc.internal.DnsNameResolverProvider" +}, +{ + "name":"io.grpc.internal.JndiResourceResolverFactory", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"io.grpc.internal.PickFirstLoadBalancerProvider" +}, +{ + "name":"io.grpc.netty.NettyChannelProvider" +}, +{ + "name":"io.grpc.netty.UdsNettyChannelProvider" +}, +{ + "name":"io.grpc.netty.shaded.io.grpc.netty.AbstractNettyHandler", + "methods":[ + {"name":"channelActive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"exceptionCaught","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler", + "methods":[ + {"name":"channelInactive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"close","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"write","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators$ClientTlsHandler" +}, +{ + "name":"io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators$GrpcNegotiationHandler", + "methods":[{"name":"userEventTriggered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators$ProtocolNegotiationHandler", + "methods":[{"name":"userEventTriggered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators$WaitUntilActiveHandler", + "methods":[{"name":"channelActive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.grpc.netty.WriteBufferingAndExceptionHandler", + "methods":[ + {"name":"channelInactive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelRead","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, + {"name":"close","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"connect","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"exceptionCaught","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }, + {"name":"flush","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"write","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.buffer.AbstractByteBufAllocator", + "queryAllDeclaredMethods":true +}, +{ + "name":"io.grpc.netty.shaded.io.netty.buffer.AbstractReferenceCountedByteBuf", + "fields":[{"name":"refCnt"}] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.ChannelDuplexHandler", + "methods":[ + {"name":"bind","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"close","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"connect","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"deregister","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"disconnect","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"flush","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"read","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"write","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.ChannelInboundHandlerAdapter", + "methods":[ + {"name":"channelActive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelInactive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelRead","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, + {"name":"channelReadComplete","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelRegistered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelUnregistered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelWritabilityChanged","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"exceptionCaught","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }, + {"name":"userEventTriggered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext", + "methods":[ + {"name":"bind","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"channelActive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelInactive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelRead","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, + {"name":"channelReadComplete","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelRegistered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelUnregistered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelWritabilityChanged","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"close","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"connect","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"deregister","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"disconnect","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"exceptionCaught","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }, + {"name":"flush","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"read","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"userEventTriggered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, + {"name":"write","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$TailContext", + "methods":[ + {"name":"channelActive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelInactive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelRead","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, + {"name":"channelReadComplete","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelRegistered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelUnregistered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelWritabilityChanged","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"exceptionCaught","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }, + {"name":"userEventTriggered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.DefaultFileRegion" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.epoll.Epoll", + "methods":[{"name":"isAvailable","parameterTypes":[] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.epoll.EpollDomainSocketChannel" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoopGroup", + "methods":[{"name":"","parameterTypes":["int","java.util.concurrent.ThreadFactory"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.epoll.EpollServerSocketChannel", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.epoll.EpollSocketChannel", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.epoll.NativeDatagramPacketArray$NativeDatagramPacket" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.DatagramSocketAddress" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.DomainDatagramSocketAddress" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.channel.unix.PeerCredentials" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder", + "methods":[ + {"name":"channelRead","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, + {"name":"userEventTriggered","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2ConnectionHandler", + "methods":[ + {"name":"bind","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"channelReadComplete","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelWritabilityChanged","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"connect","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"deregister","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"disconnect","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"flush","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"read","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.handler.ssl.SslHandler", + "methods":[ + {"name":"bind","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"channelActive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelInactive","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"channelReadComplete","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"close","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"connect","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.net.SocketAddress","java.net.SocketAddress","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"deregister","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"disconnect","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] }, + {"name":"exceptionCaught","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }, + {"name":"flush","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"read","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext"] }, + {"name":"write","parameterTypes":["io.grpc.netty.shaded.io.netty.channel.ChannelHandlerContext","java.lang.Object","io.grpc.netty.shaded.io.netty.channel.ChannelPromise"] } + ] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateCallback" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateCallbackTask" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLContext" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethodDecryptTask" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethodSignTask" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLPrivateKeyMethodTask" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.internal.tcnative.SSLTask" +}, +{ + "name":"io.grpc.netty.shaded.io.netty.util.AbstractReferenceCounted", + "fields":[{"name":"refCnt"}] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.util.ReferenceCountUtil", + "queryAllDeclaredMethods":true +}, +{ + "name":"io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil", + "methods":[{"name":"loadLibrary","parameterTypes":["java.lang.String","boolean"] }] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueColdProducerFields", + "fields":[{"name":"producerLimit"}] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueConsumerFields", + "fields":[{"name":"consumerIndex"}] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueProducerFields", + "fields":[{"name":"producerIndex"}] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueConsumerIndexField", + "fields":[{"name":"consumerIndex"}] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueProducerIndexField", + "fields":[{"name":"producerIndex"}] +}, +{ + "name":"io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueProducerLimitField", + "fields":[{"name":"producerLimit"}] +}, +{ + "name":"io.grpc.okhttp.OkHttpChannelProvider" +}, +{ + "name":"io.grpc.override.ContextStorageOverride" +}, +{ + "name":"io.grpc.util.SecretRoundRobinLoadBalancerProvider$Provider", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"io.opencensus.impl.trace.TraceComponentImpl" +}, +{ + "name":"io.opencensus.impllite.trace.TraceComponentImplLite" +}, +{ + "name":"io.opentelemetry.opencensusshim.OpenTelemetryContextManager" +}, +{ + "name":"io.opentelemetry.opencensusshim.OpenTelemetryTraceComponentImpl" +}, +{ + "name":"io.perfmark.impl.SecretPerfMarkImpl$PerfMarkImpl" +}, +{ + "name":"java.io.FileDescriptor" +}, +{ + "name":"java.io.IOException" +}, +{ + "name":"java.lang.Exception" +}, +{ + "name":"java.lang.IllegalArgumentException" +}, +{ + "name":"java.lang.NullPointerException" +}, +{ + "name":"java.lang.Object", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true +}, +{ + "name":"java.lang.OutOfMemoryError" +}, +{ + "name":"java.lang.ProcessHandle", + "methods":[ + {"name":"current","parameterTypes":[] }, + {"name":"pid","parameterTypes":[] } + ] +}, +{ + "name":"java.lang.RuntimeException" +}, +{ + "name":"java.lang.String" +}, +{ + "name":"java.lang.management.ManagementFactory", + "methods":[{"name":"getRuntimeMXBean","parameterTypes":[] }] +}, +{ + "name":"java.lang.management.RuntimeMXBean", + "methods":[{"name":"getInputArguments","parameterTypes":[] }] +}, +{ + "name":"java.net.InetSocketAddress", + "methods":[{"name":"getHostString","parameterTypes":[] }] +}, +{ + "name":"java.net.PortUnreachableException" +}, +{ + "name":"java.nio.Bits", + "fields":[{"name":"UNALIGNED"}] +}, +{ + "name":"java.nio.Buffer", + "fields":[{"name":"address"}] +}, +{ + "name":"java.nio.ByteBuffer", + "methods":[{"name":"alignedSlice","parameterTypes":["int"] }] +}, +{ + "name":"java.nio.DirectByteBuffer", + "methods":[{"name":"","parameterTypes":["long","int"] }] +}, +{ + "name":"java.nio.channels.ClosedChannelException" +}, +{ + "name":"java.nio.channels.FileChannel" +}, +{ + "name":"java.security.AlgorithmParametersSpi" +}, +{ + "name":"java.security.KeyStoreSpi" +}, +{ + "name":"java.security.SecureRandomParameters" +}, +{ + "name":"java.security.interfaces.ECPrivateKey" +}, +{ + "name":"java.security.interfaces.ECPublicKey" +}, +{ + "name":"java.security.interfaces.RSAPrivateKey" +}, +{ + "name":"java.security.interfaces.RSAPublicKey" +}, +{ + "name":"java.util.AbstractMap", + "allDeclaredFields":true +}, +{ + "name":"java.util.Date" +}, +{ + "name":"java.util.concurrent.atomic.LongAdder", + "queryAllPublicConstructors":true, + "methods":[ + {"name":"","parameterTypes":[] }, + {"name":"add","parameterTypes":["long"] }, + {"name":"sum","parameterTypes":[] } + ] +}, +{ + "name":"javax.naming.directory.InitialDirContext" +}, +{ + "name":"javax.net.ssl.SSLContext", + "fields":[{"name":"contextSpi"}] +}, +{ + "name":"javax.security.auth.x500.X500Principal", + "fields":[{"name":"thisX500Name"}], + "methods":[{"name":"","parameterTypes":["sun.security.x509.X500Name"] }] +}, +{ + "name":"jdk.internal.misc.Unsafe", + "methods":[{"name":"getUnsafe","parameterTypes":[] }] +}, +{ + "name":"junit.framework.Test" +}, +{ + "name":"libcore.io.Memory" +}, +{ + "name":"org.apache.maven.surefire.junitcore.JUnitCoreProvider", + "methods":[{"name":"","parameterTypes":["org.apache.maven.surefire.api.provider.ProviderParameters"] }] +}, +{ + "name":"org.junit.experimental.categories.Categories" +}, +{ + "name":"org.junit.experimental.categories.Category" +}, +{ + "name":"org.junit.runner.RunWith" +}, +{ + "name":"org.robolectric.Robolectric" +}, +{ + "name":"sun.misc.Unsafe", + "allDeclaredFields":true, + "methods":[ + {"name":"arrayBaseOffset","parameterTypes":["java.lang.Class"] }, + {"name":"arrayIndexScale","parameterTypes":["java.lang.Class"] }, + {"name":"copyMemory","parameterTypes":["long","long","long"] }, + {"name":"copyMemory","parameterTypes":["java.lang.Object","long","java.lang.Object","long","long"] }, + {"name":"getAndAddLong","parameterTypes":["java.lang.Object","long","long"] }, + {"name":"getAndSetObject","parameterTypes":["java.lang.Object","long","java.lang.Object"] }, + {"name":"getBoolean","parameterTypes":["java.lang.Object","long"] }, + {"name":"getByte","parameterTypes":["long"] }, + {"name":"getByte","parameterTypes":["java.lang.Object","long"] }, + {"name":"getDouble","parameterTypes":["java.lang.Object","long"] }, + {"name":"getFloat","parameterTypes":["java.lang.Object","long"] }, + {"name":"getInt","parameterTypes":["long"] }, + {"name":"getInt","parameterTypes":["java.lang.Object","long"] }, + {"name":"getLong","parameterTypes":["long"] }, + {"name":"getLong","parameterTypes":["java.lang.Object","long"] }, + {"name":"getObject","parameterTypes":["java.lang.Object","long"] }, + {"name":"invokeCleaner","parameterTypes":["java.nio.ByteBuffer"] }, + {"name":"objectFieldOffset","parameterTypes":["java.lang.reflect.Field"] }, + {"name":"putBoolean","parameterTypes":["java.lang.Object","long","boolean"] }, + {"name":"putByte","parameterTypes":["long","byte"] }, + {"name":"putByte","parameterTypes":["java.lang.Object","long","byte"] }, + {"name":"putDouble","parameterTypes":["java.lang.Object","long","double"] }, + {"name":"putFloat","parameterTypes":["java.lang.Object","long","float"] }, + {"name":"putInt","parameterTypes":["long","int"] }, + {"name":"putInt","parameterTypes":["java.lang.Object","long","int"] }, + {"name":"putLong","parameterTypes":["long","long"] }, + {"name":"putLong","parameterTypes":["java.lang.Object","long","long"] }, + {"name":"putObject","parameterTypes":["java.lang.Object","long","java.lang.Object"] }, + {"name":"storeFence","parameterTypes":[] } + ] +}, +{ + "name":"sun.misc.VM" +}, +{ + "name":"sun.security.pkcs12.PKCS12KeyStore", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.pkcs12.PKCS12KeyStore$DualFormatPKCS12", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.DSA$SHA224withDSA", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.DSA$SHA256withDSA", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.JavaKeyStore$DualFormatJKS", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.JavaKeyStore$JKS", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.NativePRNG", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.SHA", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.SHA2$SHA224", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.SHA2$SHA256", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.SHA5$SHA384", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.SHA5$SHA512", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.X509Factory", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.provider.certpath.PKIXCertPathValidator", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.rsa.PSSParameters", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.rsa.RSAKeyFactory$Legacy", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.rsa.RSAPSSSignature", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.rsa.RSASignature$SHA224withRSA", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.rsa.RSASignature$SHA256withRSA", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.ssl.KeyManagerFactoryImpl$SunX509", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.ssl.SSLContextImpl", + "fields":[{"name":"trustManager"}] +}, +{ + "name":"sun.security.ssl.SSLContextImpl$DefaultSSLContext", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.ssl.SSLContextImpl$TLSContext", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.ssl.TrustManagerFactoryImpl$PKIXFactory", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"sun.security.util.ObjectIdentifier" +}, +{ + "name":"sun.security.x509.AuthorityInfoAccessExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.AuthorityKeyIdentifierExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.BasicConstraintsExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.CRLDistributionPointsExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.CertificateExtensions" +}, +{ + "name":"sun.security.x509.CertificatePoliciesExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.ExtendedKeyUsageExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.IssuerAlternativeNameExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.KeyUsageExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.NetscapeCertTypeExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.PrivateKeyUsageExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.SubjectAlternativeNameExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +}, +{ + "name":"sun.security.x509.SubjectKeyIdentifierExtension", + "methods":[{"name":"","parameterTypes":["java.lang.Boolean","java.lang.Object"] }] +} +] diff --git a/java-vision/google-cloud-vision/native-image-config/resource-config.json b/java-vision/google-cloud-vision/native-image-config/resource-config.json new file mode 100644 index 000000000000..b25c29adf458 --- /dev/null +++ b/java-vision/google-cloud-vision/native-image-config/resource-config.json @@ -0,0 +1,30 @@ +{ + "resources":{ + "includes":[ + { + "pattern":"\\QMETA-INF/native/libio_grpc_netty_shaded_netty_tcnative_linux_x86_64.so\\E" + }, + { + "pattern":"\\QMETA-INF/native/libio_grpc_netty_shaded_netty_transport_native_epoll_x86_64.so\\E" + }, + { + "pattern":"\\QMETA-INF/services/io.grpc.LoadBalancerProvider\\E" + }, + { + "pattern":"\\QMETA-INF/services/io.grpc.ManagedChannelProvider\\E" + }, + { + "pattern":"\\QMETA-INF/services/io.grpc.NameResolverProvider\\E" + }, + { + "pattern":"\\QMETA-INF/services/org.apache.maven.surefire.spi.MasterProcessChannelProcessorFactory\\E" + }, + { + "pattern":"\\Qcom/google/api/client/http/google-http-client.properties\\E" + }, + { + "pattern":"\\Qdependencies.properties\\E" + } + ]}, + "bundles":[] +} diff --git a/java-vision/google-cloud-vision/native-image-config/serialization-config.json b/java-vision/google-cloud-vision/native-image-config/serialization-config.json new file mode 100644 index 000000000000..3b643a1010fd --- /dev/null +++ b/java-vision/google-cloud-vision/native-image-config/serialization-config.json @@ -0,0 +1,11 @@ +{ + "types":[ + { + "name":"org.junit.runner.Result$SerializedForm" + } + ], + "lambdaCapturingTypes":[ + ], + "proxies":[ + ] +} diff --git a/pom.xml b/pom.xml index e83a79d356f1..76f154f4147d 100644 --- a/pom.xml +++ b/pom.xml @@ -100,6 +100,7 @@ java-iamcredentials java-iam java-ids + java-infra-manager java-iot java-kmsinventory java-kms diff --git a/versions.txt b/versions.txt index 9ab5a0be9bc2..85b22bf68e05 100644 --- a/versions.txt +++ b/versions.txt @@ -669,3 +669,6 @@ google-cloud-alloydb-connectors:0.1.0:0.2.0-SNAPSHOT proto-google-cloud-alloydb-connectors-v1alpha:0.1.0:0.2.0-SNAPSHOT proto-google-cloud-language-v2:2.24.0:2.25.0-SNAPSHOT grpc-google-cloud-language-v2:2.24.0:2.25.0-SNAPSHOT +google-cloud-infra-manager:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-infra-manager-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-infra-manager-v1:0.0.0:0.0.1-SNAPSHOT